From: Owen Taylor Date: Mon, 5 Nov 2001 01:47:31 +0000 (+0000) Subject: Add check for dirent.h X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=ff6174aeddf7e1a45054aa95e5065dd0a72c7d58;p=dana%2Fcg-glib.git Add check for dirent.h Sun Nov 4 20:45:21 2001 Owen Taylor * configure.in (CFLAGS): Add check for dirent.h * glib/glib.h glib/Makefile.am: Add gdir. * glib/gdir.c (g_dir_close): Couple of small tweaks now that it is actually compiling... --- diff --git a/ChangeLog b/ChangeLog index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 79cf83c5..ec3d3b3d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +Sun Nov 4 20:45:21 2001 Owen Taylor + + * configure.in (CFLAGS): Add check for dirent.h + + * glib/glib.h glib/Makefile.am: Add gdir. + + * glib/gdir.c (g_dir_close): Couple of small tweaks + now that it is actually compiling... + Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to @@ -6,7 +15,7 @@ Sun Nov 4 20:29:31 2001 Owen Taylor * glib/gdir.[ch] (g_dir_close): Remove the boolean return value. What would you do if closing failed? What would the user do if you printed a warning - message "closing directory %d failed"? + message "closing directory %s failed"? 2001-11-04 Hans Breuer diff --git a/configure.in b/configure.in index 922f07e7..e28a1287 100644 --- a/configure.in +++ b/configure.in @@ -513,7 +513,7 @@ AC_MSG_RESULT($g_have_gnuc_varargs) AC_C_BIGENDIAN # check for header files -AC_CHECK_HEADERS([float.h limits.h pwd.h sys/param.h sys/poll.h sys/select.h]) +AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h sys/param.h sys/poll.h sys/select.h]) AC_CHECK_HEADERS([sys/time.h sys/times.h unistd.h values.h stdint.h sched.h]) # Checks for libcharset diff --git a/glib/Makefile.am b/glib/Makefile.am index 7efa518d..3aed58d3 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -41,6 +41,7 @@ libglib_1_3_la_SOURCES = \ gconvert.c \ gdataset.c \ gdate.c \ + gdir.c \ gerror.c \ gfileutils.c \ ghash.c \ @@ -102,6 +103,7 @@ glibsubinclude_HEADERS = \ gconvert.h \ gdataset.h \ gdate.h \ + gdir.h \ gerror.h \ gfileutils.h \ ghash.h \ diff --git a/glib/gdir.c b/glib/gdir.c index 14a8a994..25e1a6de 100644 --- a/glib/gdir.c +++ b/glib/gdir.c @@ -23,7 +23,9 @@ #include "config.h" +#include #include /* strerror, strcmp */ + #ifdef HAVE_DIRENT_H #include #endif @@ -128,9 +130,7 @@ g_dir_rewind (GDir *dir) void g_dir_close (GDir *dir) { - int ret = 0; - - g_return_val_if_fail (dir != NULL, FALSE); + g_return_if_fail (dir != NULL); closedir (dir->dir); g_free (dir); diff --git a/glib/glib.h b/glib/glib.h index 0febae39..f91d87ff 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include