]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add change from main branch.
authorUlrich Drepper <drepper@redhat.com>
Thu, 19 Aug 1999 21:00:36 +0000 (21:00 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 19 Aug 1999 21:00:36 +0000 (21:00 +0000)
dirent/dirent.h
sysdeps/generic/seekdir.c
sysdeps/generic/telldir.c
sysdeps/mach/hurd/seekdir.c
sysdeps/mach/hurd/telldir.c
sysdeps/unix/bsd/telldir.c
sysdeps/unix/seekdir.c
sysdeps/unix/telldir.c

index 139f41de7c44387a38a74c8ec03886624c3a2bcb..deb06fca6cf3edf43d384d4ffa2b306fbd4e68eb 100644 (file)
@@ -272,10 +272,28 @@ extern int versionsort64 __P ((__const __ptr_t __e1, __const __ptr_t __e2));
    Reading starts at offset *BASEP, and *BASEP is updated with the new
    position after reading.  Returns the number of bytes read; zero when at
    end of directory; or -1 for errors.  */
+
+fndef __USE_FILE_OFFSET64
 extern __ssize_t getdirentries __P ((int __fd, char *__restrict __buf,
                                     size_t __nbytes,
                                     __off_t *__restrict __basep));
+# else
+#  ifdef __REDIRECT
+extern __ssize_t __REDIRECT (getdirentries,
+                            __P ((int __fd, char *__restrict __buf,
+                                  size_t __nbytes,
+                                  __off_t *__restrict __basep)),
+                            getdirentries64);
+#  else
+#   define getdirentries getdirentries64
+#  endif
+# endif
 
+# ifdef __USE_LARGEFILE64
+extern __ssize_t getdirentries64 __P ((int __fd, char *__restrict __buf,
+                                      size_t __nbytes,
+                                      __off64_t *__restrict __basep));
+# endif
 
 #endif /* Use BSD or misc.  */
 
index c12d3af3c008afdf043e420669b6c3e06e7b7c90..19ec4e0175a0c4f04adeca82ae265d95308a1c51 100644 (file)
@@ -25,7 +25,7 @@
 void
 seekdir (dirp, pos)
      DIR *dirp;
-     off_t pos;
+     long int pos;
 {
   if (dirp == NULL)
     {
index 3400829cb76fe9cb8c267dc43c046adbcbcc2b31..ddd9003f08e09de1008e6a8a62393290c777d9b2 100644 (file)
 #include <dirent.h>
 
 /* Return the current position of DIRP.  */
-off_t
+long int
 telldir (dirp)
      DIR *dirp;
 {
   if (dirp == NULL)
     {
       __set_errno (EINVAL);
-      return -1;
+      return -1l;
     }
 
   __set_errno (ENOSYS);
-  return (off_t) -1;
+  return -1l;
 }
 
 
index 047b4cd11b11d35610d40090254f57bbedf5798c..49e80d7938d3d282595a5018ecdc4c83f53437ee 100644 (file)
@@ -27,7 +27,7 @@
 void
 seekdir (dirp, pos)
      DIR *dirp;
-     __off_t pos;
+     long int pos;
 {
   __libc_lock_lock (dirp->__lock);
   /* Change our entry index pointer to POS and discard any data already
index 0063ddf68870436bb1cd49af8a11b045effabec4..ed373fb190d27c9162fea72295e8d122505e6dab 100644 (file)
@@ -25,7 +25,7 @@
 
 /* Return the current position of DIRP.  */
 /* XXX should be __telldir ? */
-off_t
+long int
 telldir (dirp)
      DIR *dirp;
 {
index 29ef72c41e336a9181c0556bf1a587ea02a01ff5..d9799b0f9b25a85c0c55ec8572e97a56cf151848 100644 (file)
@@ -39,18 +39,18 @@ __libc_lock_define_initialized(static, lock) /* Locks above data.  */
 
 
 /* Return the current position of DIRP.  */
-off_t
+long int
 telldir (dirp)
      DIR *dirp;
 {
   struct record *new;
-  off_t pos;
+  long int pos;
 
   __libc_lock_lock (lock);
 
   new = malloc (sizeof *new);
   if (new == NULL)
-    return (off_t) -1;
+    return -1l;
 
   new->pos = dirp->filepos;
   new->offset = dirp->offset;
@@ -71,7 +71,7 @@ telldir (dirp)
 void
 seekdir (dirp, pos)
      DIR *dirp;
-     __off_t pos;
+     long int pos;
 {
   struct record *r, **prevr;
 
index caecbefd7812c7ab0c850e35e1c0ab9696d9977a..f9df9c18b4795df46a018e62b7e1308c87a31ff9 100644 (file)
 void
 seekdir (dirp, pos)
      DIR *dirp;
-     __off_t pos;
+     long int pos;
 {
   __libc_lock_lock (dirp->lock);
-  (void) __lseek(dirp->fd, pos, SEEK_SET);
+  (void) __lseek (dirp->fd, pos, SEEK_SET);
   dirp->size = 0;
   dirp->offset = 0;
   __libc_lock_unlock (dirp->lock);
index f0ad95fd7cacc2fe39a35e82375fc83a6fb4b4f0..bb898130defd8510117a36a7e741dcd39fd87f0e 100644 (file)
@@ -21,7 +21,7 @@
 #include <dirstream.h>
 
 /* Return the current position of DIRP.  */
-off_t
+long int
 telldir (DIR *dirp)
 {
   return dirp->filepos;