From: Dan Winship Date: Fri, 20 Apr 2001 17:08:57 +0000 (+0000) Subject: Add a check for the Darwin dynamic linker. Use AC_TRY_LINK when checking X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=655d467602853052251c10a24f1b62ed1cf72793;p=dana%2Fcg-glib.git Add a check for the Darwin dynamic linker. Use AC_TRY_LINK when checking * configure.in: Add a check for the Darwin dynamic linker. Use AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices "no getpwuid_r" correctly. * testglib.c (main): Make template[] bigger to prevent an overrun. Remove an unused variable. Initialize error to NULL. * tests/gio-test.c (main): Add a cast to prevent a warning when size_t is a long. * tests/type-test.c (main): Add an #ifdef to prevent a warning when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. --- diff --git a/ChangeLog b/ChangeLog index 2caf04fc..57e36316 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 2caf04fc..57e36316 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2caf04fc..57e36316 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 2caf04fc..57e36316 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 2caf04fc..57e36316 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 2caf04fc..57e36316 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 2caf04fc..57e36316 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2caf04fc..57e36316 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,18 @@ +2001-04-20 Dan Winship + + * configure.in: Add a check for the Darwin dynamic linker. Use + AC_TRY_LINK when checking for "nonposix getpwuid_r" so it notices + "no getpwuid_r" correctly. + + * testglib.c (main): Make template[] bigger to prevent an overrun. + Remove an unused variable. Initialize error to NULL. + + * tests/gio-test.c (main): Add a cast to prevent a warning when + size_t is a long. + + * tests/type-test.c (main): Add an #ifdef to prevent a warning + when G_HAVE_GINT64 is defined and G_GINT64_FORMAT isn't. + 2001-04-19 Sebastian Wilhelmi * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and diff --git a/configure.in b/configure.in index fc041bfe..7efcdaf4 100644 --- a/configure.in +++ b/configure.in @@ -659,7 +659,7 @@ if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then G_MODULE_IMPL=G_MODULE_IMPL_BEOS], []) fi -# *** dlopen() and dlsym() in libdl +dnl *** dlopen() and dlsym() in libdl if test -z "$G_MODULE_IMPL"; then AC_CHECK_LIB(dl, dlopen, [AC_CHECK_LIB(dl, dlsym, @@ -667,6 +667,13 @@ if test -z "$G_MODULE_IMPL"; then G_MODULE_IMPL=G_MODULE_IMPL_DL],[])], []) fi +dnl *** NSLinkModule (dyld) in system libraries (Darwin) +if test -z "$G_MODULE_IMPL"; then + AC_CHECK_FUNC(NSLinkModule, + [G_MODULE_IMPL=G_MODULE_IMPL_DYLD + G_MODULE_NEED_USCORE=1], + []) +fi dnl *** shl_load() in libdld (HP-UX) if test -z "$G_MODULE_IMPL"; then AC_MSG_CHECKING(how to export all symbols) @@ -1013,7 +1020,7 @@ if test x"$have_threads" != xnone; then CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS" # First we test, whether localtime_r is declared in time.h - # directly. Then we test wether a macro localtime_r exists, in + # directly. Then we test whether a macro localtime_r exists, in # which case localtime_r in the test program is replaced and thus # if we still find localtime_r in the output, it is not defined as # a macro. @@ -1189,7 +1196,7 @@ if test x"$have_threads" != xnone; then else AC_CACHE_CHECK([for nonposix getpwuid_r], ac_cv_func_nonposix_getpwuid_r, - [AC_TRY_COMPILE([#include ], + [AC_TRY_LINK([#include ], [char buffer[10000]; struct passwd pwd; getpwuid_r (0, &pwd, buffer, diff --git a/testglib.c b/testglib.c index 4617487d..ec058616 100644 --- a/testglib.c +++ b/testglib.c @@ -394,10 +394,9 @@ main (int argc, const char hello[] = "Hello, World"; const int hellolen = sizeof (hello) - 1; int fd; - char template[10]; + char template[32]; GError *error; char *name_used; - gchar *p; #ifdef G_OS_WIN32 gchar *glib_dll = g_strdup_printf ("glib-%d.%d.dll", GLIB_MAJOR_VERSION, @@ -1213,6 +1212,7 @@ main (int argc, close (fd); remove (template); + error = NULL; strcpy (template, "zap" G_DIR_SEPARATOR_S "barXXXXXX"); fd = g_file_open_tmp (template, &name_used, &error); if (fd != -1) diff --git a/tests/gio-test.c b/tests/gio-test.c index 898ac39b..17ac543e 100644 --- a/tests/gio-test.c +++ b/tests/gio-test.c @@ -399,7 +399,7 @@ main (int argc, for (j = 0; j < buflen; j++) buf[j] = ' ' + ((buflen + j) % 95); g_print ("gio-test: child writing %d+%d bytes to %d\n", - sizeof(i) + sizeof(buflen), buflen, writefd); + (int)(sizeof(i) + sizeof(buflen)), buflen, writefd); write (writefd, &i, sizeof (i)); write (writefd, &buflen, sizeof (buflen)); write (writefd, buf, buflen); diff --git a/tests/testglib.c b/tests/testglib.c index 4617487d..ec058616 100644 --- a/tests/testglib.c +++ b/tests/testglib.c @@ -394,10 +394,9 @@ main (int argc, const char hello[] = "Hello, World"; const int hellolen = sizeof (hello) - 1; int fd; - char template[10]; + char template[32]; GError *error; char *name_used; - gchar *p; #ifdef G_OS_WIN32 gchar *glib_dll = g_strdup_printf ("glib-%d.%d.dll", GLIB_MAJOR_VERSION, @@ -1213,6 +1212,7 @@ main (int argc, close (fd); remove (template); + error = NULL; strcpy (template, "zap" G_DIR_SEPARATOR_S "barXXXXXX"); fd = g_file_open_tmp (template, &name_used, &error); if (fd != -1) diff --git a/tests/type-test.c b/tests/type-test.c index ade1b86a..6cea617b 100644 --- a/tests/type-test.c +++ b/tests/type-test.c @@ -52,9 +52,11 @@ main (int argc, #ifdef G_HAVE_GINT64 guint64 gu64t1 = G_GINT64_CONSTANT(0x1d636b02300a7aa7U), gu64t2 = G_GINT64_CONSTANT(0xa77a0a30026b631dU); +#ifdef G_GINT64_FORMAT gint64 gi64t1; gint64 gi64t2; -#endif +#endif /* G_GINT64_FORMAT */ +#endif /* G_HAVE_GINT64 */ /* type sizes */ g_assert (sizeof (gint8) == 1);