From: Ulrich Drepper Date: Wed, 18 Aug 1999 00:34:47 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/pre-glibc-2_1_3~480 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=56c55d5d4a8ef51ef424cbfcb9eca2b2fa95e419;p=thirdparty%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 02085ad40c6..02f2921abfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-08-17 Ulrich Drepper + * 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. + * locale/weight.h: Set errno if an invalid character is found. 1999-08-17 Andreas Jaeger diff --git a/dirent/dirent.h b/dirent/dirent.h index 375d66ef30a..472b4804afe 100644 --- a/dirent/dirent.h +++ b/dirent/dirent.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,94,95,96,97,98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,94,95,96,97,98,99 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 @@ -174,7 +174,7 @@ extern void rewinddir __P ((DIR *__dirp)); extern void seekdir __P ((DIR *__dirp, __off_t __pos)); /* Return the current position of DIRP. */ -extern __off_t telldir __P ((DIR *__dirp)); +extern long int telldir __P ((DIR *__dirp)); #endif #if defined __USE_BSD || defined __USE_MISC diff --git a/sysdeps/generic/telldir.c b/sysdeps/generic/telldir.c index 3400829cb76..3a00bd836b1 100644 --- a/sysdeps/generic/telldir.c +++ b/sysdeps/generic/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 @@ -22,18 +22,18 @@ #include /* 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; } diff --git a/sysdeps/mach/hurd/telldir.c b/sysdeps/mach/hurd/telldir.c index 0063ddf6887..d2ffe036508 100644 --- a/sysdeps/mach/hurd/telldir.c +++ b/sysdeps/mach/hurd/telldir.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1994, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1994, 1995, 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 @@ -25,7 +25,7 @@ /* Return the current position of DIRP. */ /* XXX should be __telldir ? */ -off_t +long int telldir (dirp) DIR *dirp; { diff --git a/sysdeps/unix/bsd/telldir.c b/sysdeps/unix/bsd/telldir.c index 29ef72c41e3..4ce508c718f 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 f0ad95fd7ca..b1c7952c05d 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 /* Return the current position of DIRP. */ -off_t +long int telldir (DIR *dirp) { return dirp->filepos;