gmacros.h: add G_GNUC_*_IGNORE_DEPRECATIONS macros for clang

https://bugzilla.gnome.org/show_bug.cgi?id=734126

Signed-off-by: Thomas Haller <thaller@redhat.com>
(cherry picked from commit 35eaf037bdfca985abf5d349e7355f1d2ed9c77b)
gvariant tests: workaround libc/compiler "issue"

memcmp() is declared by glibc as follows:

  /* Compare N bytes of S1 and S2.  */
  extern int memcmp (const void *__s1, const void *__s2, size_t __n)
       __THROW __attribute_pure__ __nonnull ((1, 2));

despite the fact that it is valid to call it with a null pointer if the
size is zero.

gcc 4.9.0 contains a new optimisation that sees that we pass a pointer
to this function and concludes that it certainly must not be null,
removing a later check and thereby causing a crash.

We protect the invocation of memcmp() with a condition to prevent gcc
from making this false assumption (arguably under wrong advice from
glibc).
GLib 2.40.1
configure.ac: fix nested functions in checks

This is a combination of these commits from master:

  9362a1b2d987125a8aa0723b916d29aaaece329a
  20e709d8b92e28d162c78b147afe4040e3a48b85
  e15ba53cdab91587721a38efa4eeea9acf871860
build: also unset LIBS when LDFLAGS is unset

On OpenBSD, libintl is installed under /usr/local/lib. When configure
checks unset LDFLAGS, LIBS should also be unset otherwise we end up with
-lintl which cannot be found resulting to the compile check to fail.

https://bugzilla.gnome.org/show_bug.cgi?id=727939
platform_get_argv0: drop unneeded headers for OpenBSD

And properly set the size of len.
There is also no need for realloc(), g_malloc0 will do just fine.

https://bugzilla.gnome.org/show_bug.cgi?id=728280
GLib 2.40.2