about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-18 00:34:47 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-18 00:34:47 +0000
commit56c55d5d4a8ef51ef424cbfcb9eca2b2fa95e419 (patch)
treef7a806a0fde858c7b387865ceb3eabad61e43ffd /sysdeps/unix
parent5d08d21845b284c3ad10aafec82cf85938229613 (diff)
downloadglibc-56c55d5d4a8ef51ef424cbfcb9eca2b2fa95e419.tar.gz
glibc-56c55d5d4a8ef51ef424cbfcb9eca2b2fa95e419.tar.xz
glibc-56c55d5d4a8ef51ef424cbfcb9eca2b2fa95e419.zip
Update.
	* dirent/dirent.h (telldir): Change return type to long int.
	* sysdeps/generic/telldir.c: Likewise.
	* sysdeps/mach/hurd/telldir.c: Likewise.
	* sysdeps/unix/telldir.c: Likewise.
	* sysdeps/unix/bsd/telldir.c: Likewise.  Fix locking problem.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/bsd/telldir.c10
-rw-r--r--sysdeps/unix/telldir.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/unix/bsd/telldir.c b/sysdeps/unix/bsd/telldir.c
index 29ef72c41e..4ce508c718 100644
--- a/sysdeps/unix/bsd/telldir.c
+++ b/sysdeps/unix/bsd/telldir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -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;
 
-  __libc_lock_lock (lock);
-
   new = malloc (sizeof *new);
   if (new == NULL)
-    return (off_t) -1;
+    return -1l;
+
+  __libc_lock_lock (lock);
 
   new->pos = dirp->filepos;
   new->offset = dirp->offset;
diff --git a/sysdeps/unix/telldir.c b/sysdeps/unix/telldir.c
index f0ad95fd7c..b1c7952c05 100644
--- a/sysdeps/unix/telldir.c
+++ b/sysdeps/unix/telldir.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@
 #include <dirstream.h>
 
 /* Return the current position of DIRP.  */
-off_t
+long int
 telldir (DIR *dirp)
 {
   return dirp->filepos;