aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-11-04 03:00:40 +0000
committerUlrich Drepper <drepper@redhat.com>1997-11-04 03:00:40 +0000
commit1618c590382ef16b1942bf39a42aa683a050ff57 (patch)
treee36cbd52b4f65aa04764417892264eac7757e6eb /sysdeps
parent1cab5444231a4a1fab9c3abb107d22af4eb09327 (diff)
downloadglibc-1618c590382ef16b1942bf39a42aa683a050ff57.zip
glibc-1618c590382ef16b1942bf39a42aa683a050ff57.tar.gz
glibc-1618c590382ef16b1942bf39a42aa683a050ff57.tar.bz2
1997-11-04 Ulrich Drepper <drepper@cygnus.com> * manual/filesys.texi: Correct description of return value for readdir_r. * sysdeps/unix/readdir_r.c (__readdir_r): Return value of errno not -1 in error case. * sysdeps/generic/readdir_r.c (__readdir_r): Return ENOSYS not -1. Reported by Jim Meyering <meyering@eng.ascend.com>. 1997-11-02 Paul Eggert <eggert@twinsun.com> * strftime.c: Use host's underlying strftime to access locale-specific info. This is useful e.g. when building GNU Emacs under Solaris 2.6. (weekday_name, month_name): Omit if HAVE_STRFTIME. (my_strftime): New macro, which names the strftime function that this source file produces. (strftime): #undef if emacs is defined; this works around Emacs 20.2's method of compiling with -Dstrftime=emacs_strftime. Also, declare as a function returning size_t, for similar reasons. (my_strftime): If HAVE_STRFTIME, use underlying strftime to handle locale-dependent formats like %a and %Ec. 1997-11-02 Paul Eggert <eggert@twinsun.com> * strftime.c (memcpy_lowcase, memcpy_uppcase, strftime): Ensure that args to islower and isupper are valid unsigned chars, even if char is signed. 1997-11-04 Ulrich Drepper <drepper@cygnus.com> * assert/Makefile (headers): Add assert.h, necessary after patch to Makefiles. * ctype/Makefile (headers): Likewise. * pwd/Makefile (headers): Likewise. * grp/Makefile (headers): Likewise. Patch by NIIBE Yutaka <gniibe@mri.co.jp>. 1997-11-04 03:08 Ulrich Drepper <drepper@cygnus.com> * glibcbug.in: Add information about configured target. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>. * elf/dl-lookup.c (_dl_lookup_versioned_symbol): Be prepared for empty string as `reference_name' parameter. * elf/rtld.c: Don't set real program name in l_name of main object. * manual/creature.texi: Apply Paul Eggert's patch for better _POSIX_C_SOURCE description. * stdlib/strfmon.c: Fix numerous bugs in formatting. * time/strptime.c [%Y]: Treat all years, not only those which fit in time_t. [%Oy]: Really store value. Patches by Paul Eggert. * wcsmbs/wchar.h: Fix documentation bugs. Declare wcsdup only is __USE_GNU. 1997-11-03 02:48 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/bits/errno.h: Remove all error definitions. This is only meant as a stub. 1997-10-31 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/standalone/bits/errno.h: Copied from sysdeps/generic/bits/errno.h and added all know error codes that are used in glibc. 1997-11-03 02:23 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/make_siglist.c: Add comment to clarify use and make sure the correct _NSIG value is used. Patch by Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>. 1997-11-03 00:20 Ulrich Drepper <drepper@cygnus.com> * intl/localealias.c (read_alias_file): Correct handling of line reader which sometimes skipped complete lines (PR 205). Optimize a bit by using mempcpy. 1997-11-02 16:59 Philipp Thomas <kthomas@gwdg.de> * intl/localealias.c (read_alias_file): Correctly set map[].value instead of overwriting map[].alias 1997-11-02 15:32 Ulrich Drepper <drepper@cygnus.com> * libc.map: Add _IO_flockfile and _IO_funlockfile. Suggested by H.J. Lu <hjl@lucon.org>. 1997-11-02 15:17 Ulrich Drepper <drepper@cygnus.com> * elf/dl-error.c (_dl_signal_error): Use _strerror_internal instead of strerror. * assert/assert-perr.c: Use _strerror_internal directly instead of __strerror_r. Suggested by Joe Keane <jgk@jgk.org>. 1997-11-01 16:46 Zack Weinberg <zack@rabi.phys.columbia.edu> * configure.in: Check for gcc-2.7.2 -pipe bug and hack around it (PR 245). 1997-11-01 Paul Eggert <eggert@twinsun.com> * time/strptime.c (strptime_internal): Fix bug: %Oy forgot to assign tm_year. Do not restrict %Y to years less than 2037 even on 32-bit time_t hosts, as strptime returns an int tm_year, not a time_t, and it's possible for programs to use the year without having to use time_t. non-directories in the list (PR 203).
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/bits/errno.h17
-rw-r--r--sysdeps/generic/make_siglist.c8
-rw-r--r--sysdeps/generic/readdir_r.c2
-rw-r--r--sysdeps/standalone/bits/errno.h62
-rw-r--r--sysdeps/unix/readdir_r.c2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/Dist2
6 files changed, 79 insertions, 14 deletions
diff --git a/sysdeps/generic/bits/errno.h b/sysdeps/generic/bits/errno.h
index cb61da7..622c2c9 100644
--- a/sysdeps/generic/bits/errno.h
+++ b/sysdeps/generic/bits/errno.h
@@ -22,20 +22,15 @@
#undef __need_Emath
#define __Emath_defined 1
-# define EDOM 1
-# define ERANGE 2
+# define EDOM XXX <--- fill in what is actually needed
+# define ERANGE XXX <--- fill in what is actually needed
#endif
#ifdef _ERRNO_H
-# define ENOSYS 3
-# define EINVAL 4
-# define ESPIPE 5
-# define EBADF 6
-# define ENOMEM 7
-# define EACCES 8
-# define ENFILE 9
-# define EMFILE 10
-# define ENOMSG 11
+# error "Define here all the missing error messages for the port. These"
+# error "must match the numbers of the kernel."
+# define Exxxx XXX
+...
#endif
#define __set_errno(val) errno = (val)
diff --git a/sysdeps/generic/make_siglist.c b/sysdeps/generic/make_siglist.c
index b670baf..2cfd498 100644
--- a/sysdeps/generic/make_siglist.c
+++ b/sysdeps/generic/make_siglist.c
@@ -17,6 +17,11 @@
Boston, MA 02111-1307, USA. */
#include <stdio.h>
+
+/* Include signal.h now so that we can safely reinclude it again in
+ signame.c later on. We completely override the definitions, we
+ just have to be sure that the include guard in signal.h keeps it
+ from redefining the signal values. */
#include <signal.h>
/* Get this configuration's defns of the signal numbers. */
@@ -32,6 +37,9 @@
#define HAVE_PSIGNAL
#define sys_siglist my_siglist /* Avoid clash with signal.h. */
+#undef NSIG
+#define NSIG _NSIG /* make sure that the value from SIGNUM_H is used. */
+
#include "signame.c"
diff --git a/sysdeps/generic/readdir_r.c b/sysdeps/generic/readdir_r.c
index ae14d18..41bf87f 100644
--- a/sysdeps/generic/readdir_r.c
+++ b/sysdeps/generic/readdir_r.c
@@ -27,7 +27,7 @@ __readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
{
__set_errno (ENOSYS);
*result = NULL;
- return -1;
+ return ENOSYS;
}
weak_alias (__readdir_r, readdir_r)
diff --git a/sysdeps/standalone/bits/errno.h b/sysdeps/standalone/bits/errno.h
new file mode 100644
index 0000000..30eec43
--- /dev/null
+++ b/sysdeps/standalone/bits/errno.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 1991, 1994, 1996, 1997 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
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+/* This file defines the `errno' constants. */
+
+#if !defined __Emath_defined && (defined _ERRNO_H || defined __need_Emath)
+#undef __need_Emath
+#define __Emath_defined 1
+
+# define EDOM 1
+# define ERANGE 2
+#endif
+
+#ifdef _ERRNO_H
+# define ENOSYS 3
+# define EINVAL 4
+# define ESPIPE 5
+# define EBADF 6
+# define ENOMEM 7
+# define EACCES 8
+# define ENFILE 9
+# define EMFILE 10
+# define ENOMSG 11
+# define ENAMETOOLONG 12
+# define ELOOP 13
+# define ENOMSG 14
+# define E2BIG 15
+# define EINTR 16
+# define EILSEQ 17
+# define ENOEXEC 18
+# define ENOENT 19
+# define EPROTOTYPE 20
+# define ESRCH 21
+# define EPERM 22
+# define EEXIST 23
+# define ENOTDIR 24
+# define ESTALE 25
+# define ENOTTY 26
+# define EISDIR 27
+# define EOPNOTSUPP 28
+# define EAGAIN 29
+# define EIO 30
+# define ENOSPC 31
+# define EBUSY 32
+#endif
+
+#define __set_errno(val) errno = (val)
diff --git a/sysdeps/unix/readdir_r.c b/sysdeps/unix/readdir_r.c
index fa26db6..a4462f7 100644
--- a/sysdeps/unix/readdir_r.c
+++ b/sysdeps/unix/readdir_r.c
@@ -103,6 +103,6 @@ __readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
__libc_lock_unlock (dirp->lock);
- return dp != NULL ? 0 : -1;
+ return dp != NULL ? 0 : errno;
}
weak_alias (__readdir_r, readdir_r)
diff --git a/sysdeps/unix/sysv/linux/alpha/Dist b/sysdeps/unix/sysv/linux/alpha/Dist
index ebbf300..715fda7 100644
--- a/sysdeps/unix/sysv/linux/alpha/Dist
+++ b/sysdeps/unix/sysv/linux/alpha/Dist
@@ -12,4 +12,4 @@ kernel_termios.h
sys/acct.h
sys/io.h
sys/procfs.h
-xstatconv.c \ No newline at end of file
+xstatconv.c