Add check for dirent.h
authorOwen Taylor <otaylor@redhat.com>
Mon, 5 Nov 2001 01:47:31 +0000 (01:47 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 5 Nov 2001 01:47:31 +0000 (01:47 +0000)
Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>

* 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...

12 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
glib/Makefile.am
glib/gdir.c
glib/glib.h

index 79cf83c..ec3d3b3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 79cf83c..ec3d3b3 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 79cf83c..ec3d3b3 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 79cf83c..ec3d3b3 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 79cf83c..ec3d3b3 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 79cf83c..ec3d3b3 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 79cf83c..ec3d3b3 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 79cf83c..ec3d3b3 100644 (file)
@@ -1,3 +1,12 @@
+Sun Nov  4 20:45:21 2001  Owen Taylor  <otaylor@redhat.com>
+
+       * 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  <otaylor@redhat.com>
 
        * glib/gdir.[ch]: Indentation fixes, some rewriting of docs to
@@ -6,7 +15,7 @@ Sun Nov  4 20:29:31 2001  Owen Taylor  <otaylor@redhat.com>
        * 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  <hans@breuer.org>
 
index 922f07e..e28a128 100644 (file)
@@ -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
index 7efa518..3aed58d 100644 (file)
@@ -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         \
index 14a8a99..25e1a6d 100644 (file)
@@ -23,7 +23,9 @@
 
 #include "config.h"
 
+#include <errno.h>
 #include <string.h> /* strerror, strcmp */
+
 #ifdef HAVE_DIRENT_H
 #include <dirent.h>
 #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);
index 0febae3..f91d87f 100644 (file)
@@ -36,6 +36,7 @@
 #include <glib/gconvert.h>
 #include <glib/gdataset.h>
 #include <glib/gdate.h>
+#include <glib/gdir.h>
 #include <glib/gerror.h>
 #include <glib/gfileutils.h>
 #include <glib/ghash.h>