Add a check for the Darwin dynamic linker. Use AC_TRY_LINK when checking
authorDan Winship <danw@src.gnome.org>
Fri, 20 Apr 2001 17:08:57 +0000 (17:08 +0000)
committerDan Winship <danw@src.gnome.org>
Fri, 20 Apr 2001 17:08:57 +0000 (17:08 +0000)
        * 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.

13 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
configure.in
testglib.c
tests/gio-test.c
tests/testglib.c
tests/type-test.c

index 2caf04f..57e3631 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index 2caf04f..57e3631 100644 (file)
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index 2caf04f..57e3631 100644 (file)
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index 2caf04f..57e3631 100644 (file)
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index 2caf04f..57e3631 100644 (file)
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index 2caf04f..57e3631 100644 (file)
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index 2caf04f..57e3631 100644 (file)
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index 2caf04f..57e3631 100644 (file)
@@ -1,3 +1,18 @@
+2001-04-20  Dan Winship  <danw@ximian.com>
+
+       * 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  <wilhelmi@ira.uka.de>
 
        * ghash.c, ghash.h: Remove definition of g_hash_table_freeze and
index fc041bf..7efcdaf 100644 (file)
@@ -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 <pwd.h>],
+                               [AC_TRY_LINK([#include <pwd.h>],
                                        [char buffer[10000];
                                        struct passwd pwd;
                                        getpwuid_r (0, &pwd, buffer, 
index 4617487..ec05861 100644 (file)
@@ -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)
index 898ac39..17ac543 100644 (file)
@@ -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);
index 4617487..ec05861 100644 (file)
@@ -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)
index ade1b86..6cea617 100644 (file)
@@ -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);