From jakub@redhat.com Thu Feb 1 07:44:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 01 Feb 2001 07:44:00 -0000 Subject: [PATCH] Fix getaddrinfo Message-ID: <20010201164657.G680@sunsite.ms.mff.cuni.cz> Hi! Since gaih_typeproto's name is now 4byte array, not char pointer, it makes no sense to compare it to NULL because it is always non-NULL. We have to test whether it is "" string instead. 2001-02-01 Jakub Jelinek * sysdeps/posix/getaddrinfo.c (gaih_local, gaih_inet): Replace all tp->name tests with tp->name[0] tests. --- libc/sysdeps/posix/getaddrinfo.c.jj Wed Jan 31 16:35:22 2001 +++ libc/sysdeps/posix/getaddrinfo.c Thu Feb 1 17:43:42 2001 @@ -151,7 +151,7 @@ gaih_local (const char *name, const stru { const struct gaih_typeproto *tp = gaih_inet_typeproto + 1; - while (tp->name != NULL + while (tp->name[0] && ((tp->protoflag & GAI_PROTO_NOSERVICE) != 0 || (req->ai_socktype != 0 && req->ai_socktype != tp->socktype) || (req->ai_protocol != 0 @@ -159,7 +159,7 @@ gaih_local (const char *name, const stru && req->ai_protocol != tp->protocol))) ++tp; - if (tp->name == NULL) + if (! tp->name[0]) { if (req->ai_socktype) return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE); @@ -324,14 +324,14 @@ gaih_inet (const char *name, const struc { ++tp; - while (tp->name != NULL + while (tp->name[0] && ((req->ai_socktype != 0 && req->ai_socktype != tp->socktype) || (req->ai_protocol != 0 && !(tp->protoflag & GAI_PROTO_PROTOANY) && req->ai_protocol != tp->protocol))) ++tp; - if (tp->name == NULL) + if (! tp->name[0]) { if (req->ai_socktype) return (GAIH_OKIFUNSPEC | -EAI_SOCKTYPE); @@ -347,7 +347,7 @@ gaih_inet (const char *name, const struc if (service->num < 0) { - if (tp->name != NULL) + if (tp->name[0]) { st = (struct gaih_servtuple *) __alloca (sizeof (struct gaih_servtuple)); @@ -358,7 +358,7 @@ gaih_inet (const char *name, const struc else { struct gaih_servtuple **pst = &st; - for (tp++; tp->name; tp++) + for (tp++; tp->name[0]; tp++) { struct gaih_servtuple *newp; @@ -414,7 +414,7 @@ gaih_inet (const char *name, const struc /* Neither socket type nor protocol is set. Return all socket types we know about. */ struct gaih_servtuple **lastp = &st; - for (++tp; tp->name != NULL; ++tp) + for (++tp; tp->name[0]; ++tp) { struct gaih_servtuple *newp; Jakub From drepper@redhat.com Thu Feb 1 22:34:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 01 Feb 2001 22:34:00 -0000 Subject: DF_1_INTIFIRST Message-ID: I've implemented the DF_1_INTIFIRST flag now and it's being used in the thread library (and only there, it's specially for this DSO). The test case Jakub sent works for me now. On i686. But there is more work left. All architectures which have separate initfini.c files need work. There is a file named pt-initfini.c required for architecture which has a special initfini.c file. So, get working (HPPA, IA64, SH, S390). -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Feb 2 00:13:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 02 Feb 2001 00:13:00 -0000 Subject: [PATCH] Fix getaddrinfo References: <20010201164657.G680@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > Since gaih_typeproto's name is now 4byte array, not char pointer, it makes > no sense to compare it to NULL because it is always non-NULL. We have to > test whether it is "" string instead. Right. Thanks for the patch. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@valinux.com Sat Feb 3 00:07:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Sat, 03 Feb 2001 00:07:00 -0000 Subject: DF_1_INTIFIRST References: Message-ID: <20010203000723.A31830@valinux.com> On Thu, Feb 01, 2001 at 10:34:46PM -0800, Ulrich Drepper wrote: > I've implemented the DF_1_INTIFIRST flag now and it's being used in > the thread library (and only there, it's specially for this DSO). The > test case Jakub sent works for me now. On i686. May I make a suggestion? Since initfini.c and pt-initfini.c are very similar, can we combine them into one and use #ifdef PT_INITFINI_C #endif to compile it for initfini.c and pt-initfini.c? It will help HPPA, IA64, SH, S390 a lot since their initfini.cs are hand-written. We can write one pt-initfini.c as #define PT_INITFINI_C #include H.J. From drepper@redhat.com Sat Feb 3 00:17:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 03 Feb 2001 00:17:00 -0000 Subject: DF_1_INTIFIRST References: <20010203000723.A31830@valinux.com> Message-ID: "H . J . Lu" writes: > May I make a suggestion? Since initfini.c and pt-initfini.c are > very similar, can we combine them into one and use I don't want to have this interdependency between the libc itself and the add-on. There might (and will be) other thread implementations which don't need this. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Sat Feb 3 11:28:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Sat, 03 Feb 2001 11:28:00 -0000 Subject: align stack to 16 bytes for SSE on i386 Message-ID: We should align the stack to a 16-byte boundary for SSE. Ok to commit? Andreas 2001-02-03 Andreas Jaeger * sysdeps/i386/elf/start.S (_start): Align stack to 16-byte boundary for SSE/SSE-2 alignment. ============================================================ Index: sysdeps/i386/elf/start.S --- sysdeps/i386/elf/start.S 2000/06/13 07:27:21 1.13 +++ sysdeps/i386/elf/start.S 2001/02/03 19:26:18 @@ -51,10 +51,11 @@ popl %esi /* Pop the argument count. */ movl %esp, %ecx /* argv starts just at the current stack top.*/ - /* Before pushing the arguments align the stack to a double word - boundary to avoid penalties from misaligned accesses. Thanks - to Edward Seidl for pointing this out. */ - andl $0xfffffff8, %esp + /* Before pushing the arguments align the stack to a 16-byte + (SSE needs 16-byte alignment) boundary to avoid penalties from + misaligned accesses. Thanks to Edward Seidl + for pointing this out. */ + andl $0xfffffff0, %esp pushl %eax /* Push garbage because we allocate 28 more bytes. */ -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From hjl@valinux.com Sat Feb 3 11:59:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Sat, 03 Feb 2001 11:59:00 -0000 Subject: DF_1_INTIFIRST References: <20010203000723.A31830@valinux.com> Message-ID: <20010203115905.A12167@valinux.com> On Sat, Feb 03, 2001 at 12:17:00AM -0800, Ulrich Drepper wrote: > "H . J . Lu" writes: > > > May I make a suggestion? Since initfini.c and pt-initfini.c are > > very similar, can we combine them into one and use > > I don't want to have this interdependency between the libc itself and > the add-on. There might (and will be) other thread implementations > which don't need this. > The interdependency is there already. I really don't like code duplications. We may forget to fix the other one when we fix a bug. How about something like this? -- H.J. Lu (hjl@valinux.com) --- Index: sysdeps/generic/initfini.c =================================================================== RCS file: /work/cvs/gnu/glibc/sysdeps/generic/initfini.c,v retrieving revision 1.1.1.5 diff -u -p -r1.1.1.5 initfini.c --- sysdeps/generic/initfini.c 2000/11/21 02:15:46 1.1.1.5 +++ sysdeps/generic/initfini.c 2001/02/03 19:57:34 @@ -1,5 +1,5 @@ /* Special .init and .fini section support. - Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it @@ -62,7 +62,16 @@ asm ("\n/*@TESTS_END*/"); /* The beginning of _init: */ asm ("\n/*@_init_PROLOG_BEGINS*/"); +#ifdef CALL_INTIFIRST static void +call_initialize_minimal (void) +{ + extern void CALL_INTIFIRST (); + CALL_INTIFIRST () +} +#endif + +static void call_gmon_start(void) { extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ @@ -77,6 +86,10 @@ extern void _init (void); void _init (void) { +#ifdef CALL_INTIFIRST + call_initialize_minimal (); +#endif + /* We cannot use the normal constructor mechanism in gcrt1.o because it appears before crtbegin.o in the link, so the header elt of .ctors would come after the elt for __gmon_start__. One approach is for From drepper@redhat.com Sat Feb 3 12:48:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 03 Feb 2001 12:48:00 -0000 Subject: align stack to 16 bytes for SSE on i386 References: Message-ID: Andreas Jaeger writes: > We should align the stack to a 16-byte boundary for SSE. > > Ok to commit? Iff 16 byte alignment is really needed. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Sat Feb 3 12:51:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 03 Feb 2001 12:51:00 -0000 Subject: DF_1_INTIFIRST References: <20010203000723.A31830@valinux.com> <20010203115905.A12167@valinux.com> Message-ID: "H . J . Lu" writes: > The interdependency is there already. Where? > I really don't like code duplications. We may forget to fix the > other one when we fix a bug. That's always a risk but hard-coding dependencies is worse since they are tight to a specific implementation and not of general value. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Sat Feb 3 13:30:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Sat, 03 Feb 2001 13:30:00 -0000 Subject: align stack to 16 bytes for SSE on i386 References: Message-ID: Ulrich Drepper writes: > Andreas Jaeger writes: > > > We should align the stack to a 16-byte boundary for SSE. > > > > Ok to commit? > > Iff 16 byte alignment is really needed. According to the Pentium 4 documentation: Yes. I'll commit it now, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Mon Feb 5 09:02:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Mon, 05 Feb 2001 09:02:00 -0000 Subject: __fcntl and __open are internal Message-ID: __fcntl and __open are internal interfaces, I don't see a need to export them. Can I commit the appended patch? Andreas 2001-02-05 Andreas Jaeger * io/fcntl.h: Move __fcntl and __open to... * include/fcntl.h: ...here. ============================================================ Index: io/fcntl.h --- io/fcntl.h 2000/04/14 07:40:53 1.23 +++ io/fcntl.h 2001/02/05 17:01:33 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,94,95,96,97,98,99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 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 @@ -57,13 +57,11 @@ /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. */ -extern int __fcntl (int __fd, int __cmd, ...) __THROW; extern int fcntl (int __fd, int __cmd, ...) __THROW; /* Open FILE and return a new file descriptor for it, or -1 on error. OFLAG determines the type of access used. If O_CREAT is on OFLAG, the third argument is taken as a `mode_t', the mode of the created file. */ -extern int __open (__const char *__file, int __oflag, ...) __THROW; #ifndef __USE_FILE_OFFSET64 extern int open (__const char *__file, int __oflag, ...) __THROW; #else ============================================================ Index: include/fcntl.h --- include/fcntl.h 1999/12/19 19:50:33 1.6 +++ include/fcntl.h 2001/02/05 17:01:33 @@ -6,5 +6,7 @@ extern int __libc_open64 (const char *file, int oflag, ...); extern int __libc_open (const char *file, int oflag, ...); extern int __libc_fcntl (int fd, int cmd, ...); +extern int __open (__const char *__file, int __oflag, ...); +extern int __fcntl (int __fd, int __cmd, ...) __THROW; #endif -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From drepper@redhat.com Mon Feb 5 09:10:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 05 Feb 2001 09:10:00 -0000 Subject: __fcntl and __open are internal References: Message-ID: Andreas Jaeger writes: > __fcntl and __open are internal interfaces, I don't see a need to > export them. > > Can I commit the appended patch? Looks fine. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Mon Feb 5 09:22:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Mon, 05 Feb 2001 09:22:00 -0000 Subject: __sigaction declaration Message-ID: And one more internal prototype that should be moved. Ok to commit? Andreas 2001-02-05 Andreas Jaeger * signal/signal.h: Move __sigaction from here to... * include/signal.h: ...here. ============================================================ Index: include/signal.h --- include/signal.h 2000/12/27 07:54:56 1.7 +++ include/signal.h 2001/02/05 17:21:57 @@ -7,6 +7,8 @@ /* Now define the internal interfaces. */ extern __sighandler_t __bsd_signal (int __sig, __sighandler_t __handler); extern int __kill (__pid_t __pid, int __sig); +extern int __sigaction (int __sig, __const struct sigaction *__restrict __act, + struct sigaction *__restrict __oact); extern int __sigblock (int __mask); extern int __sigsetmask (int __mask); extern int __sigprocmask (int __how, ============================================================ Index: signal/signal.h --- signal/signal.h 2001/01/27 19:23:32 1.61 +++ signal/signal.h 2001/02/05 17:21:58 @@ -240,8 +240,6 @@ extern int sigsuspend (__const sigset_t *__set) __THROW; /* Get and/or set the action for signal SIG. */ -extern int __sigaction (int __sig, __const struct sigaction *__restrict __act, - struct sigaction *__restrict __oact) __THROW; extern int sigaction (int __sig, __const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __THROW; -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From drepper@redhat.com Mon Feb 5 09:56:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 05 Feb 2001 09:56:00 -0000 Subject: __sigaction declaration References: Message-ID: Andreas Jaeger writes: > And one more internal prototype that should be moved. > > Ok to commit? I think it's OK. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Mon Feb 5 12:58:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Mon, 05 Feb 2001 12:58:00 -0000 Subject: test for ftello64 and fseeko64 Message-ID: I got a bugreport for glibc 2.1.3 that fseeko/ftello64 are not working. I checked that they're working with glibc 2.2 and like to add the following check to glibc 2.2. So far there's no test at all for fseeko64 and ftello64 in glibc. Ok to commit? Andreas 2001-02-05 Andreas Jaeger * io/test-lfs.c (do_test): Test lseek64 return value, call test_ftello. (test_ftello): New function to test ftello64 and fseeko64. ============================================================ Index: io/test-lfs.c --- io/test-lfs.c 2001/01/08 22:26:19 1.6 +++ io/test-lfs.c 2001/02/05 20:45:49 @@ -88,6 +88,53 @@ } } +static void +test_ftello (void) +{ + FILE *f; + int ret; + off64_t pos; + + f = fopen64 (name, "w"); + + ret = fseeko64 (f, TWO_GB+100, SEEK_SET); + if (ret == -1 && errno == ENOSYS) + { + error (0, errno, "fseeko is not supported"); + exit (EXIT_SUCCESS); + } + if (ret == -1 && errno == EINVAL) + { + error (0, errno, "LFS seems not to be supported "); + exit (EXIT_SUCCESS); + } + if (ret == -1) + { + error (0, errno, "fseeko64 failed with error: "); + exit (EXIT_FAILURE); + } + + ret = fwrite ("Hello", 1, 5, f); + if (ret == -1 && errno == EINVAL) + { + error (0, errno, "LFS seems not to be supported."); + exit (EXIT_SUCCESS); + } + + if (ret != 5) + error (EXIT_FAILURE, errno, "cannot write test string to large file"); + + pos = ftello64 (f); + + if (pos != TWO_GB+105) + { + error (0, 0, "ftello64 gives wrong result."); + exit (EXIT_FAILURE); + } + + fclose (f); +} + int do_test (int argc, char *argv[]) { @@ -105,6 +152,11 @@ error (0, errno, "LFS seems not to be supported "); exit (EXIT_SUCCESS); } + if (ret == -1) + { + error (0, errno, "lseek64 failed with error: "); + exit (EXIT_FAILURE); + } ret = write (fd, "Hello", 5); if (ret == -1 && errno == EINVAL) @@ -131,5 +183,7 @@ error (EXIT_FAILURE, 0, "stat reported size %lld instead of %lld.", (long long int) statbuf.st_size, (TWO_GB + 100 + 5)); + test_ftello (); + return 0; } -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From drepper@redhat.com Mon Feb 5 13:22:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 05 Feb 2001 13:22:00 -0000 Subject: test for ftello64 and fseeko64 References: Message-ID: Andreas Jaeger writes: OK, except > + ret = fseeko64 (f, TWO_GB+100, SEEK_SET); > + if (ret == -1 && errno == ENOSYS) > + { > + error (0, errno, "fseeko is not supported"); should be fseeko64 in the string. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Tue Feb 6 00:41:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 00:41:00 -0000 Subject: Move __vsnprintf Message-ID: Here's another internal function. Ok to commit? Andreas 2001-02-06 Andreas Jaeger * libio/stdio.h: Move __vsnprintf from here to... * include/stdio.h: ...here. ============================================================ Index: libio/stdio.h --- libio/stdio.h 2001/01/28 09:36:21 1.68 +++ libio/stdio.h 2001/02/06 08:39:35 @@ -293,9 +293,6 @@ __const char *__restrict __format, ...) __THROW __attribute__ ((__format__ (__printf__, 3, 4))); -extern int __vsnprintf (char *__restrict __s, size_t __maxlen, - __const char *__restrict __format, _G_va_list __arg) - __THROW __attribute__ ((__format__ (__printf__, 3, 0))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, __const char *__restrict __format, _G_va_list __arg) __THROW __attribute__ ((__format__ (__printf__, 3, 0))); -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Tue Feb 6 00:48:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 00:48:00 -0000 Subject: Move __on_exit Message-ID: Ok to commit? Andreas 2001-02-06 Andreas Jaeger * stdlib/stdlib.h: Move __on_exit from here to... * include/stdlib.h: ...here. ============================================================ Index: include/stdlib.h --- include/stdlib.h 2001/01/27 08:20:58 1.19 +++ include/stdlib.h 2001/02/06 08:47:08 @@ -54,6 +54,8 @@ extern void _quicksort (void *const pbase, size_t total_elems, size_t size, __compar_fn_t cmp); +extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg); + extern int __cxa_atexit (void (*func) (void *), void *arg, void *d); extern void __cxa_finalize (void *d); ============================================================ Index: stdlib/stdlib.h --- stdlib/stdlib.h 2001/01/27 07:05:36 1.93 +++ stdlib/stdlib.h 2001/02/06 08:47:08 @@ -568,8 +568,6 @@ #ifdef __USE_MISC /* Register a function to be called with the status given to `exit' and the given argument. */ -extern int __on_exit (void (*__func) (int __status, void *__arg), void *__arg) - __THROW; extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __THROW; #endif -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Tue Feb 6 00:57:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 00:57:00 -0000 Subject: Move __ffs and __strerror_r Message-ID: Ok to commit? Andreas 2001-02-06 Andreas Jaeger * string/string.h: Move __ffs and __strerror_r from here to... * include/string.h: ...here. ============================================================ Index: string/string.h --- string/string.h 2000/10/20 05:59:51 1.78 +++ string/string.h 2001/02/06 08:56:51 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991,92,93,95,96,97,98,99, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,95,96,97,98,99,2000,2001 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 @@ -230,7 +230,6 @@ #ifdef __USE_MISC /* Reentrant version of `strerror'. If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ -extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW; extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW; #endif @@ -257,7 +256,6 @@ /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ -extern int __ffs (int __i) __THROW __attribute__ ((const)); extern int ffs (int __i) __THROW __attribute__ ((const)); /* The following two functions are non-standard but necessary for non-32 bit ============================================================ Index: include/string.h --- include/string.h 2000/10/20 06:00:06 1.13 +++ include/string.h 2001/02/06 08:56:51 @@ -39,7 +39,11 @@ extern void *__memchr (__const void *__s, int __c, size_t __n) __attribute_pure__; - + +extern int __ffs (int __i) __attribute__ ((const)); + +extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen); + /* Now the real definitions. We do this here since some of the functions above are defined as macros in the headers. */ #include -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Tue Feb 6 01:03:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 01:03:00 -0000 Subject: Move __wait Message-ID: Ok to commit? Andreas 2001-02-06 Andreas Jaeger * posix/sys/wait.h: Move __wait from here to... * include/sys/wait.h: ...here. ============================================================ Index: include/sys/wait.h --- include/sys/wait.h 2000/12/27 17:17:41 1.6 +++ include/sys/wait.h 2001/02/06 09:02:59 @@ -6,6 +6,7 @@ int __options); extern __pid_t __libc_waitpid (pid_t __pid, int *__stat_loc, int __options); extern __pid_t __libc_wait (int *__stat_loc); +extern __pid_t __wait (__WAIT_STATUS __stat_loc); extern __pid_t __wait3 (__WAIT_STATUS __stat_loc, int __options, struct rusage * __usage); extern __pid_t __wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, ============================================================ Index: posix/sys/wait.h --- posix/sys/wait.h 2001/01/28 04:12:09 1.33 +++ posix/sys/wait.h 2001/02/06 09:02:59 @@ -106,7 +106,6 @@ /* Wait for a child to die. When one does, put its status in *STAT_LOC and return its process ID. For errors, return (pid_t) -1. */ -extern __pid_t __wait (__WAIT_STATUS __stat_loc) __THROW; extern __pid_t wait (__WAIT_STATUS __stat_loc) __THROW; #ifdef __USE_BSD -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Tue Feb 6 01:17:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 01:17:00 -0000 Subject: move __wcslen Message-ID: Ok to commit? Andreas 2001-02-06 Andreas Jaeger * wcsmbs/wchar.h: Move __wcslen from here to... * include/wchar.h: ...here. ============================================================ Index: include/wchar.h --- include/wchar.h 2000/09/14 01:36:27 1.10 +++ include/wchar.h 2001/02/06 09:17:23 @@ -8,6 +8,7 @@ extern int __wcsncasecmp (__const wchar_t *__s1, __const wchar_t *__s2, size_t __n) __attribute_pure__; +extern size_t __wcslen (__const wchar_t *__s) __attribute_pure__; extern size_t __wcsnlen (__const wchar_t *__s, size_t __maxlen) __attribute_pure__; extern wint_t __btowc (int __c); ============================================================ Index: wcsmbs/wchar.h --- wcsmbs/wchar.h 2001/01/25 08:42:14 1.44 +++ wcsmbs/wchar.h 2001/02/06 09:17:24 @@ -217,7 +217,6 @@ wchar_t **__restrict __ptr) __THROW; /* Return the number of wide characters in S. */ -extern size_t __wcslen (__const wchar_t *__s) __THROW __attribute_pure__; extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__; #ifdef __USE_GNU -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Tue Feb 6 01:22:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 01:22:00 -0000 Subject: Cleanup wctype.h Message-ID: Ok to commit? Andreas 2001-02-06 Andreas Jaeger * wctype/wctype.h: Move internal interfaces from here to... * include/wctype.h: ...here. ============================================================ Index: wctype/wctype.h --- wctype/wctype.h 2000/09/16 05:38:37 1.30 +++ wctype/wctype.h 2001/02/06 09:22:21 @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001 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 @@ -175,12 +175,10 @@ /* Construct value that describes a class of wide characters identified by the string argument PROPERTY. */ -extern wctype_t __wctype (__const char *__property) __THROW; extern wctype_t wctype (__const char *__property) __THROW; /* Determine whether the wide-character WC has the property described by DESC. */ -extern int __iswctype (wint_t __wc, wctype_t __desc) __THROW; extern int iswctype (wint_t __wc, wctype_t __desc) __THROW; #if __GNUC__ >= 2 && defined __OPTIMIZE__ @@ -255,9 +253,6 @@ /* Converts an lowercase letter to the corresponding uppercase letter. */ extern wint_t towupper (wint_t __wc) __THROW; - -/* Map the wide character WC using the mapping described by DESC. */ -extern wint_t __towctrans (wint_t __wc, wctrans_t __desc) __THROW; #if __GNUC__ >= 2 && defined __OPTIMIZE__ /* The tables are always organized in a way which allows direct access ============================================================ Index: include/wctype.h --- include/wctype.h 1999/10/19 13:52:30 1.3 +++ include/wctype.h 2001/02/06 09:22:21 @@ -2,6 +2,11 @@ #include +/* Internal interfaces. */ extern int __iswspace (wint_t __wc); +extern int __iswctype (wint_t __wc, wctype_t __desc); +extern wctype_t __wctype (__const char *__property); +extern wint_t __towctrans (wint_t __wc, wctrans_t __desc); + #endif -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From drepper@redhat.com Tue Feb 6 01:32:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 01:32:00 -0000 Subject: Move __vsnprintf References: Message-ID: Andreas Jaeger writes: > Here's another internal function. Ok to commit? Yes. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Feb 6 01:35:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 01:35:00 -0000 Subject: Move __on_exit References: Message-ID: Andreas Jaeger writes: > Ok to commit? Yes. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Feb 6 01:36:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 01:36:00 -0000 Subject: Move __ffs and __strerror_r References: Message-ID: Andreas Jaeger writes: > Ok to commit? They are not used anymore? If not it's OK. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Feb 6 01:37:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 01:37:00 -0000 Subject: Move __wait References: Message-ID: Andreas Jaeger writes: > Ok to commit? Yes. Basically you can commit all these changes if the function does not appear in any Versions file. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Tue Feb 6 01:38:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 01:38:00 -0000 Subject: Final move Message-ID: Here's one more patch to move a function to an internal header. If you wondered why I did this: I've went through the LSB draft and noticed these functions mentioned there the functions as required functions - and decided that they should not be part of LSB since they're really internal to glibc. I'll send patches to LSB for this later today. Andreas 2001-02-06 Andreas Jaeger * sysdeps/pthread/pthread.h: Move __pthread_initialize from here to... * internals.h: ...here. ============================================================ Index: linuxthreads/internals.h --- linuxthreads/internals.h 2000/12/27 17:15:56 1.58 +++ linuxthreads/internals.h 2001/02/06 09:36:20 @@ -539,4 +539,7 @@ extern void __linuxthreads_death_event (void); extern void __linuxthreads_reap_event (void); +/* This function is called to initialize the pthread library. */ +extern void __pthread_initialize (void); + #endif /* internals.h */ ============================================================ Index: linuxthreads/sysdeps/pthread/pthread.h --- linuxthreads/sysdeps/pthread/pthread.h 2001/01/28 08:52:11 1.29 +++ linuxthreads/sysdeps/pthread/pthread.h 2001/02/06 09:36:20 @@ -672,10 +672,6 @@ extern void pthread_kill_other_threads_np (void) __THROW; - -/* This function is called to initialize the pthread library. */ -extern void __pthread_initialize (void) __THROW; - __END_DECLS #endif /* pthread.h */ -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Tue Feb 6 01:42:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 01:42:00 -0000 Subject: Move __wait References: Message-ID: Ulrich Drepper writes: > Andreas Jaeger writes: > > > Ok to commit? > > Yes. Basically you can commit all these changes if the function does > not appear in any Versions file. Some do appear in a Versions file (e.g. __wait and __ffs do) but no external header references them, e.g. a recursive grep in /usr/include doesn't show any usage of them. They might be used by libpthread or another library but they should not be used by any user program. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From aj@suse.de Tue Feb 6 02:37:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 06 Feb 2001 02:37:00 -0000 Subject: prototypes patch Message-ID: Compiling glibc I noticed some warnings and corrected them with the appended patch. I'll commit this now Andreas 2001-02-06 Andreas Jaeger * elf/firstobj.c: Add prototype. * posix/regex.c (convert_mbs_to_wcs): Make static, add prototype (truncate_wchar): Likewise. ============================================================ Index: elf/firstobj.c --- elf/firstobj.c 2001/02/02 06:53:32 1.1 +++ elf/firstobj.c 2001/02/06 10:31:26 @@ -1,5 +1,7 @@ #include +extern int foo (void); + int foo (void) { ============================================================ Index: posix/regex.c --- posix/regex.c 2001/02/02 08:46:45 1.85 +++ posix/regex.c 2001/02/06 10:31:28 @@ -1158,7 +1158,11 @@ This assume invalid multibyte sequences as binary data. We assume offset_buffer and is_binary is already allocated enough space. */ -size_t + +static size_t convert_mbs_to_wcs (CHAR_TYPE *dest, const unsigned char* src, + size_t len, int *offset_buffer, + int *is_binary); +static size_t convert_mbs_to_wcs (dest, src, len, offset_buffer, is_binary) CHAR_TYPE *dest; const unsigned char* src; @@ -4525,8 +4529,10 @@ #ifdef MBS_SUPPORT /* local function for re_compile_fastmap. truncate wchar_t character to char. */ -unsigned char -truncate_wchar(c) +static unsigned char truncate_wchar (CHAR_TYPE c); + +static unsigned char +truncate_wchar (c) CHAR_TYPE c; { unsigned char buf[MB_LEN_MAX]; -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From schwab@suse.de Tue Feb 6 04:40:00 2001 From: schwab@suse.de (Andreas Schwab) Date: Tue, 06 Feb 2001 04:40:00 -0000 Subject: Useless kernel header includes Message-ID: The file sysdeps/unix/sysv/linux/ia64/ioperm.c includes some kernel headers that are not needed (any more). Ok to commit? 2001-02-06 Andreas Schwab * sysdeps/unix/sysv/linux/ia64/ioperm.c: Don't include kernel headers. --- sysdeps/unix/sysv/linux/ia64/ioperm.c.~1.1.~ Thu Jun 29 21:20:18 2000 +++ sysdeps/unix/sysv/linux/ia64/ioperm.c Tue Feb 6 11:56:24 2001 @@ -36,9 +36,6 @@ #include #include -#include -#include - #define MAX_PORT 0x10000 /* Andreas. -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From schwab@suse.de Tue Feb 6 06:28:00 2001 From: schwab@suse.de (Andreas Schwab) Date: Tue, 06 Feb 2001 06:28:00 -0000 Subject: timezone/Makefile makes wrong assumptions Message-ID: The rules to install the timezone files assumes that $(inst_zonedir) == $(inst_datadir)/zoneinfo. This may be wrong if you want these files to reside in some different location. The following patch fixes this, except that it still assumes that $(inst_zonedir) ends in zone*, which is probably a reasonable assumption. OK to commit? Andreas. 2001-02-06 Andreas Schwab * timezone/Makefile: Don't assume that $(inst_zonedir) is a subdir of $(inst_datadir). --- timezone/Makefile.~1.19.~ Tue Oct 17 09:51:06 2000 +++ timezone/Makefile Tue Feb 6 15:21:08 2001 @@ -104,13 +104,13 @@ echo '$$(addprefix $$(inst_zonedir)/,$$($*-zones)): \' ;\ echo '$$(foreach t,$$(tzbases),$$(addprefix $$(inst_zonedir)/,$$($$t-zones)))' ;\ fi ;\ - echo '$$(addprefix $$(inst_datadir)/zone%/right/,$$($*-zones)): \' ;\ + echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/right/,$$($*-zones)): \' ;\ echo '$< $$(objpfx)zic leapseconds yearistype' ;\ echo ' $$(tzcompile)' ;\ - echo '$$(addprefix $$(inst_datadir)/zone%/posix/,$$($*-zones)): \' ;\ + echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/posix/,$$($*-zones)): \' ;\ echo '$< $$(objpfx)zic /dev/null yearistype' ;\ echo ' $$(tzcompile)' ;\ - echo '$$(addprefix $$(inst_datadir)/zone%/,$$($*-zones)): \' ;\ + echo '$$(addprefix $$(dir $$(inst_zonedir))zone%/,$$($*-zones)): \' ;\ echo '$< $$(objpfx)zic $$(leapseconds) yearistype' ;\ echo ' $$(tzcompile)' ;\ echo 'endif' ;\ -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From drepper@redhat.com Tue Feb 6 09:12:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 09:12:00 -0000 Subject: Useless kernel header includes References: Message-ID: Andreas Schwab writes: > The file sysdeps/unix/sysv/linux/ia64/ioperm.c includes some kernel > headers that are not needed (any more). Ok to commit? Yep. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Feb 6 09:20:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 09:20:00 -0000 Subject: timezone/Makefile makes wrong assumptions References: Message-ID: Andreas Schwab writes: > OK to commit? I don't see why this can possibly be useful or why people should be encouraged to do this but as long as it doesn't change anything in the default configuration... -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Tue Feb 6 15:27:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 06 Feb 2001 15:27:00 -0000 Subject: [PATCH] Fix non-mbs regex handling Message-ID: <20010207003111.D16457@sunsite.ms.mff.cuni.cz> Hi! Although this patch is not strictly needed after MBS_SUPPORT switch, if people take code from glibc they might be happy if bugs in it are fixed. In this case for 32 byte bitmap (unsigned char)(32*8) is 0 so the comparison is wrong. 2001-02-07 Jakub Jelinek * posix/regex.c (re_match_2_internal): Handle correctly 32 byte bitmaps. * posix/tst-regex.c: New test. --- libc/posix/regex.c.jj Wed Feb 7 01:13:08 2001 +++ libc/posix/regex.c Wed Feb 7 01:13:40 2001 @@ -6776,7 +6776,7 @@ re_match_2_internal (bufp, string1, size { int not = (re_opcode_t) p1[3] == charset_not; - if (c < (unsigned char) (p1[4] * BYTEWIDTH) + if (c < (unsigned) (p1[4] * BYTEWIDTH) && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) not = !not; --- libc/posix/tst-regex.c.jj Wed Feb 7 01:12:55 2001 +++ libc/posix/tst-regex.c Wed Feb 7 01:10:50 2001 @@ -0,0 +1,23 @@ +#include +#include +#include + +int +main (int argc, char *argv[]) +{ + regex_t re; + regmatch_t mat[1]; + int res = 1; + + if (regcomp (&re, "[ax\xfe]*x", 0) != REG_NOERROR) + puts ("cannot compile expression \"[an\\xfe]*n\""); + else if (regexec (&re, "paxaxap", 1, mat, 0) == REG_NOMATCH) + puts ("no match"); + else + { + printf ("match from %d to %d\n", mat[0].rm_so, mat[0].rm_eo); + res = mat[0].rm_so != 1 || mat[0].rm_eo != 5; + } + + return res; +} Jakub From drepper@redhat.com Tue Feb 6 15:38:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 15:38:00 -0000 Subject: [PATCH] Fix non-mbs regex handling References: <20010207003111.D16457@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > Although this patch is not strictly needed after MBS_SUPPORT switch, if > people take code from glibc they might be happy if bugs in it are fixed. > In this case for 32 byte bitmap (unsigned char)(32*8) is 0 so the comparison > is wrong. I'm already working on this since yesterday. The problem is that there seems to be a compiler problem (or I'm doing something stupid). I see the problem fixed in statically linked test programs but not if dynamically linked. It will take a bit longer until I figure this out, I fear. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Tue Feb 6 15:50:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Tue, 06 Feb 2001 15:50:00 -0000 Subject: [PATCH] Fix non-mbs regex handling References: <20010207003111.D16457@sunsite.ms.mff.cuni.cz> Message-ID: <20010207005327.E16457@sunsite.ms.mff.cuni.cz> On Tue, Feb 06, 2001 at 03:37:35PM -0800, Ulrich Drepper wrote: > Jakub Jelinek writes: > > > Although this patch is not strictly needed after MBS_SUPPORT switch, if > > people take code from glibc they might be happy if bugs in it are fixed. > > In this case for 32 byte bitmap (unsigned char)(32*8) is 0 so the comparison > > is wrong. > > I'm already working on this since yesterday. The problem is that > there seems to be a compiler problem (or I'm doing something stupid). What problems are you seeing? I've just done a fresh bootstrap on i386 and the test I posted passes (it did not with glibc from friday). Jakub From drepper@redhat.com Tue Feb 6 16:05:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 06 Feb 2001 16:05:00 -0000 Subject: [PATCH] Fix non-mbs regex handling References: <20010207003111.D16457@sunsite.ms.mff.cuni.cz> <20010207005327.E16457@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > What problems are you seeing? I've just done a fresh bootstrap on i386 > and the test I posted passes (it did not with glibc from friday). I'm using a different test case and it behaves differently depending on whether I use LD_LIBRARY_PATH and what I use as -rpath. Very strange, I'm looking at it. Might have something to do with the memory handling in regex. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Wed Feb 7 05:37:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 07 Feb 2001 05:37:00 -0000 Subject: [PATCH] Fix test-tgmath failure on alpha Message-ID: <20010207144053.G16457@sunsite.ms.mff.cuni.cz> Hi! test-tgmath fails on alpha because fdim, fabs and floor get inlined eventhough __NO_MATH_INLINES is defined. While looking at it, I patched tgmath.h so that it does not use ##l suffixed functions if __NO_LONG_DOUBLE_MATH, since otherwise we get loads of warnings about using functions without prototypes. 2001-02-07 Jakub Jelinek * math/tgmath.h: Only add l suffixes if __NO_LONG_DOUBLE_MATH is not defined. * sysdeps/alpha/fpu/bits/mathinline.h: Honour __NO_MATH_INLINES. --- libc/math/tgmath.h.jj Fri Feb 2 04:56:56 2001 +++ libc/math/tgmath.h Wed Feb 7 07:47:30 2001 @@ -36,6 +36,12 @@ #if __GNUC_PREREQ (2, 7) +# ifdef __NO_LONG_DOUBLE_MATH +# define __tgml(fct) fct +# else +# define __tgml(fct) fct ## l +# endif + /* This is ugly but unless gcc gets appropriate builtins we have to do something like this. Don't ask how it works. */ @@ -65,7 +71,7 @@ else if (sizeof (Val) == sizeof (float)) \ __tgmres = Fct##f (Val); \ else \ - __tgmres = Fct##l (Val); \ + __tgmres = __tgml(Fct) (Val); \ __tgmres; })) # define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \ @@ -76,7 +82,7 @@ else if (sizeof (Val1) == sizeof (float)) \ __tgmres = Fct##f (Val1, Val2); \ else \ - __tgmres = Fct##l (Val1, Val2); \ + __tgmres = __tgml(Fct) (Val1, Val2); \ __tgmres; })) # define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \ @@ -84,7 +90,7 @@ if ((sizeof (Val1) > sizeof (double) \ || sizeof (Val2) > sizeof (double)) \ && __builtin_classify_type ((Val1) + (Val2)) == 8) \ - __tgmres = Fct##l (Val1, Val2); \ + __tgmres = __tgml(Fct) (Val1, Val2); \ else if (sizeof (Val1) == sizeof (double) \ || sizeof (Val2) == sizeof (double) \ || __builtin_classify_type ((Val1) \ @@ -99,7 +105,7 @@ if ((sizeof (Val1) > sizeof (double) \ || sizeof (Val2) > sizeof (double)) \ && __builtin_classify_type ((Val1) + (Val2)) == 8) \ - __tgmres = Fct##l (Val1, Val2, Val3); \ + __tgmres = __tgml(Fct) (Val1, Val2, Val3); \ else if (sizeof (Val1) == sizeof (double) \ || sizeof (Val2) == sizeof (double) \ || __builtin_classify_type ((Val1) \ @@ -116,7 +122,7 @@ || sizeof (Val3) > sizeof (double)) \ && __builtin_classify_type ((Val1) + (Val2) \ + (Val3)) == 8) \ - __tgmres = Fct##l (Val1, Val2, Val3); \ + __tgmres = __tgml(Fct) (Val1, Val2, Val3); \ else if (sizeof (Val1) == sizeof (double) \ || sizeof (Val2) == sizeof (double) \ || sizeof (Val3) == sizeof (double) \ @@ -135,9 +141,9 @@ && __builtin_classify_type (__real__ (Val)) == 8) \ { \ if (sizeof (__real__ (Val)) == sizeof (Val)) \ - __tgmres = Fct##l (Val); \ + __tgmres = __tgml(Fct) (Val); \ else \ - __tgmres = Cfct##l (Val); \ + __tgmres = __tgml(Cfct) (Val); \ } \ else if (sizeof (__real__ (Val)) == sizeof (double) \ || __builtin_classify_type (__real__ (Val)) \ @@ -167,7 +173,7 @@ else if (sizeof (Val) == sizeof (__complex__ float)) \ __tgmres = Fct##f (Val); \ else \ - __tgmres = Fct##l (Val); \ + __tgmres = __tgml(Fct) (Val); \ __tgmres; })) /* XXX This definition has to be changed as soon as the compiler understands @@ -182,9 +188,9 @@ { \ if (sizeof (__real__ (Val1)) == sizeof (Val1) \ && sizeof (__real__ (Val2)) == sizeof (Val2)) \ - __tgmres = Fct##l (Val1, Val2); \ + __tgmres = __tgml(Fct) (Val1, Val2); \ else \ - __tgmres = Cfct##l (Val1, Val2); \ + __tgmres = __tgml(Cfct) (Val1, Val2); \ } \ else if (sizeof (__real__ (Val1)) == sizeof (double) \ || sizeof (__real__ (Val2)) == sizeof(double) \ --- libc/sysdeps/alpha/fpu/bits/mathinline.h.jj Thu Jun 8 06:03:42 2000 +++ libc/sysdeps/alpha/fpu/bits/mathinline.h Wed Feb 7 08:31:40 2001 @@ -1,5 +1,5 @@ /* Inline math functions for Alpha. - Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by David Mosberger-Tang. @@ -58,6 +58,8 @@ !isunordered(__x, __y) && __x != __y; })) #endif /* ISO C99 */ +#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__ + #define __inline_copysign(NAME, TYPE) \ __MATH_INLINE TYPE \ NAME (TYPE __x, TYPE __y) __THROW \ @@ -174,4 +176,6 @@ __MATH_INLINE double fdim (double __x, d return __x < __y ? 0.0 : __x - __y; } -#endif +#endif /* C99 */ + +#endif /* __NO_MATH_INLINES */ Jakub From rth@twiddle.net Wed Feb 7 09:45:00 2001 From: rth@twiddle.net (Richard Henderson) Date: Wed, 07 Feb 2001 09:45:00 -0000 Subject: [PATCH] Fix test-tgmath failure on alpha References: <20010207144053.G16457@sunsite.ms.mff.cuni.cz> Message-ID: <20010207094417.A1081@twiddle.net> On Wed, Feb 07, 2001 at 02:40:53PM +0100, Jakub Jelinek wrote: > While looking at it, I patched tgmath.h so that it does not use ##l suffixed > functions if __NO_LONG_DOUBLE_MATH, since otherwise we get loads of warnings > about using functions without prototypes. The whole __NO_LONG_DOUBLE_MATH thing should only be set while building glibc. Afterward, the ##l symbols exist as aliases in libm. r~ From jakub@redhat.com Wed Feb 7 09:53:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 07 Feb 2001 09:53:00 -0000 Subject: [PATCH] Fix test-tgmath failure on alpha References: <20010207144053.G16457@sunsite.ms.mff.cuni.cz> <20010207094417.A1081@twiddle.net> Message-ID: <20010207185704.I16457@sunsite.ms.mff.cuni.cz> On Wed, Feb 07, 2001 at 09:44:17AM -0800, Richard Henderson wrote: > On Wed, Feb 07, 2001 at 02:40:53PM +0100, Jakub Jelinek wrote: > > While looking at it, I patched tgmath.h so that it does not use ##l suffixed > > functions if __NO_LONG_DOUBLE_MATH, since otherwise we get loads of warnings > > about using functions without prototypes. > > The whole __NO_LONG_DOUBLE_MATH thing should only be set while > building glibc. Afterward, the ##l symbols exist as aliases in libm. __NO_LONG_DOUBLE_MATH is the define which in installed headers decides whether you get long double prototypes or not. It is true there are ##l symbols as aliases, yet you don't have prototypes for them. Jakub From drepper@redhat.com Wed Feb 7 09:59:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 07 Feb 2001 09:59:00 -0000 Subject: [PATCH] Fix test-tgmath failure on alpha References: <20010207144053.G16457@sunsite.ms.mff.cuni.cz> <20010207094417.A1081@twiddle.net> Message-ID: Richard Henderson writes: > The whole __NO_LONG_DOUBLE_MATH thing should only be set while > building glibc. Afterward, the ##l symbols exist as aliases in libm. We have the aliases but not the prototypes. This way we can introduce the long double functions once the correct type gets introduced. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@valinux.com Wed Feb 7 15:01:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Wed, 07 Feb 2001 15:01:00 -0000 Subject: DF_1_INTIFIRST References: Message-ID: <20010207150039.B5574@valinux.com> On Thu, Feb 01, 2001 at 10:34:46PM -0800, Ulrich Drepper wrote: > I've implemented the DF_1_INTIFIRST flag now and it's being used in > the thread library (and only there, it's specially for this DSO). The > test case Jakub sent works for me now. On i686. > > But there is more work left. All architectures which have separate > initfini.c files need work. There is a file named pt-initfini.c > required for architecture which has a special initfini.c file. So, > get working (HPPA, IA64, SH, S390). > Here is a patch for ia64. -- H.J. Lu (hjl@valinux.com) --- 2001-02-07 H.J. Lu * linuxthreads/sysdeps/pthread/pt-initfini.c: Declare __pthread_initialize_minimal (). * linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New. Index: linuxthreads/sysdeps/pthread/pt-initfini.c =================================================================== RCS file: /work/cvs/gnu/glibc/linuxthreads/sysdeps/pthread/pt-initfini.c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 pt-initfini.c --- linuxthreads/sysdeps/pthread/pt-initfini.c 2001/02/03 07:02:29 1.1.1.1 +++ linuxthreads/sysdeps/pthread/pt-initfini.c 2001/02/03 22:09:46 @@ -65,6 +65,7 @@ asm ("\n/*@_init_PROLOG_BEGINS*/"); static void call_initialize_minimal (void) { + extern void __pthread_initialize_minimal (void); __pthread_initialize_minimal (); } --- /dev/null Tue Dec 12 13:27:14 2000 +++ linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c Sat Feb 3 14:13:27 2001 @@ -0,0 +1,117 @@ +/* Special .init and .fini section support for Linuxthread/ia64. + Copyright (C) 2001 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. + + In addition to the permissions in the GNU Library General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Library General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +__asm__ (" + +#include \"defs.h\" + +/*@HEADER_ENDS*/ + +/*@_init_PROLOG_BEGINS*/ + .section .init + .align 16 + .global _init# + .proc _init# +_init: + alloc r34 = ar.pfs, 0, 3, 0, 0 + mov r32 = r12 + mov r33 = b0 + adds r12 = -16, r12 + addl r14 = @ltoff(@fptr(__gmon_start__#)), gp + ;; +/* we could use r35 to save gp, but we use the stack since that's what + * all the other init routines will do --davidm 00/04/05 */ + st8 [r12] = gp, -16 + br.call.sptk.many b0 = __pthread_initialize_minimal# + ;; + ld8 r15 = [r14] + ;; + cmp.eq p6, p7 = 0, r15 + (p6) br.cond.dptk .L5 + br.call.sptk.many b0 = __gmon_start__# ;; +.L5: + adds r12 = 16, r12 + ;; + ld8 gp = [r12] + ;; + .align 16 + .endp _init# + +/*@_init_PROLOG_ENDS*/ + +/*@_init_EPILOG_BEGINS*/ + .section .init + .regstk 0,2,0,0 + mov r12 = r32 + mov ar.pfs = r34 + mov b0 = r33 + br.ret.sptk.many b0 + .endp _init# +/*@_init_EPILOG_ENDS*/ + +/*@_fini_PROLOG_BEGINS*/ + .section .fini + .align 16 + .global _fini# + .proc _fini# +_fini: + alloc r34 = ar.pfs, 0, 3, 0, 0 + mov r32 = r12 + mov r33 = b0 + adds r12 = -16, r12 + ;; + .align 16 + .endp _fini# + +/*@_fini_PROLOG_ENDS*/ + br.call.sptk.many b0 = i_am_not_a_leaf# ;; + ;; + +/*@_fini_EPILOG_BEGINS*/ + .section .fini + mov r12 = r32 + mov ar.pfs = r34 + mov b0 = r33 + br.ret.sptk.many b0 + .endp _fini# + +/*@_fini_EPILOG_ENDS*/ + +/*@TRAILER_BEGINS*/ + .weak __gmon_start__# +"); From kkojima@rr.iij4u.or.jp Wed Feb 7 16:12:00 2001 From: kkojima@rr.iij4u.or.jp (kaz Kojima) Date: Wed, 07 Feb 2001 16:12:00 -0000 Subject: DF_1_INTIFIRST References: Message-ID: <200102080012.JAA24568@rr.iij4u.or.jp> Hi, I'm testing a SH specific pt-initfini.c and have a question. Where should we put this file? I found linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c but it seems not specific for linux. I guess that linuxthreads/sysdeps/pthread/sh/pt-initfini.c is better, though it needs a small change of the main configure script to put the new linuxthreads/sysdeps/pthread/sh before linuxthreads/sysdeps/pthread in the sysnames list. I have no strong opinion about this and need your suggestion. kaz From drepper@redhat.com Wed Feb 7 16:19:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 07 Feb 2001 16:19:00 -0000 Subject: DF_1_INTIFIRST References: <200102080012.JAA24568@rr.iij4u.or.jp> Message-ID: kaz Kojima writes: > I'm testing a SH specific pt-initfini.c and have a question. > Where should we put this file? > I found linuxthreads/sysdeps/unix/sysv/linux/ia64/pt-initfini.c > but it seems not specific for linux. I guess that > linuxthreads/sysdeps/pthread/sh/pt-initfini.c No, put it in linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c Everything in the linuxthreads subdir is Linux specific. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From kkojima@rr.iij4u.or.jp Wed Feb 7 16:32:00 2001 From: kkojima@rr.iij4u.or.jp (kaz Kojima) Date: Wed, 07 Feb 2001 16:32:00 -0000 Subject: DF_1_INTIFIRST References: Message-ID: <200102080032.JAA28772@rr.iij4u.or.jp> Ulrich Drepper writes: > No, put it in > > linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c > > Everything in the linuxthreads subdir is Linux specific. ok. I'll put it in there. Thanks, kaz From drepper@redhat.com Thu Feb 8 00:28:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 08 Feb 2001 00:28:00 -0000 Subject: manual additions Message-ID: I've been working a bit on the manual. Please give the additions a quick read if you have time (changes are in stdio.texi and llio.texi). -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Thu Feb 8 04:19:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 08 Feb 2001 04:19:00 -0000 Subject: [PATCH] Avoid using two -B options for building libpthread.so Message-ID: <20010208132316.J16457@sunsite.ms.mff.cuni.cz> Hi! This patch fixes glibc build on ia64 when the compiler is gnupro-1117, but I guess building glibc with 2.95.2 would fail to work on i686/--enable-kernel 2.4.0 and other arches as well. As I wrote to Ulrich already, various gcc drivers search the -B paths in various orders (first-to-last, last-to-first or even do program searches one way and object file searches the other way) and thus unfortunately glibc cannot count on first-to-last search. Tested on ia64-linux both with gnupro-1117 and gcc-2.96-RH plus on i686-linux (gcc-2.96-RH). 2001-02-08 Jakub Jelinek * Makerules (build-shlib): Replace extra-B- with special-B-, only pass one -B prefix to gcc. * Makefile (before-compile): Add crtn.o. (extra-B-pthread.so): Rename to... (special-B-pthread.so): ...this. (crti.S): New rule. (crt%.o): Change from crti.o rule. --- libc/Makerules.jj Tue Feb 6 11:19:52 2001 +++ libc/Makerules Thu Feb 8 13:55:01 2001 @@ -415,7 +415,8 @@ lib%.so: lib%_pic.a $(+preinit) $(+posti define build-shlib $(LINK.o) -shared -Wl,-O1 -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \ - $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) $(load-map-file) \ + $(patsubst ,-B$(csu-objpfx),$(special-B-$(@F:lib%.so=%).so)) \ + $(load-map-file) \ -Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \ $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \ -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \ --- libc/linuxthreads/Makefile.jj Sat Feb 3 12:03:21 2001 +++ libc/linuxthreads/Makefile Thu Feb 8 13:58:01 2001 @@ -47,7 +47,7 @@ vpath %.c Examples include ../Makeconfig ifeq ($(build-shared),yes) -before-compile := $(objpfx)crti.o +before-compile := $(objpfx)crti.o $(objpfx)crtn.o CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions endif @@ -62,7 +62,7 @@ endif include ../Rules -extra-B-pthread.so = -B$(common-objpfx)linuxthreads/ +special-B-pthread.so = -B$(common-objpfx)linuxthreads/ znodelete-yes = -DHAVE_Z_NODELETE CFLAGS-mutex.c += -D__NO_WEAK_PTHREAD_ALIASES @@ -105,12 +105,17 @@ $(objpfx)crti.S: $(objpfx)pt-initfini.s -e '/@_.*_PROLOG_BEGINS/,/@_.*_PROLOG_ENDS/p' \ -e '/@TRAILER_BEGINS/,$$p' $< > $@ +$(objpfx)crtn.S: $(objpfx)pt-initfini.s + sed -n -e '1,/@HEADER_ENDS/p' \ + -e '/@_.*_EPILOG_BEGINS/,/@_.*_EPILOG_ENDS/p' \ + -e '/@TRAILER_BEGINS/,$$p' $< > $@ + $(objpfx)defs.h: $(objpfx)pt-initfini.s sed -n -e '/@TESTS_BEGIN/,/@TESTS_END/p' $< | \ $(AWK) -f ../csu/defs.awk > $@ -$(objpfx)crti.o: $(objpfx)crti.S $(objpfx)defs.h +$(objpfx)crt%.o: $(objpfx)crt%.S $(objpfx)defs.h $(compile.S) -g0 $(ASFLAGS-.os) -o $@ -generated += crti.S defs.h pt-initfini.s +generated += crti.S crtn.S defs.h pt-initfini.s endif Jakub From kkojima@rr.iij4u.or.jp Thu Feb 8 15:26:00 2001 From: kkojima@rr.iij4u.or.jp (kaz Kojima) Date: Thu, 08 Feb 2001 15:26:00 -0000 Subject: DF_1_INTIFIRST References: <200102080032.JAA28772@rr.iij4u.or.jp> Message-ID: <200102082326.IAA28593@rr.iij4u.or.jp> kaz Kojima wrote: > Ulrich Drepper writes: >> No, put it in >> >> linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c >> >> Everything in the linuxthreads subdir is Linux specific. > > ok. I'll put it in there. Hi, Here is a patch itself. kaz -- * linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file. --- /dev/null Wed Nov 22 15:21:10 2000 +++ linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c Thu Feb 8 11:13:24 2001 @@ -0,0 +1,169 @@ +/* Special .init and .fini section support for SH. Linuxthread version. + Copyright (C) 2000, 2001 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. + + In addition to the permissions in the GNU Library General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The Library General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + 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, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* This file is compiled into assembly code which is then munged by a sed + script into two files: crti.s and crtn.s. + + * crti.s puts a function prologue at the beginning of the + .init and .fini sections and defines global symbols for + those addresses, so they can be called as functions. + + * crtn.s puts the corresponding function epilogues + in the .init and .fini sections. */ + +__asm__ (" + +#include \"defs.h\" +#define SHARED + +/*@HEADER_ENDS*/ + +/*@TESTS_BEGIN*/ + +/*@TESTS_END*/ + +/*@_init_PROLOG_BEGINS*/ + .section .init + .align 5 + .global _init + .type _init,@function +_init: + mov.l r12,@-r15 + mov.l r14,@-r15 + sts.l pr,@-r15 +#ifdef SHARED + mova .L22,r0 + mov.l .L22,r12 + add r0,r12 + mova .L24,r0 + mov.l .L24,r1 + add r0,r1 + jsr @r1 + nop + mova .L23,r0 + mov.l .L23,r1 + add r0,r1 +#else + mov.l .L24,r1 + jsr @r1 + nop + mov.l .L23,r1 +#endif + jsr @r1 + mov r15,r14 + bra 1f + nop + .align 2 +#ifdef SHARED +.L22: + .long _GLOBAL_OFFSET_TABLE_ +.L23: + .long __gmon_start__@PLT +.L24: + .long __pthread_initialize_minimal@PLT +#else +.L23: + .long __gmon_start__ +.L24: + .long __pthread_initialize_minimal +#endif + .data + .global __fpscr_values +__fpscr_values: + .long 0 + .long 0x80000 + .previous +1: + ALIGN + END_INIT + + +/*@_init_PROLOG_ENDS*/ + +/*@_init_EPILOG_BEGINS*/ + .section .init + mov r14,r15 + lds.l @r15+,pr + mov.l @r15+,r14 + rts + mov.l @r15+,r12 + END_INIT + .section .text + .align 5 + .weak __gmon_start__ + .type __gmon_start__,@function +__gmon_start__: + mov.l r14,@-r15 + mov r15,r14 + mov r14,r15 + rts + mov.l @r15+,r14 + +/*@_init_EPILOG_ENDS*/ + +/*@_fini_PROLOG_BEGINS*/ + .section .fini + .align 5 + .global _fini + .type _fini,@function +_fini: + mov.l r12,@-r15 + mov.l r14,@-r15 + sts.l pr,@-r15 +#ifdef SHARED + mova .L27,r0 + mov.l .L27,r12 + add r0,r12 +#endif + mov r15,r14 + ALIGN + END_FINI +#ifdef SHARED + bra 1f + nop + .align 2 +.L27: + .long _GLOBAL_OFFSET_TABLE_ +#endif +1: +/*@_fini_PROLOG_ENDS*/ + +/*@_fini_EPILOG_BEGINS*/ + .section .fini + mov r14,r15 + lds.l @r15+,pr + mov.l @r15+,r14 + rts + mov.l @r15+,r12 + + END_FINI + +/*@_fini_EPILOG_ENDS*/ + +/*@TRAILER_BEGINS*/ +"); From kkojima@rr.iij4u.or.jp Thu Feb 8 15:58:00 2001 From: kkojima@rr.iij4u.or.jp (kaz Kojima) Date: Thu, 08 Feb 2001 15:58:00 -0000 Subject: A tiny patch for SH-3 specific setjmp Message-ID: <200102082358.IAA04908@rr.iij4u.or.jp> Hi, This is a tiny patch for an obvious mistake in sh3 specific setjmp. kaz -- * sysdeps/sh/sh3/setjmp.S (__sigsetjmp): Correct function name in the assembler end directive. Index: setjmp.S =================================================================== RCS file: /cvs/glibc/libc/sysdeps/sh/sh3/setjmp.S,v retrieving revision 1.3 diff -u -r1.3 setjmp.S --- setjmp.S 2000/11/21 20:55:37 1.3 +++ setjmp.S 2001/02/08 23:41:28 @@ -61,4 +61,4 @@ .L1: .long C_SYMBOL_NAME(__sigjmp_save) #endif -END (__setjmp) +END (__sigsetjmp) From drepper@redhat.com Thu Feb 8 21:24:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 08 Feb 2001 21:24:00 -0000 Subject: DF_1_INTIFIRST References: <200102080032.JAA28772@rr.iij4u.or.jp> <200102082326.IAA28593@rr.iij4u.or.jp> Message-ID: kaz Kojima writes: > Here is a patch itself. Thanks, I've applied it. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Thu Feb 8 21:26:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 08 Feb 2001 21:26:00 -0000 Subject: A tiny patch for SH-3 specific setjmp References: <200102082358.IAA04908@rr.iij4u.or.jp> Message-ID: kaz Kojima writes: > This is a tiny patch for an obvious mistake in sh3 specific setjmp. Thanks, I've applied it. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Feb 9 00:13:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 09 Feb 2001 00:13:00 -0000 Subject: 2.2.2 Message-ID: I'm pretty satisfied with the current status and want to make the 2.2.2 release. Let me know whether there are any problems you know about (except for this installation thing which I have not yet looked at). If there are none I'll make pre1 (probably) tomorrow. I've tested everything on x86 and IA-64, rth yesterday on Alpha, PPC is compiling right now. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Feb 9 00:31:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 09 Feb 2001 00:31:00 -0000 Subject: DF_1_INTIFIRST References: <20010207150039.B5574@valinux.com> Message-ID: "H . J . Lu" writes: > Here is a patch for ia64. I added Jes' patch some days ago and it is working fine now. So, no need. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Feb 9 00:48:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 09 Feb 2001 00:48:00 -0000 Subject: 2.2.2 References: <14979.43307.874102.308424@pizda.ninka.net> Message-ID: "David S. Miller" writes: > Can you put a snapshot up to test on sourceware? That makes > testing things easier for some of us. I've put a snapshot of the checked out tree up at ftp://ftp.cygnus.com/pub/home/drepper/libc-20010208.tar.bz2 This include the linuxthreads add-on but is no `make dist' run. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Fri Feb 9 01:05:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Fri, 09 Feb 2001 01:05:00 -0000 Subject: 2.2.2 References: Message-ID: Ulrich Drepper writes: > I'm pretty satisfied with the current status and want to make the > 2.2.2 release. Let me know whether there are any problems you know > about (except for this installation thing which I have not yet looked > at). If there are none I'll make pre1 (probably) tomorrow. Go ahead, I don't know of any major issues. > I've tested everything on x86 and IA-64, rth yesterday on Alpha, PPC > is compiling right now. MIPS should be fine, but I'll check tomorrow again. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From kettenis@wins.uva.nl Fri Feb 9 06:09:00 2001 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Fri, 09 Feb 2001 06:09:00 -0000 Subject: 2.2.2 References: Message-ID: Ulrich Drepper writes: > I'm pretty satisfied with the current status and want to make the > 2.2.2 release. Let me know whether there are any problems you know > about (except for this installation thing which I have not yet looked > at). If there are none I'll make pre1 (probably) tomorrow. There are compilation problems on the Hurd right now. They're mostly related to the CLK_TCK changes, and I've got patches in my local tree. I'll submit those this weekend. Mark From jakub@redhat.com Fri Feb 9 07:07:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 09 Feb 2001 07:07:00 -0000 Subject: [PATCH] Kill warnings, fix test-tgmath on sparc64 Message-ID: <20010209161135.O16457@sunsite.ms.mff.cuni.cz> Hi! This patch kills a bunch of warnings and does not define sqrt* nor fdim* if __NO_MATH_INLINES is defined. I've tested current CVS on i386/i686/alpha/alphaev6 without problems, ia64 is running ATM, sparc64 failed due to the issues below and because a linker error on test-ildoubl (but that's not glibc fault and when I fixed ld it worked). 2001-02-09 Jakub Jelinek * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add __pthread_initialize_minimal prototype. * sysdeps/generic/setenv.c (unsetenv): Remove const from len. * sysdeps/sparc/fpu/bits/mathinline.h (sqrt, fdim): Don't define if __NO_MATH_INLINES. * sysdeps/i386/dl-machine.h (elf_machine_rel): Only declare refsym if not RTLD_BOOTSTRAP. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Likewise. --- libc/linuxthreads/sysdeps/pthread/pt-initfini.c.jj Fri Feb 2 07:21:58 2001 +++ libc/linuxthreads/sysdeps/pthread/pt-initfini.c Fri Feb 9 13:28:55 2001 @@ -65,6 +65,8 @@ asm ("\n/*@_init_PROLOG_BEGINS*/"); static void call_initialize_minimal (void) { + extern void __pthread_initialize_minimal (void); + __pthread_initialize_minimal (); } --- libc/sysdeps/generic/setenv.c.jj Wed Jan 31 16:35:06 2001 +++ libc/sysdeps/generic/setenv.c Fri Feb 9 13:16:58 2001 @@ -267,7 +267,7 @@ int unsetenv (name) const char *name; { - const size_t len; + size_t len; char **ep; if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) --- libc/sysdeps/i386/dl-machine.h.jj Mon Dec 4 15:12:48 2000 +++ libc/sysdeps/i386/dl-machine.h Fri Feb 9 13:56:18 2001 @@ -319,7 +319,9 @@ elf_machine_rel (struct link_map *map, c } else if (ELF32_R_TYPE (reloc->r_info) != R_386_NONE) { +#ifndef RTLD_BOOTSTRAP const Elf32_Sym *const refsym = sym; +#endif Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); if (sym) value += sym->st_value; --- libc/sysdeps/sparc/fpu/bits/mathinline.h.jj Thu Nov 2 08:52:20 2000 +++ libc/sysdeps/sparc/fpu/bits/mathinline.h Fri Feb 9 16:58:13 2001 @@ -142,6 +142,8 @@ __signbitl (long double __x) __THROW #endif /* sparc64 */ +#ifndef __NO_MATH_INLINES + __MATH_INLINE double sqrt(double __x) __THROW { @@ -169,6 +171,8 @@ sqrtl(long double __x) __THROW } #endif /* sparc64 */ +#endif + /* This code is used internally in the GNU libc. */ #ifdef __LIBC_INTERNAL_MATH_INLINES __MATH_INLINE double @@ -202,6 +206,8 @@ __ieee754_sqrtl(long double __x) #ifdef __USE_ISOC99 +#ifndef __NO_MATH_INLINES + __MATH_INLINE double fdim (double __x, double __y); __MATH_INLINE double fdim (double __x, double __y) @@ -216,6 +222,7 @@ fdimf (float __x, float __y) return __x < __y ? 0 : __x - __y; } +#endif /* !__NO_MATH_INLINES */ #endif /* __USE_ISOC99 */ #endif /* !__NO_MATH_INLINES && __OPTIMIZE__ */ #endif /* __GNUC__ */ --- libc/sysdeps/sparc/sparc32/dl-machine.h.jj Thu Nov 30 13:17:30 2000 +++ libc/sysdeps/sparc/sparc32/dl-machine.h Fri Feb 9 13:57:00 2001 @@ -362,7 +362,9 @@ elf_machine_rela (struct link_map *map, } else { +#ifndef RTLD_BOOTSTRAP const Elf32_Sym *const refsym = sym; +#endif Elf32_Addr value; if (sym->st_shndx != SHN_UNDEF && ELF32_ST_BIND (sym->st_info) == STB_LOCAL) --- libc/sysdeps/sparc/sparc64/dl-machine.h.jj Thu Nov 30 13:17:30 2000 +++ libc/sysdeps/sparc/sparc64/dl-machine.h Fri Feb 9 13:56:39 2001 @@ -197,7 +197,9 @@ elf_machine_rela (struct link_map *map, } else if (ELF64_R_TYPE_ID (reloc->r_info) != R_SPARC_NONE) /* Who is Wilbur? */ { +#ifndef RTLD_BOOTSTRAP const Elf64_Sym *const refsym = sym; +#endif Elf64_Addr value; if (sym->st_shndx != SHN_UNDEF && ELF64_ST_BIND (sym->st_info) == STB_LOCAL) Jakub From drepper@redhat.com Fri Feb 9 09:07:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 09 Feb 2001 09:07:00 -0000 Subject: localedef programs gone Message-ID: I've fixed the localedef problem Andreas had. localedef wasn't handling files without a newline at the end correctly. This is fixed and the file in question as well. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Feb 9 09:13:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 09 Feb 2001 09:13:00 -0000 Subject: [PATCH] Kill warnings, fix test-tgmath on sparc64 References: <20010209161135.O16457@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > This patch kills a bunch of warnings and does not define sqrt* nor fdim* > if __NO_MATH_INLINES is defined. Thanks, I've applied the patch. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Fri Feb 9 09:20:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 09 Feb 2001 09:20:00 -0000 Subject: localedef programs gone References: Message-ID: Doh, this is of course "localedef *problem* gone". -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Fri Feb 9 10:55:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Fri, 09 Feb 2001 10:55:00 -0000 Subject: localedef programs gone References: Message-ID: Ulrich Drepper writes: > I've fixed the localedef problem Andreas had. localedef wasn't > handling files without a newline at the end correctly. This is fixed > and the file in question as well. Thanks a lot! I'm committing the appended change for SUPPORTED now, Andreas 2001-02-09 Andreas Jaeger * locales/en_IN: Add newline at end of file. * SUPPORTED: Add more entries. ============================================================ Index: localedata/SUPPORTED --- localedata/SUPPORTED 2001/02/08 09:07:48 1.46 +++ localedata/SUPPORTED 2001/02/09 18:54:41 @@ -41,8 +41,10 @@ en_CA ISO-8859-1 en_DK ISO-8859-1 en_GB ISO-8859-1 +en_HK ISO-8859-1 en_IE ISO-8859-1 en_IE@euro ISO-8859-15 +en_IN UTF-8 en_NZ ISO-8859-1 en_PH ISO-8859-1 en_SG ISO-8859-1 -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From kettenis@wins.uva.nl Sat Feb 10 04:49:00 2001 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Sat, 10 Feb 2001 04:49:00 -0000 Subject: Define _HAVE_SA_LEN for 4.4 BSD Message-ID: <200102101249.f1ACn4e05734@delius.kettenis.local> For 4.4 BSD we obviously need to define _HAVE_SA_LEN. This fixes a compilation problem for the Hurd since we use the 4.4 BSD `struct sockaddr_*'. Mark 2001-02-10 Mark Kettenis * sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h (_HAVE_SA_LEN): Define. Index: sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h =================================================================== RCS file: /cvs/glibc/libc/sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h,v retrieving revision 1.3 diff -u -p -r1.3 sockaddr.h --- sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h 2001/01/31 06:14:55 1.3 +++ sysdeps/unix/bsd/bsd4.4/bits/sockaddr.h 2001/02/10 12:45:46 @@ -38,4 +38,6 @@ typedef unsigned char sa_family_t; #define __SOCKADDR_COMMON_SIZE (2 * sizeof (unsigned char)) +#define _HAVE_SA_LEN 1 /* We have the sa_len field. */ + #endif /* bits/sockaddr.h */ From drepper@redhat.com Sat Feb 10 07:39:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 10 Feb 2001 07:39:00 -0000 Subject: Define _HAVE_SA_LEN for 4.4 BSD References: <200102101249.f1ACn4e05734@delius.kettenis.local> Message-ID: Mark Kettenis writes: > For 4.4 BSD we obviously need to define _HAVE_SA_LEN. This fixes a > compilation problem for the Hurd since we use the 4.4 BSD `struct > sockaddr_*'. Applied. But I thought Hurd uses the Linux networking code!? -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Sat Feb 10 07:51:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Sat, 10 Feb 2001 07:51:00 -0000 Subject: 2.2.2 References: Message-ID: Ulrich Drepper writes: > I'm pretty satisfied with the current status and want to make the > 2.2.2 release. Let me know whether there are any problems you know > about (except for this installation thing which I have not yet looked > at). If there are none I'll make pre1 (probably) tomorrow. > > I've tested everything on x86 and IA-64, rth yesterday on Alpha, PPC > is compiling right now. Uli, here's an update about MIPS: glibc compiles fine for me on Linux/MIPS (little endian). It doesn't pass some of the linuxthreads and some of the math tests. The later are problems in the FPU emulation but I'm not sure why the linuxthreads tests fail. This might be a kernel problem, I know that the kernel I'm using has some problems with signal handling. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From kettenis@wins.uva.nl Sat Feb 10 08:04:00 2001 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Sat, 10 Feb 2001 08:04:00 -0000 Subject: Define _HAVE_SA_LEN for 4.4 BSD References: <200102101249.f1ACn4e05734@delius.kettenis.local> Message-ID: <200102101604.f1AG4q907675@delius.kettenis.local> From: Ulrich Drepper Date: 10 Feb 2001 07:40:23 -0800 Mark Kettenis writes: > For 4.4 BSD we obviously need to define _HAVE_SA_LEN. This fixes a > compilation problem for the Hurd since we use the 4.4 BSD `struct > sockaddr_*'. Applied. But I thought Hurd uses the Linux networking code!? We do, but we make an attempt to be source-compatible with BSD, especially in the area of network interfaces where the Linux stuff usually is a total hacked up mess :-). Thanks, Mark From kettenis@wins.uva.nl Sat Feb 10 08:22:00 2001 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Sat, 10 Feb 2001 08:22:00 -0000 Subject: Fix for Hurd/BSD times() implementation Message-ID: <200102101622.f1AGMJV07751@delius.kettenis.local> More fall-out from the CLK_TCK changes. Mark 2001-02-10 Mark Kettenis * sysdeps/unix/bsd/times.c: Reorder includes and add . (timeval_to_clock_t): Add clk_tck argument and use that instead of CLK_TCK. (__times): Use __getclktck to get the number of clock ticks per second and use its return value instead of CLK_TCK. Index: sysdeps/unix/bsd/times.c =================================================================== RCS file: /cvs/glibc/libc/sysdeps/unix/bsd/times.c,v retrieving revision 1.8 diff -u -p -r1.8 times.c --- sysdeps/unix/bsd/times.c 1998/08/11 21:48:25 1.8 +++ sysdeps/unix/bsd/times.c 2001/02/10 16:17:00 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 92, 93, 95, 96, 97, 98 Free Software Foundation, Inc. +/* Copyright (C) 1991,92,93,95,96,97,1998,2001 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 @@ -18,22 +18,23 @@ #include #include +#include #include #include -#include +#include /* Time the program started. */ extern time_t _posix_start_time; -#ifdef __GNUC__ +#ifdef __GNUC__ __inline #endif static clock_t -timeval_to_clock_t (const struct timeval *tv) +timeval_to_clock_t (const struct timeval *tv, clock_t clk_tck) { - return (clock_t) ((tv->tv_sec * CLK_TCK) + - (tv->tv_usec * CLK_TCK / 1000000L)); + return (clock_t) ((tv->tv_sec * clk_tck) + + (tv->tv_usec * clk_tck / 1000000L)); } /* Store the CPU time used by this process and all its @@ -45,6 +46,7 @@ __times (buffer) struct tms *buffer; { struct rusage usage; + clock_t clk_tck; if (buffer == NULL) { @@ -52,17 +54,19 @@ __times (buffer) return (clock_t) -1; } + clk_tck = __getclktck (); + if (__getrusage (RUSAGE_SELF, &usage) < 0) return (clock_t) -1; - buffer->tms_utime = (clock_t) timeval_to_clock_t (&usage.ru_utime); - buffer->tms_stime = (clock_t) timeval_to_clock_t (&usage.ru_stime); + buffer->tms_utime = (clock_t) timeval_to_clock_t (&usage.ru_utime, clk_tck); + buffer->tms_stime = (clock_t) timeval_to_clock_t (&usage.ru_stime, clk_tck); if (__getrusage (RUSAGE_CHILDREN, &usage) < 0) return (clock_t) -1; - buffer->tms_cutime = (clock_t) timeval_to_clock_t (&usage.ru_utime); - buffer->tms_cstime = (clock_t) timeval_to_clock_t (&usage.ru_stime); + buffer->tms_cutime = (clock_t) timeval_to_clock_t (&usage.ru_utime, clk_tck); + buffer->tms_cstime = (clock_t) timeval_to_clock_t (&usage.ru_stime, clk_tck); - return (time ((time_t *) NULL) - _posix_start_time) * CLK_TCK; + return (time ((time_t *) NULL) - _posix_start_time) * clk_tck; } weak_alias (__times, times) From drepper@redhat.com Sat Feb 10 08:38:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 10 Feb 2001 08:38:00 -0000 Subject: Fix for Hurd/BSD times() implementation References: <200102101622.f1AGMJV07751@delius.kettenis.local> Message-ID: Mark Kettenis writes: > More fall-out from the CLK_TCK changes. Thanks, I've applied the patch. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From kettenis@wins.uva.nl Sat Feb 10 09:15:00 2001 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Sat, 10 Feb 2001 09:15:00 -0000 Subject: Fix to avoid warning Message-ID: <200102101715.f1AHFpO07875@delius.kettenis.local> This patch avoids a "function declaration isn't a prototype" warning on the Hurd. Probably more fall-out from the / header cleanup. Mark 2001-02-10 Mark Kettenis * sysdeps/unix/stime.c: Include . Index: sysdeps/unix/stime.c =================================================================== RCS file: /cvs/glibc/libc/sysdeps/unix/stime.c,v retrieving revision 1.4 diff -u -p -r1.4 stime.c --- sysdeps/unix/stime.c 2001/01/28 06:41:13 1.4 +++ sysdeps/unix/stime.c 2001/02/10 17:13:54 @@ -19,6 +19,7 @@ #include #include /* For NULL. */ #include +#include /* Set the system clock to *WHEN. */ From drepper@redhat.com Sat Feb 10 09:20:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 10 Feb 2001 09:20:00 -0000 Subject: Fix to avoid warning References: <200102101715.f1AHFpO07875@delius.kettenis.local> Message-ID: Mark Kettenis writes: > This patch avoids a "function declaration isn't a prototype" warning > on the Hurd. Probably more fall-out from the / > header cleanup. Please apply it. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Sat Feb 10 10:51:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 10 Feb 2001 10:51:00 -0000 Subject: easy weekend job Message-ID: Can somebody please go through the manual (and corresponding header) and add "restrict" wherever needed? I'm doing it for string.texi now (while writing lots of new text) but there are several more files. Drop a note to avoid duplication in case you do it. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From kettenis@wins.uva.nl Sat Feb 10 11:36:00 2001 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Sat, 10 Feb 2001 11:36:00 -0000 Subject: Fix to avoid warning References: <200102101715.f1AHFpO07875@delius.kettenis.local> Message-ID: <200102101934.f1AJYRU00257@delius.kettenis.local> From: Ulrich Drepper Date: 10 Feb 2001 09:21:21 -0800 Mark Kettenis writes: > This patch avoids a "function declaration isn't a prototype" warning > on the Hurd. Probably more fall-out from the / > header cleanup. Please apply it. Done. From aj@suse.de Sat Feb 10 13:45:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Sat, 10 Feb 2001 13:45:00 -0000 Subject: fix make clean Message-ID: make clean misses a number of files: ./iconv: total 308 -rw-r--r-- 1 aj users 45560 Feb 10 17:22 charmap-dir.o -rw-r--r-- 1 aj users 75408 Feb 10 17:22 charmap.o -rw-r--r-- 1 aj users 15052 Feb 10 17:22 dummy-repertoire.o -rw-r--r-- 1 aj users 46432 Feb 10 17:22 iconv_charmap.o -rw-r--r-- 1 aj users 56384 Feb 10 17:22 linereader.o -rw-r--r-- 1 aj users 28436 Feb 10 17:22 simple-hash.o -rw-r--r-- 1 aj users 15688 Feb 10 17:22 xmalloc.o -rw-r--r-- 1 aj users 11412 Feb 10 17:22 xstrdup.o ./linuxthreads: total 4 -rw-r--r-- 1 aj users 1352 Feb 10 17:15 crti.o Here's a patch. Ok to commit? Andreas 2001-02-10 Andreas Jaeger * Makefile (extra-objs): New. For linuxthreads: 2001-02-10 Andreas Jaeger * Makefile (extra-objs): New. ============================================================ Index: iconv/Makefile --- iconv/Makefile 2001/02/09 19:49:41 1.16 +++ iconv/Makefile 2001/02/10 21:41:38 @@ -38,6 +38,7 @@ iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \ dummy-repertoire simple-hash xstrdup xmalloc +extra-objs = $(iconv_prog-modules:=.o) CFLAGS-iconv_prog.c = -I../locale/programs CFLAGS-iconv_charmap.c = -I../locale/programs CFLAGS-dummy-repertoire.c = -I../locale/programs ============================================================ Index: linuxthreads/Makefile --- linuxthreads/Makefile 2001/02/02 06:20:37 1.33 +++ linuxthreads/Makefile 2001/02/10 21:41:38 @@ -48,6 +48,7 @@ ifeq ($(build-shared),yes) before-compile := $(objpfx)crti.o +extra-objs = crti.o CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions endif -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From drepper@redhat.com Sat Feb 10 14:14:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sat, 10 Feb 2001 14:14:00 -0000 Subject: fix make clean References: Message-ID: Andreas Jaeger writes: > Here's a patch. Ok to commit? Yes. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Sun Feb 11 12:51:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Sun, 11 Feb 2001 12:51:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal Message-ID: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> Hi! Those two aliases were unfortunately exported from libc and according to http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=27029 IBM DB2 6.1 from IBM Websphere 3.5 was linked against it. It looks like some inlines (strtou?q, strtou?ll) used to be defined to __strtou?q_internal at least in 1996 and early 1997. So, IMHO no matter whether they are unused now, they should be present for binary compatibility. 2001-02-11 Jakub Jelinek * sysdeps/generic/strtoll.c (__strtoq_internal): Ressurect alias which was exported from libc. * sysdeps/generic/strtoull.c (__strtouq_internal): Likewise. --- libc/sysdeps/generic/strtoll.c.jj Fri Jan 5 22:58:21 2001 +++ libc/sysdeps/generic/strtoll.c Sun Feb 11 22:47:21 2001 @@ -21,4 +21,5 @@ #include +strong_alias (__strtoll_internal, __strtoq_internal) weak_alias (strtoll, strtoq) --- libc/sysdeps/generic/strtoull.c.jj Fri Jan 5 22:58:21 2001 +++ libc/sysdeps/generic/strtoull.c Sun Feb 11 22:47:21 2001 @@ -22,5 +22,6 @@ #include #ifdef _LIBC +strong_alias (__strtoull_internal, __strtouq_internal) weak_alias (strtoull, strtouq) #endif Jakub From hjl@valinux.com Sun Feb 11 13:08:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Sun, 11 Feb 2001 13:08:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> Message-ID: <20010211130810.A12185@valinux.com> On Sun, Feb 11, 2001 at 09:55:53PM +0100, Jakub Jelinek wrote: > Hi! > > Those two aliases were unfortunately exported from libc and according to > http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=27029 > IBM DB2 6.1 from IBM Websphere 3.5 was linked against it. > It looks like some inlines (strtou?q, strtou?ll) used to be defined to > __strtou?q_internal at least in 1996 and early 1997. > So, IMHO no matter whether they are unused now, they should be present for > binary compatibility. > If it is the case, please don't make them default so that the static linker won't use them. We have the similar problem with res_init. What happaned to my patch: http://sources.redhat.com/ml/libc-alpha/2000-12/msg00029.html Jakub, you can use the similar approach to make them not available to the static linker. -- H.J. Lu (hjl@valinux.com) From hjl@valinux.com Sun Feb 11 13:11:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Sun, 11 Feb 2001 13:11:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> Message-ID: <20010211131047.B12185@valinux.com> On Sun, Feb 11, 2001 at 09:55:53PM +0100, Jakub Jelinek wrote: > Hi! > > Those two aliases were unfortunately exported from libc and according to > http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=27029 > IBM DB2 6.1 from IBM Websphere 3.5 was linked against it. > It looks like some inlines (strtou?q, strtou?ll) used to be defined to > __strtou?q_internal at least in 1996 and early 1997. > So, IMHO no matter whether they are unused now, they should be present for > binary compatibility. > > 2001-02-11 Jakub Jelinek > > * sysdeps/generic/strtoll.c (__strtoq_internal): Ressurect alias > which was exported from libc. > * sysdeps/generic/strtoull.c (__strtouq_internal): Likewise. > > --- libc/sysdeps/generic/strtoll.c.jj Fri Jan 5 22:58:21 2001 > +++ libc/sysdeps/generic/strtoll.c Sun Feb 11 22:47:21 2001 > @@ -21,4 +21,5 @@ > > #include > > +strong_alias (__strtoll_internal, __strtoq_internal) > weak_alias (strtoll, strtoq) > --- libc/sysdeps/generic/strtoull.c.jj Fri Jan 5 22:58:21 2001 > +++ libc/sysdeps/generic/strtoull.c Sun Feb 11 22:47:21 2001 > @@ -22,5 +22,6 @@ > #include > > #ifdef _LIBC > +strong_alias (__strtoull_internal, __strtouq_internal) > weak_alias (strtoull, strtouq) > #endif > > > Jakub You may need to add them to stdlib/Versions. -- H.J. Lu (hjl@valinux.com) From jakub@redhat.com Sun Feb 11 23:53:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Sun, 11 Feb 2001 23:53:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211131047.B12185@valinux.com> Message-ID: <20010212085811.S16457@sunsite.ms.mff.cuni.cz> On Sun, Feb 11, 2001 at 01:10:47PM -0800, H . J . Lu wrote: > You may need to add them to stdlib/Versions. No, it is there since versioning was introduced into glibc: # functions used in inline functions or macros __strto*_internal; BTW: strtoull/strtoll/strtouq/strtoq used to use __strtou?q_internal in glibc 2.0 release, so it looks like IBM wanted to make sure their software runs on everything from 2.0 up. Jakub From drepper@redhat.com Mon Feb 12 01:06:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 12 Feb 2001 01:06:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > Those two aliases were unfortunately exported from libc and according to > http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=27029 Thanks, I've added the patch. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Feb 12 01:40:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 12 Feb 2001 01:40:00 -0000 Subject: some notes Message-ID: some quick notes before I try to get some zzzs - so far no problem reports for 2.2.2pre1 - Stephen Moshier contributed j0l/y0l. They work great. All we need is libm-test-ulps adjustments for m68k and IA-64. The latter I'll do tomorrow if nobody beats me. - I've written lots of documentation. So far only Andreas reviewed some of the changes. It's probably a bad idea to let only non-native speakers write the documentation. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Feb 12 12:22:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 12 Feb 2001 12:22:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> Message-ID: "H . J . Lu" writes: > If it is the case, please don't make them default so that the static > linker won't use them. We have the similar problem with res_init. What > happaned to my patch: > > http://sources.redhat.com/ml/libc-alpha/2000-12/msg00029.html I didn't have this in my inbox anymore, must have slipped through. It seems to be reasonable and I applied it. Thanks, -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@valinux.com Mon Feb 12 14:20:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Mon, 12 Feb 2001 14:20:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> Message-ID: <20010212141937.A2371@valinux.com> On Mon, Feb 12, 2001 at 12:22:31PM -0800, Ulrich Drepper wrote: > "H . J . Lu" writes: > > > If it is the case, please don't make them default so that the static > > linker won't use them. We have the similar problem with res_init. What > > happaned to my patch: > > > > http://sources.redhat.com/ml/libc-alpha/2000-12/msg00029.html > > I didn't have this in my inbox anymore, must have slipped through. It > seems to be reasonable and I applied it. Thanks, > I think we should do the similar thing for __strtoq_internal and __strtouq_internal. -- H.J. Lu (hjl@valinux.com) From drepper@redhat.com Mon Feb 12 16:53:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 12 Feb 2001 16:53:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> <20010212141937.A2371@valinux.com> Message-ID: "H . J . Lu" writes: > I think we should do the similar thing for __strtoq_internal and > __strtouq_internal. First the ld should be fixed. Try linking against glibc with res_init handled this way. ld will still pick the definition up although it is not the default version. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@valinux.com Mon Feb 12 17:51:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Mon, 12 Feb 2001 17:51:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> <20010212141937.A2371@valinux.com> Message-ID: <20010212175100.A16852@valinux.com> On Mon, Feb 12, 2001 at 04:54:14PM -0800, Ulrich Drepper wrote: > "H . J . Lu" writes: > > > I think we should do the similar thing for __strtoq_internal and > > __strtouq_internal. > > First the ld should be fixed. Try linking against glibc with res_init > handled this way. ld will still pick the definition up although it is > not the default version. > With my binutils 2.10.1.0.7: # cat x.c extern int res_init; int main () { return &res_init != 0; } # gcc x.c /tmp/cc05Wbgf.o: In function `main': /tmp/cc05Wbgf.o(.text+0x4): undefined reference to `res_init' collect2: ld returned 1 exit status I believe binutils from CVS is ok. -- H.J. Lu (hjl@valinux.com) From drepper@redhat.com Mon Feb 12 18:03:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 12 Feb 2001 18:03:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> <20010212141937.A2371@valinux.com> <20010212175100.A16852@valinux.com> Message-ID: "H . J . Lu" writes: > With my binutils 2.10.1.0.7: Not with 2.10.91 which is what I have here. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@valinux.com Mon Feb 12 18:17:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Mon, 12 Feb 2001 18:17:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> <20010212141937.A2371@valinux.com> <20010212175100.A16852@valinux.com> Message-ID: <20010212181700.B3260@valinux.com> On Mon, Feb 12, 2001 at 06:04:13PM -0800, Ulrich Drepper wrote: > "H . J . Lu" writes: > > > With my binutils 2.10.1.0.7: > > Not with 2.10.91 which is what I have here. > I just tried binutils from CVS today. It works for me. Could you please send me # gcc -Wl,--verbose ..... It should use /lib/libc.so.6 or wherever the new glibc is. and # nm /lib/libc.so.6 | grep res_init It should look at 000f23e0 T __res_init 000f23e0 t __res_init_weak 000f23e0 W res_init@GLIBC_2.0 I suspect you either have an old linker or used the old libc.so.6. -- H.J. Lu (hjl@valinux.com) From drepper@redhat.com Mon Feb 12 18:58:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 12 Feb 2001 18:58:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> <20010212141937.A2371@valinux.com> <20010212175100.A16852@valinux.com> <20010212181700.B3260@valinux.com> Message-ID: "H . J . Lu" writes: > 000f23e0 T __res_init > 000f23e0 t __res_init_weak > 000f23e0 W res_init@GLIBC_2.0 This I see as well. But when linking the application it still finds this symbol. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@valinux.com Mon Feb 12 20:27:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Mon, 12 Feb 2001 20:27:00 -0000 Subject: [PATCH] Ressurect __strtou?q_internal References: <20010211215553.R16457@sunsite.ms.mff.cuni.cz> <20010211130810.A12185@valinux.com> <20010212141937.A2371@valinux.com> <20010212175100.A16852@valinux.com> <20010212181700.B3260@valinux.com> Message-ID: <20010212202612.A5756@valinux.com> On Mon, Feb 12, 2001 at 06:58:47PM -0800, Ulrich Drepper wrote: > "H . J . Lu" writes: > > > 000f23e0 T __res_init > > 000f23e0 t __res_init_weak > > 000f23e0 W res_init@GLIBC_2.0 > > This I see as well. But when linking the application it still finds > this symbol. > ld from CVS doesn't do it for me with my simple testcase. I need a testcase to fix the linker. -- H.J. Lu (hjl@valinux.com) From jakub@redhat.com Wed Feb 14 02:54:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Wed, 14 Feb 2001 02:54:00 -0000 Subject: timerclear Message-ID: <20010214115550.E768@sunsite.ms.mff.cuni.cz> Hi! What's the reason why is timerclear and company only under __USE_GNU and not __USE_GNU || __USE_BSD? It seems to break quite many programs and e.g. on Solaris it is present unless _XOPEN_SOURCE or _POSIX_C_SOURCE. Jakub From schwab@suse.de Wed Feb 14 07:28:00 2001 From: schwab@suse.de (Andreas Schwab) Date: Wed, 14 Feb 2001 07:28:00 -0000 Subject: sys/time.h warning Message-ID: When compiling with _SVID_SOURCE we get a warning in about struct timezone declared inside parameter list. Either we should make the definition of struct timezone __USE_MISC or use __timezone_ptr_t in the declaration of settimeofday. The patch implements the latter. Andreas. 2001-02-14 Andreas Schwab * time/sys/time.h: Use __timezone_ptr_t in declaration of settimeofday. --- time/sys/time.h.~1.29.~ Mon Jan 29 10:45:46 2001 +++ time/sys/time.h Wed Feb 14 16:18:33 2001 @@ -76,7 +76,7 @@ /* Set the current time of day and timezone information. This call is restricted to the super-user. */ extern int settimeofday (__const struct timeval *__tv, - __const struct timezone *__tz) __THROW; + __const __timezone_ptr_t *__tz) __THROW; /* Adjust the current time of day by the amount in DELTA. If OLDDELTA is not NULL, it is filled in with the amount -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From drepper@redhat.com Wed Feb 14 14:50:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 14 Feb 2001 14:50:00 -0000 Subject: timerclear References: <20010214115550.E768@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > What's the reason why is timerclear and company only under __USE_GNU and not > __USE_GNU || __USE_BSD? I did not really know where it came from. It's changed now. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Wed Feb 14 14:56:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 14 Feb 2001 14:56:00 -0000 Subject: sys/time.h warning References: Message-ID: Andreas Schwab writes: > When compiling with _SVID_SOURCE we get a warning in about > struct timezone declared inside parameter list. Either we should make the > definition of struct timezone __USE_MISC or use __timezone_ptr_t in the > declaration of settimeofday. The patch implements the latter. The patch is not correct. First, __timezone_ptr_t is already a pointer, you added another *. Second, making the pointer const does not work. I've made the definition and the prototype now available under __USE_BSD. I think this is correct. If not let me know. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From wmglo@dent.med.uni-muenchen.de Wed Feb 14 14:56:00 2001 From: wmglo@dent.med.uni-muenchen.de (Wolfram Gloger) Date: Wed, 14 Feb 2001 14:56:00 -0000 Subject: One-line change for malloc to save address space Message-ID: <20010214225605.19567.qmail@md.dent.med.uni-muenchen.de> Hi, Here is a small change for malloc that should help save address space when allocating beyond the sbrk() limit. Regards, Wolfram. 2001-02-14 Wolfram Gloger * malloc/malloc.c (new_heap): When allocating large chunk aligned to HEAP_MAX_SIZE, prefer one with lower address, to avoid `holes' between the heaps. Index: libc/malloc/malloc.c =================================================================== RCS file: /cvs/glibc/libc/malloc/malloc.c,v retrieving revision 1.78 diff -u -r1.78 malloc.c --- malloc.c 2001/01/21 21:29:17 1.78 +++ malloc.c 2001/02/14 22:55:44 @@ -2026,7 +2026,7 @@ anyway). */ p1 = (char *)MMAP(0, HEAP_MAX_SIZE<<1, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE); if(p1 != MAP_FAILED) { - p2 = (char *)(((unsigned long)p1 + HEAP_MAX_SIZE) & ~(HEAP_MAX_SIZE-1)); + p2 = (char *)(((unsigned long)p1 + (HEAP_MAX_SIZE-1)) & ~(HEAP_MAX_SIZE-1)); ul = p2 - p1; munmap(p1, ul); munmap(p2 + HEAP_MAX_SIZE, HEAP_MAX_SIZE - ul); From drepper@redhat.com Wed Feb 14 19:42:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 14 Feb 2001 19:42:00 -0000 Subject: One-line change for malloc to save address space References: <20010214225605.19567.qmail@md.dent.med.uni-muenchen.de> Message-ID: Wolfram Gloger writes: > Here is a small change for malloc that should help save address space > when allocating beyond the sbrk() limit. Thanks, I've applied it. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From schwab@suse.de Thu Feb 15 01:33:00 2001 From: schwab@suse.de (Andreas Schwab) Date: Thu, 15 Feb 2001 01:33:00 -0000 Subject: sys/time.h warning References: Message-ID: Ulrich Drepper writes: |> Andreas Schwab writes: |> |> > When compiling with _SVID_SOURCE we get a warning in about |> > struct timezone declared inside parameter list. Either we should make the |> > definition of struct timezone __USE_MISC or use __timezone_ptr_t in the |> > declaration of settimeofday. The patch implements the latter. |> |> The patch is not correct. First, __timezone_ptr_t is already a |> pointer, you added another *. Second, making the pointer const does |> not work. |> |> I've made the definition and the prototype now available under |> __USE_BSD. I think this is correct. If not let me know. You are right, thanks. Andreas. -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From drepper@redhat.com Thu Feb 15 08:31:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 15 Feb 2001 08:31:00 -0000 Subject: anything before 2.2.2? Message-ID: Are there any issues you have with the current CVS version? If not I'll release 2.2.2 later today. The only thing I know of is that probably the m68k libm-test-ulps file need a few new entries but Andreas' machine is soooo slow (and he said I shouldn't bother). I have success on x86, IA-64, and PPC. Alpha should be fine as well. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From schwab@suse.de Thu Feb 15 08:31:00 2001 From: schwab@suse.de (Andreas Schwab) Date: Thu, 15 Feb 2001 08:31:00 -0000 Subject: sysdeps/ia64/fpu/feenablxcpt.c Message-ID: gcc 2.97 chokes about the extra space in the constraint. Andreas. 2001-02-15 Andreas Schwab * sysdeps/ia64/fpu/feenablxcpt.c: Delete spurious space. --- sysdeps/ia64/fpu/feenablxcpt.c.~1.2.~ Fri Sep 29 10:03:22 2000 +++ sysdeps/ia64/fpu/feenablxcpt.c Thu Feb 15 17:15:37 2001 @@ -27,7 +27,7 @@ fenv_t new_fpsr; /* Get the current fpsr. */ - __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r " (old_fpsr)); + __asm__ __volatile__ ("mov.m %0=ar.fpsr" : "=r" (old_fpsr)); new_fpsr = old_fpsr & ~((fenv_t) excepts & FE_ALL_EXCEPT); -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From jakub@redhat.com Thu Feb 15 09:20:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 15 Feb 2001 09:20:00 -0000 Subject: anything before 2.2.2? References: Message-ID: <20010215182226.J768@sunsite.ms.mff.cuni.cz> On Thu, Feb 15, 2001 at 08:32:00AM -0800, Ulrich Drepper wrote: > Are there any issues you have with the current CVS version? Yes, probably MB regex is broken. I'm currently looking into it. Jakub From aj@suse.de Thu Feb 15 10:57:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Thu, 15 Feb 2001 10:57:00 -0000 Subject: anything before 2.2.2? References: Message-ID: Ulrich Drepper writes: > Are there any issues you have with the current CVS version? If not > I'll release 2.2.2 later today. The only thing I know of is that > probably the m68k libm-test-ulps file need a few new entries but > Andreas' machine is soooo slow (and he said I shouldn't bother). No problems from my side, go ahead and release it. > I have success on x86, IA-64, and PPC. Alpha should be fine as well. And success on little endian MIPS as reported before. Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From jakub@redhat.com Thu Feb 15 13:09:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Thu, 15 Feb 2001 13:09:00 -0000 Subject: [PATCH] Fix MBS regex Message-ID: <20010215221157.K768@sunsite.ms.mff.cuni.cz> Hi! I believe I had trouble to reproduce it because I probably missed -DMBS_SUPPORT when building regex.o by hand or whatever. The issue is that regex was badly inconsistent in translating, PATFETCH used to translate even wchar_ts below and equal to '\xff' while TRANSLATE only translated chars, so in the testcase start_range_char was translated while range_end was not (because sizeof(p[0]) > 1) - I wondered why even at -O0 start_range variable does not exist on ia64 in the debugger and the reason seems it was an alias for start_range_char. Are there any regression tests for regex's in other packages (I mean sed, awk, perl, whatever)? ksymoops stresses regex quite badly, so that could be a good test as well. 2001-02-15 Jakub Jelinek * posix/regex.c (init_syntax_once): Add prototype. (TRANSLATE): If MBS_SUPPORT, translate all characters up to '\xff'. (re_search_2): Avoid warning. (count_mbs_length): Add prototype. --- libc/posix/regex.c.jj Sat Feb 10 02:56:10 2001 +++ libc/posix/regex.c Thu Feb 15 15:53:17 2001 @@ -290,6 +290,8 @@ extern char *re_syntax_table; static char re_syntax_table[CHAR_SET_SIZE]; +static void init_syntax_once PARAMS ((void)); + static void init_syntax_once () { @@ -1906,7 +1908,8 @@ static reg_errcode_t compile_range _RE_A #ifndef TRANSLATE # ifdef MBS_SUPPORT # define TRANSLATE(d) \ - (translate && (sizeof(d) <= 1)? (char) translate[(unsigned char) (d)] : (d)) + ((translate && ((US_CHAR_TYPE) (d)) <= 0xff) \ + ? (char) translate[(unsigned char) (d)] : (d)) #else # define TRANSLATE(d) \ (translate ? (char) translate[(unsigned char) (d)] : (d)) @@ -5058,9 +5061,9 @@ re_search_2 (bufp, string1, size1, strin } else /* Searching backwards. */ { - register char c = (size1 == 0 || startpos >= size1 - ? string2[startpos - size1] - : string1[startpos]); + register CHAR_TYPE c = (size1 == 0 || startpos >= size1 + ? string2[startpos - size1] + : string1[startpos]); if (!fastmap[(unsigned char) TRANSLATE (c)]) goto advance; @@ -5309,10 +5312,14 @@ weak_alias (__re_match_2, re_match_2) #endif #ifdef MBS_SUPPORT + +static int count_mbs_length PARAMS ((int *, int)); + /* This check the substring (from 0, to length) of the multibyte string, to which offset_buffer correspond. And count how many wchar_t_characters the substring occupy. We use offset_buffer to optimization. See convert_mbs_to_wcs. */ + static int count_mbs_length(offset_buffer, length) int *offset_buffer; Jakub From drepper@redhat.com Thu Feb 15 13:25:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Thu, 15 Feb 2001 13:25:00 -0000 Subject: [PATCH] Fix MBS regex References: <20010215221157.K768@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > The issue is that regex was badly inconsistent in translating, PATFETCH > used to translate even wchar_ts below and equal to '\xff' while TRANSLATE > only translated chars, so in the testcase start_range_char was translated > while range_end was not (because sizeof(p[0]) > 1) - I wondered why even at > -O0 start_range variable does not exist on ia64 in the debugger and the > reason seems it was an alias for start_range_char. Extremely cool. Thanks, it works for me (without further regressions). I've added the patch and the test case. > Are there any regression tests for regex's in other packages (I mean sed, > awk, perl, whatever)? None of these packages uses normally the glibc regex. Grep and sed hopefully will do soon again, but perl has it only implementation. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Fri Feb 16 01:57:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 16 Feb 2001 01:57:00 -0000 Subject: [PATCH] Fix 2.2.2 on alpha and sparc64 Message-ID: <20010216105919.L768@sunsite.ms.mff.cuni.cz> Ouch! This has slept through, just saw this in 2.2.2 builds... 2001-02-16 Jakub Jelinek * sysdeps/unix/sysv/linux/alpha/syscalls.list (ftruncate): Add __ftruncate64 alias. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list (ftruncate): Likewise. --- libc/sysdeps/unix/sysv/linux/alpha/syscalls.list.jj Fri Aug 25 19:17:40 2000 +++ libc/sysdeps/unix/sysv/linux/alpha/syscalls.list Fri Feb 16 11:57:11 2001 @@ -26,7 +26,7 @@ fstatfs - fstatfs 2 __fstatfs fstatfs statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit -ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 +ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 # these are actually common with the x86: --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list.jj Fri Aug 25 18:59:54 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list Fri Feb 16 11:57:52 2001 @@ -8,7 +8,7 @@ fstatfs - fstatfs 2 __fstatfs fstatfs statfs - statfs 2 __statfs statfs statfs64 getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64 setrlimit - setrlimit 2 __setrlimit setrlimit64 setrlimit -ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 +ftruncate - ftruncate 2 __ftruncate ftruncate __ftruncate64 ftruncate64 truncate - truncate 2 truncate truncate64 mmap - mmap 6 __mmap mmap __mmap64 mmap64 Jakub From schwab@suse.de Fri Feb 16 06:21:00 2001 From: schwab@suse.de (Andreas Schwab) Date: Fri, 16 Feb 2001 06:21:00 -0000 Subject: anything before 2.2.2? References: Message-ID: Ulrich Drepper writes: |> Are there any issues you have with the current CVS version? If not |> I'll release 2.2.2 later today. The only thing I know of is that |> probably the m68k libm-test-ulps file need a few new entries but |> Andreas' machine is soooo slow (and he said I shouldn't bother). Actually the ulps are correct, but there were some bugs in fpclassifyl and nextafterl, which I have fixed now. Andreas. -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From drepper@redhat.com Fri Feb 16 10:12:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 16 Feb 2001 10:12:00 -0000 Subject: [PATCH] Fix 2.2.2 on alpha and sparc64 References: <20010216105919.L768@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > This has slept through, just saw this in 2.2.2 builds... I've applied the patch. Thanks, -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Fri Feb 16 11:24:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 16 Feb 2001 11:24:00 -0000 Subject: glibc 2.2.2 test-double failure Message-ID: <20010216202728.P768@sunsite.ms.mff.cuni.cz> Hi! I've done make check of 2.2.2 on various platforms, alpha & alphaev6 succeeded, ia64 failed with the usual ex5, ex9, ex10 thread tests needing to be killed (it is 4way ia64 FYI), i686 succeeded but i386 build failed test-double and test-idouble: yn(3, 0.7) had 3 ulps error instead of 2. I don't know if we should just bump it in ulps or whether yn changes should be reviewed. 2001-02-16 Jakub Jelinek * sysdeps/i386/fpu/libm-test-ulps: Adjust. --- libc/sysdeps/i386/fpu/libm-test-ulps.jj Fri Feb 16 11:46:40 2001 +++ libc/sysdeps/i386/fpu/libm-test-ulps Fri Feb 16 21:23:59 2001 @@ -1043,8 +1043,8 @@ float: 1 idouble: 1 ifloat: 1 Test "yn (3, 0.7) == -15.819479052819633505": -double: 2 -idouble: 2 +double: 3 +idouble: 3 Test "yn (3, 2.0) == -1.1277837768404277861": float: 1 ifloat: 1 Jakub From drepper@redhat.com Fri Feb 16 11:32:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 16 Feb 2001 11:32:00 -0000 Subject: glibc 2.2.2 test-double failure References: <20010216202728.P768@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > I've done make check of 2.2.2 on various platforms, alpha & alphaev6 > succeeded, ia64 failed with the usual ex5, ex9, ex10 thread tests needing to > be killed (it is 4way ia64 FYI), I don't see this on a UP. > i686 succeeded but i386 build failed > test-double and test-idouble: yn(3, 0.7) had 3 ulps error instead of 2. > I don't know if we should just bump it in ulps or whether yn changes should > be reviewed. I want to know why. There is no reason for that. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From hjl@valinux.com Fri Feb 16 11:37:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Fri, 16 Feb 2001 11:37:00 -0000 Subject: glibc 2.2.2 test-double failure References: <20010216202728.P768@sunsite.ms.mff.cuni.cz> Message-ID: <20010216113719.A8510@valinux.com> On Fri, Feb 16, 2001 at 08:27:28PM +0100, Jakub Jelinek wrote: > Hi! > > I've done make check of 2.2.2 on various platforms, alpha & alphaev6 > succeeded, ia64 failed with the usual ex5, ex9, ex10 thread tests needing to > be killed (it is 4way ia64 FYI), i686 succeeded but i386 build failed I have no problems on ia64. I have a one-way BigSur. I am running 2.4.1 plus the 010131 ia64 patch. H.J. From jakub@redhat.com Fri Feb 16 11:53:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 16 Feb 2001 11:53:00 -0000 Subject: glibc 2.2.2 test-double failure References: <20010216202728.P768@sunsite.ms.mff.cuni.cz> <20010216113719.A8510@valinux.com> Message-ID: <20010216205552.Q768@sunsite.ms.mff.cuni.cz> On Fri, Feb 16, 2001 at 11:37:19AM -0800, H . J . Lu wrote: > On Fri, Feb 16, 2001 at 08:27:28PM +0100, Jakub Jelinek wrote: > > Hi! > > > > I've done make check of 2.2.2 on various platforms, alpha & alphaev6 > > succeeded, ia64 failed with the usual ex5, ex9, ex10 thread tests needing to > > be killed (it is 4way ia64 FYI), i686 succeeded but i386 build failed > > I have no problems on ia64. I have a one-way BigSur. I am running > 2.4.1 plus the 010131 ia64 patch. At least ex5 seems to be reproducible, so I'll try to look at it next week. Jakub From jakub@redhat.com Fri Feb 16 16:16:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 16 Feb 2001 16:16:00 -0000 Subject: glibc 2.2.2 test-double failure References: <20010216202728.P768@sunsite.ms.mff.cuni.cz> Message-ID: <20010217011907.R768@sunsite.ms.mff.cuni.cz> On Fri, Feb 16, 2001 at 11:32:36AM -0800, Ulrich Drepper wrote: > Jakub Jelinek writes: > > > I've done make check of 2.2.2 on various platforms, alpha & alphaev6 > > succeeded, ia64 failed with the usual ex5, ex9, ex10 thread tests needing to > > be killed (it is 4way ia64 FYI), > > I don't see this on a UP. It looks like both gnupro-1117 and gcc-2.96-75 miscompile spinlock.c at -O2 or -O3 and when things and the first time threads contend on a spinlock they can go into endless loop. Don't know more details yet. Jakub From hjl@valinux.com Fri Feb 16 17:28:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Fri, 16 Feb 2001 17:28:00 -0000 Subject: glibc 2.2.2 test-double failure References: <20010216202728.P768@sunsite.ms.mff.cuni.cz> <20010217011907.R768@sunsite.ms.mff.cuni.cz> Message-ID: <20010216172807.A30160@valinux.com> On Sat, Feb 17, 2001 at 01:19:08AM +0100, Jakub Jelinek wrote: > On Fri, Feb 16, 2001 at 11:32:36AM -0800, Ulrich Drepper wrote: > > Jakub Jelinek writes: > > > > > I've done make check of 2.2.2 on various platforms, alpha & alphaev6 > > > succeeded, ia64 failed with the usual ex5, ex9, ex10 thread tests needing to > > > be killed (it is 4way ia64 FYI), > > > > I don't see this on a UP. > > It looks like both gnupro-1117 and gcc-2.96-75 miscompile spinlock.c at -O2 > or -O3 and when things and the first time threads contend on a spinlock they > can go into endless loop. > Don't know more details yet. I used -O2. It works fine. Is that SMP related or a hardware bug? -- H.J. Lu (hjl@valinux.com) From aj@suse.de Sat Feb 17 07:35:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Sat, 17 Feb 2001 07:35:00 -0000 Subject: Allow gcc 3.0 Message-ID: FYI: I've committed the appended patch to allow GCC version 3.0 and newer in configure. Andreas 2001-02-17 Andreas Jaeger * configure.in: Allow gcc 3. ============================================================ Index: configure.in --- configure.in 2001/02/09 18:34:36 1.306 +++ configure.in 2001/02/17 15:17:08 @@ -552,7 +552,7 @@ AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, [version \([egcygnustpi-]*[0-9.]*\)], - [*gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*], + [*gcc-2.9[5-9].*|*2.8.[1-9]*|*2.9|*2.9.[0-9]*|2.9[5-9]*|3.[0-9]*|cygnus-2.9[1-9]*|gcc-2.9[5-9]|gcc-2.1[0-9][0-9]|sgicc-*], critic_missing=t) AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From jakub@redhat.com Sat Feb 17 12:13:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Sat, 17 Feb 2001 12:13:00 -0000 Subject: glibc 2.2.2 test-double failure References: <20010216202728.P768@sunsite.ms.mff.cuni.cz> <20010217011907.R768@sunsite.ms.mff.cuni.cz> <20010216172807.A30160@valinux.com> Message-ID: <20010217211508.A593@sunsite.ms.mff.cuni.cz> On Fri, Feb 16, 2001 at 05:28:07PM -0800, H . J . Lu wrote: > I used -O2. It works fine. Is that SMP related or a hardware bug? It is definitely SMP related, the place where it hangs is under if (__pthread_smp_kernel), so you cannot see it on UP. Jakub From jakub@redhat.com Sat Feb 17 14:04:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Sat, 17 Feb 2001 14:04:00 -0000 Subject: [PATCH] Fix fastlocks on SMP Message-ID: <20010217230632.A684@sunsite.ms.mff.cuni.cz> Hi! The following patch seems to cure ex5, ex9 and ex10 on ia64/SMP. Basically, if lock->__status had lowest bit set on spin_count 0, it would always spin until max_count, since lock->__status was cached in a register and never reloaded. __compare_and_swap clobbers it, but the codepath with (__status & 1) == 1 skips that, so there is nothing which requires gcc not to reload register caching lock->__status only inside of the conditionally executed code. The patch is attached in two variants, both seem to fix ex5, ex9 and ex10 (the tests which were previously failing on smp ia64), but the first results in better code while the second one is perhaps more readable. The assembly difference is in fact only: ld8 r15=[r32];; in first patch changed to ld8.acq r15=[r32];; in the second. I don't have ia64 manuals here at home so I cannot check, but ld8.acq smells like it would do cache-line ping-pong which is the code exactly trying to avoid (by only doing CAS if normal loads tells it could be successful). 2001-02-17 Jakub Jelinek * spinlock.c (__pthread_lock): Force lock->__status to be read from memory on every spin. Jakub From kettenis@wins.uva.nl Sun Feb 18 03:02:00 2001 From: kettenis@wins.uva.nl (Mark Kettenis) Date: Sun, 18 Feb 2001 03:02:00 -0000 Subject: Patch for malloc/mtrace.c Message-ID: <200102181102.f1IB28o15850@delius.kettenis.local> I'm having a bit of a problem with the use of fopen64 in malloc/mtrace.c: 1. The Hurd doesn't have fopen64. 2. The use of fopen64 pollutes the ISO C namespace. While I can solve (1) by implementing fopen64 in GNU stdio, and it can be argued that (2) isn't an issue, since mtrace() itself isn't ISO C, I'd personally still prefer using the attached patch to solve the problem. Mark 2001-02-18 Mark Kettenis * malloc/mtrace.c [USE_IN_LIBIO]: Define fopen as _IO_fopen64. (mtrace): Revert 2001-02-13 patch: use fopen instead of fopen64. Index: malloc/mtrace.c =================================================================== RCS file: /cvs/glibc/libc/malloc/mtrace.c,v retrieving revision 1.25 diff -u -p -r1.25 mtrace.c --- malloc/mtrace.c 2001/02/13 22:06:16 1.25 +++ malloc/mtrace.c 2001/02/18 10:50:08 @@ -42,6 +42,7 @@ #ifdef USE_IN_LIBIO # include +# define fopen(f, n) _IO_fopen64 (f, n) # define setvbuf(s, b, f, l) _IO_setvbuf (s, b, f, l) #endif @@ -268,7 +269,7 @@ mtrace () #endif if (mallfile != NULL || mallwatch != NULL) { - mallstream = fopen64 (mallfile != NULL ? mallfile : "/dev/null", "w"); + mallstream = fopen (mallfile != NULL ? mallfile : "/dev/null", "w"); if (mallstream != NULL) { /* Make sure we close the file descriptor on exec. */ From hjl@valinux.com Sun Feb 18 09:29:00 2001 From: hjl@valinux.com (H . J . Lu) Date: Sun, 18 Feb 2001 09:29:00 -0000 Subject: [PATCH] Fix fastlocks on SMP References: <20010217230632.A684@sunsite.ms.mff.cuni.cz> Message-ID: <20010218092908.A13591@valinux.com> On Sat, Feb 17, 2001 at 11:06:32PM +0100, Jakub Jelinek wrote: > Hi! > > The following patch seems to cure ex5, ex9 and ex10 on ia64/SMP. Basically, if > lock->__status had lowest bit set on spin_count 0, it would always spin > until max_count, since lock->__status was cached in a register and never > reloaded. __compare_and_swap clobbers it, but the codepath with > (__status & 1) == 1 skips that, so there is nothing which requires gcc not > to reload register caching lock->__status only inside of the conditionally > executed code. > The patch is attached in two variants, both seem to fix ex5, ex9 and ex10 > (the tests which were previously failing on smp ia64), but the first results > in better code while the second one is perhaps more readable. > The assembly difference is in fact only: > ld8 r15=[r32];; > in first patch changed to > ld8.acq r15=[r32];; > in the second. I don't have ia64 manuals here at home so I cannot check, but > ld8.acq smells like it would do cache-line ping-pong which is the code > exactly trying to avoid (by only doing CAS if normal loads tells it could be > successful). > This may be related to the change we made for __compare_and_swap and __compare_and_swap_with_release_semantics. The instruction may need the acquire semantics. We may need to exam all places around __compare_and_swap. H.J. From jakub@redhat.com Mon Feb 19 00:54:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 19 Feb 2001 00:54:00 -0000 Subject: norwegian locale.alias entries Message-ID: <20010219095537.B684@sunsite.ms.mff.cuni.cz> Hi! How should the norwegian locale aliases work? We install no_NO and nn_NO directories, plus have: bokmal nb_NO.ISO-8859-1 bokm.l nb_NO.ISO-8859-1 nb_NO no_NO.ISO-8859-1 norwegian no_NO.ISO-8859-1 nynorsk nn_NO.ISO-8859-1 in locale.alias. This means that e.g. using LC_ALL=bokmal will have the same effect as LC_ALL=C (dunno if this is a bug in locale.alias or alias handling code). I guess either bokmal should use no_NO.ISO-8859-1 (and the other spelling of the same thing likewise), or locale.alias handling code should apply the translation rules on the result again. Also, shouldn't glibc allow the old style locale specification, like no@nynorsk, no@bokmal etc.? Jakub From aj@suse.de Mon Feb 19 01:15:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Mon, 19 Feb 2001 01:15:00 -0000 Subject: Copyright of ia64 libm code Message-ID: The ia64 libm code has the following notice: // Copyright (c) 2000, 2001, Intel Corporation // All rights reserved. // // Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, // and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. // // WARRANTY DISCLAIMER // [...] // Intel Corporation is the author of this code, and requests that all // problem reports or change requests be submitted to it directly at // http://developer.intel.com/opensource . I thought that all new code should be submitted to the FSF? Is it really ok to commit this code from a copyright side? Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From drepper@redhat.com Mon Feb 19 01:24:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 19 Feb 2001 01:24:00 -0000 Subject: Copyright of ia64 libm code References: Message-ID: Andreas Jaeger writes: > I thought that all new code should be submitted to the FSF? Is it > really ok to commit this code from a copyright side? The code is under a BSD copyright just like the old libm code. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jes@linuxcare.com Mon Feb 19 02:07:00 2001 From: jes@linuxcare.com (Jes Sorensen) Date: Mon, 19 Feb 2001 02:07:00 -0000 Subject: glibc 2.2.2 test-double failure References: <20010216202728.P768@sunsite.ms.mff.cuni.cz> <20010216113719.A8510@valinux.com> <20010216205552.Q768@sunsite.ms.mff.cuni.cz> Message-ID: >>>>> "Jakub" == Jakub Jelinek writes: Jakub> On Fri, Feb 16, 2001 at 11:37:19AM -0800, H . J . Lu wrote: >> On Fri, Feb 16, 2001 at 08:27:28PM +0100, Jakub Jelinek wrote: > >> Hi! > > I've done make check of 2.2.2 on various platforms, alpha >> & alphaev6 > succeeded, ia64 failed with the usual ex5, ex9, ex10 >> thread tests needing to > be killed (it is 4way ia64 FYI), i686 >> succeeded but i386 build failed >> >> I have no problems on ia64. I have a one-way BigSur. I am running >> 2.4.1 plus the 010131 ia64 patch. Jakub> At least ex5 seems to be reproducible, so I'll try to look at Jakub> it next week. I see these ones as well on my SMP BigSur. I wasn't quite sure if it was a common glibc problem or ia64 specific. Jes From jes@linuxcare.com Mon Feb 19 02:08:00 2001 From: jes@linuxcare.com (Jes Sorensen) Date: Mon, 19 Feb 2001 02:08:00 -0000 Subject: Copyright of ia64 libm code References: Message-ID: >>>>> "Andreas" == Andreas Jaeger writes: Andreas> I thought that all new code should be submitted to the FSF? Andreas> Is it really ok to commit this code from a copyright side? I think it is worth noticing there that it's a request not a demand, in that sense it is not conflicting with the GPL or other of our favorite licences. Jes From jakub@redhat.com Mon Feb 19 02:53:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 19 Feb 2001 02:53:00 -0000 Subject: [PATCH] Fix fastlocks on SMP References: <20010217230632.A684@sunsite.ms.mff.cuni.cz> <20010218092908.A13591@valinux.com> Message-ID: <20010219115513.C684@sunsite.ms.mff.cuni.cz> On Sun, Feb 18, 2001 at 09:29:08AM -0800, H . J . Lu wrote: > > The following patch seems to cure ex5, ex9 and ex10 on ia64/SMP. Basically, if > > lock->__status had lowest bit set on spin_count 0, it would always spin > > until max_count, since lock->__status was cached in a register and never > > reloaded. __compare_and_swap clobbers it, but the codepath with > > (__status & 1) == 1 skips that, so there is nothing which requires gcc not > > to reload register caching lock->__status only inside of the conditionally > > executed code. > > The patch is attached in two variants, both seem to fix ex5, ex9 and ex10 > > (the tests which were previously failing on smp ia64), but the first results > > in better code while the second one is perhaps more readable. > > The assembly difference is in fact only: > > ld8 r15=[r32];; > > in first patch changed to > > ld8.acq r15=[r32];; > > in the second. I don't have ia64 manuals here at home so I cannot check, but > > ld8.acq smells like it would do cache-line ping-pong which is the code > > exactly trying to avoid (by only doing CAS if normal loads tells it could be > > successful). > > > > This may be related to the change we made for __compare_and_swap and > __compare_and_swap_with_release_semantics. The instruction may need > the acquire semantics. We may need to exam all places around > __compare_and_swap. No, this is not related to those changes. The bug is ia64 related only because on other platforms gcc apparently reloads the value from memory in every cycle while it does not have to. I don't think a load with acquire semantics is needed there. Jakub From drepper@redhat.com Mon Feb 19 10:48:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 19 Feb 2001 10:48:00 -0000 Subject: [PATCH] Fix fastlocks on SMP References: <20010217230632.A684@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > 2001-02-17 Jakub Jelinek > > * spinlock.c (__pthread_lock): Force lock->__status to be read from > memory on every spin. I've applied the first patch now. Thanks, -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Feb 19 10:51:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 19 Feb 2001 10:51:00 -0000 Subject: Patch for malloc/mtrace.c References: <200102181102.f1IB28o15850@delius.kettenis.local> Message-ID: Mark Kettenis writes: > (2) isn't an issue, since mtrace() itself isn't ISO C, Right. So what's the problem? > I'd personally still prefer using the attached patch to solve the > problem. Whatever. This just makes mtrace unusable outside glibc. Not that I care. Thanks, -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Mon Feb 19 23:46:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 19 Feb 2001 23:46:00 -0000 Subject: math, math, math... Message-ID: You might have seen the batch of changes which I added yesterday. These sources are mainly Intel's hand-written, optimized, and fairly accurate libm for IA-64. I've checked in all the code which already works, some files have errors. I'll do accuracy measurements using the programs I wrote several years ago once I have a bit of time. THe other change which went in was a 96bit long double implementation of j1. Stephen Moshier is hopefully providing appropriate versions of the other missing functions are well (and perhaps 128bit versions). But that's not all. I have another giant patch waiting here. It's a complete rewrite of quite a lot of math functions contributed by IBM. Their guys in Haifa are really today's elite in math library implementations. The functions have last bit accuracy, no bit wrong. As for the Intel libm integrating this one will be tricky. The structure is different from what we expect. I cannot do it right now. After yesterday's partly incomplete patch things are back to normal now. I've successfully compiled the current veriso on x86, IA64, Alpha, PPC, and Arm. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From aj@suse.de Tue Feb 20 00:11:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 20 Feb 2001 00:11:00 -0000 Subject: math, math, math... References: Message-ID: Ulrich Drepper writes: > You might have seen the batch of changes which I added yesterday. > These sources are mainly Intel's hand-written, optimized, and fairly > accurate libm for IA-64. I've checked in all the code which already > works, some files have errors. I'll do accuracy measurements using > the programs I wrote several years ago once I have a bit of time. > > THe other change which went in was a 96bit long double implementation > of j1. Stephen Moshier is hopefully providing appropriate versions of > the other missing functions are well (and perhaps 128bit versions). Excellent! > But that's not all. I have another giant patch waiting here. It's a > complete rewrite of quite a lot of math functions contributed by IBM. > Their guys in Haifa are really today's elite in math library > implementations. The functions have last bit accuracy, no bit wrong. > As for the Intel libm integrating this one will be tricky. The > structure is different from what we expect. I cannot do it right now. Do you have any documentation about the functions or can you provide me with the current version of the patches? > After yesterday's partly incomplete patch things are back to normal > now. I've successfully compiled the current veriso on x86, IA64, > Alpha, PPC, and Arm. Thanks, Andreas -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From drepper@redhat.com Tue Feb 20 00:22:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 20 Feb 2001 00:22:00 -0000 Subject: math, math, math... References: Message-ID: Andreas Jaeger writes: > Do you have any documentation about the functions or can you provide > me with the current version of the patches? There are no patches, just a bunch of functions which are meant to be compiled standalone. I really do not yet know how to integrate them. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From schwab@suse.de Tue Feb 20 01:03:00 2001 From: schwab@suse.de (Andreas Schwab) Date: Tue, 20 Feb 2001 01:03:00 -0000 Subject: sysdeps/ia64/fpu/Makefile Message-ID: A sysdep Makefile should never modify routines, but rather sysdep_routines. The same goes for CPPFLAGS vs sysdep-CPPFLAGS. Andreas. 2001-02-20 Andreas Schwab * sysdeps/ia64/fpu/Makefile: Modify sysdep_routines instead of routines, and sysdep-CPPFLAGS instead of CPPFLAGS. --- sysdeps/ia64/fpu/Makefile.~1.2.~ Tue Feb 20 09:31:52 2001 +++ sysdeps/ia64/fpu/Makefile Tue Feb 20 10:00:03 2001 @@ -4,6 +4,6 @@ $(calls) $(calls:=f) $(long-c-$(long-double-fcts)) \ libm_frexp4 libm_frexp4f libm_frexp4l -routines += libm_frexp4 libm_frexp4f libm_frexp4l libc_libm_error -CPPFLAGS += -DSIZE_INT_32 +sysdep_routines += libm_frexp4 libm_frexp4f libm_frexp4l libc_libm_error +sysdep-CPPFLAGS += -DSIZE_INT_32 endif -- Andreas Schwab "And now for something SuSE Labs completely different." Andreas.Schwab@suse.de SuSE GmbH, Schanz????ckerstr. 10, D-90443 N????rnberg From aj@suse.de Tue Feb 20 05:38:00 2001 From: aj@suse.de (Andreas Jaeger) Date: Tue, 20 Feb 2001 05:38:00 -0000 Subject: Remove omit-long-double-fcts Message-ID: We don't seem to use omit-long-double-fcts: $ grep -r omit-long-double-fcts . ./math/Makefile:# Using omit-long-double-fcts is only a temporary hack. ./math/Makefile:ifneq ($(omit-long-double-fcts),yes) ./ChangeLog.7: static tests to link. Honour $(omit-long-double-fcts) == yes. I propose to remove it. Ok to commit? Andreas 2001-02-20 Andreas Jaeger * math/Makefile: Remove omit-long-double-fcts. ============================================================ Index: math/Makefile --- math/Makefile 2001/02/17 17:01:29 1.102 +++ math/Makefile 2001/02/20 13:35:37 @@ -143,8 +143,6 @@ # only the fdlibm code. CPPFLAGS += -D__NO_MATH_INLINES -D__LIBC_INTERNAL_MATH_INLINES -# Using omit-long-double-fcts is only a temporary hack. -ifneq ($(omit-long-double-fcts),yes) ifneq ($(long-double-fcts),yes) # The `double' and `long double' types are the same on this machine. # We won't compile the `long double' code at all. Tell the `double' code @@ -152,7 +150,6 @@ # defining those aliases, tell to declare the `FUNCl' names with # `double' instead of `long double'. CPPFLAGS += -DNO_LONG_DOUBLE -D_Mlong_double_=double -endif endif # The fdlibm code generates a lot of these warnings but is otherwise clean. -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj From kkojima@rr.iij4u.or.jp Tue Feb 20 15:59:00 2001 From: kkojima@rr.iij4u.or.jp (kaz Kojima) Date: Tue, 20 Feb 2001 15:59:00 -0000 Subject: math, math, math... References: Message-ID: <200102202358.IAA12117@rr.iij4u.or.jp> Hi, Ulrich Drepper wrote: > After yesterday's partly incomplete patch things are back to normal > now. I've successfully compiled the current veriso on x86, IA64, > Alpha, PPC, and Arm. The current version is successfully compiled on SH also. Thanks, kaz From jakub@redhat.com Fri Feb 23 07:59:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 23 Feb 2001 07:59:00 -0000 Subject: [PATCH] Unify max stacksize handling between __pthread_attr_setstacksize and __pthread_initialize_manager Message-ID: <20010223170307.O684@sunsite.ms.mff.cuni.cz> Hi! If pthread_attr_setstacksize is called before manager thread is kicked in, pthread_attr_setstacksize will usually have different upper limit than when it is called after starting up manager, which seem pretty inconsistent to me. 2001-02-23 Jakub Jelinek * internals.h (__pthread_init_max_stacksize): New prototype. * attr.c (__pthread_attr_setstacksize): Call __pthread_init_max_stacksize if not yet initialized. * pthread.c (__pthread_init_max_stacksize): New function. (__pthread_initialize_manager): Call it. Patch by . --- libc/linuxthreads/internals.h.jj Wed Feb 7 13:57:05 2001 +++ libc/linuxthreads/internals.h Fri Feb 23 17:05:10 2001 @@ -429,6 +429,7 @@ static inline pthread_descr thread_self extern void __pthread_destroy_specifics (void); extern void __pthread_perform_cleanup (void); +extern void __pthread_init_max_stacksize (void); extern int __pthread_initialize_manager (void); extern void __pthread_message (char * fmt, ...); extern int __pthread_manager (void *reqfd); --- libc/linuxthreads/attr.c.jj Tue Jan 2 14:17:38 2001 +++ libc/linuxthreads/attr.c Fri Feb 23 17:31:29 2001 @@ -193,16 +193,7 @@ int __pthread_attr_setstacksize(pthread_ problem if the manager is already started and we determined it. If this hasn't happened, we have to find the limit outself. */ if (__pthread_max_stacksize == 0) - { - struct rlimit limit; - - getrlimit(RLIMIT_STACK, &limit); -# ifdef NEED_SEPARATE_REGISTER_STACK - __pthread_max_stacksize = limit.rlim_max / 2; -# else - __pthread_max_stacksize = limit.rlim_max; -# endif - } + __pthread_init_max_stacksize (); if (stacksize > __pthread_max_stacksize) return EINVAL; --- libc/linuxthreads/pthread.c.jj Sat Feb 3 12:03:21 2001 +++ libc/linuxthreads/pthread.c Fri Feb 23 17:49:51 2001 @@ -456,19 +456,10 @@ void __pthread_initialize(void) pthread_initialize(); } -int __pthread_initialize_manager(void) +void __pthread_init_max_stacksize(void) { - int manager_pipe[2]; - int pid; - struct pthread_request request; struct rlimit limit; - int max_stack; - -#ifndef HAVE_Z_NODELETE - if (__builtin_expect (&__dso_handle != NULL, 1)) - __cxa_atexit ((void (*) (void *)) pthread_atexit_retcode, NULL, - __dso_handle); -#endif + size_t max_stack; getrlimit(RLIMIT_STACK, &limit); #ifdef FLOATING_STACKS @@ -478,9 +469,7 @@ int __pthread_initialize_manager(void) max_stack = limit.rlim_cur / 2; # else max_stack = limit.rlim_cur; -#endif - - __pthread_max_stacksize = max_stack; +# endif #else /* Play with the stack size limit to make sure that no stack ever grows beyond STACK_SIZE minus one page (to act as a guard page). */ @@ -496,6 +485,23 @@ int __pthread_initialize_manager(void) setrlimit(RLIMIT_STACK, &limit); } #endif + __pthread_max_stacksize = max_stack; +} + +int __pthread_initialize_manager(void) +{ + int manager_pipe[2]; + int pid; + struct pthread_request request; + +#ifndef HAVE_Z_NODELETE + if (__builtin_expect (&__dso_handle != NULL, 1)) + __cxa_atexit ((void (*) (void *)) pthread_atexit_retcode, NULL, + __dso_handle); +#endif + + if (__pthread_max_stacksize == 0) + __pthread_init_max_stacksize (); /* If basic initialization not done yet (e.g. we're called from a constructor run before our constructor), do it now */ if (__pthread_initial_thread_bos == NULL) pthread_initialize(); Jakub From jakub@redhat.com Fri Feb 23 14:14:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Fri, 23 Feb 2001 14:14:00 -0000 Subject: pthread_sighandler Message-ID: <20010223231721.P684@sunsite.ms.mff.cuni.cz> Hi! On several architectures pthread_sighandler takes as last argument some structure or union which it copies down to the actual signal handler it calls. I got already second request (one from libjava folks, the other one now in our bugzilla) that this ctx is copied back, because otherwise if signal handler sets ctx.eip or some other register and returns instead of longjmping, the result is different in threaded application (it has no effect) and non-threaded application (it works as expected). Unfortunately, there does not seem to be an easy way how to copy back the structure argument after the call, basically the only solution I can think about is a small assembly stub routine which would pthread_sighandler call instead of sighandler[signo].old(signo, SIGCONTEXT_EXTRA_ARGS ctx);, something like CALL_SIGHANDLER(sighandler[signo].old, signo, SIGCONTEXT_EXTRA_ARGS ctx) which could on some architectures be expanded to what this used to be (if ctx is a pointer) or to some call_sighandler(sighandler[signo].old, signo, &ctx); call which would in assembly allocate stack for the signo and ctx arguments, copy ctx in, call the handler and afterwards copy the structure back. What do you think? Jakub From drepper@redhat.com Fri Feb 23 14:26:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Fri, 23 Feb 2001 14:26:00 -0000 Subject: pthread_sighandler References: <20010223231721.P684@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > What do you think? Not much. This is simply undocumented are fragile. Nobody should depend on it. I won't spend my time thinking about this. If you come up with a patch and it doesn't add much overhead to the general case (since 99% of the users are not insane and don't use it) then maybe. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Sun Feb 25 08:29:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Sun, 25 Feb 2001 08:29:00 -0000 Subject: norwegian locale.alias entries References: <20010219095537.B684@sunsite.ms.mff.cuni.cz> Message-ID: Jakub Jelinek writes: > How should the norwegian locale aliases work? > We install no_NO and nn_NO directories, plus have: > [...] Yes, this is a problem. I think until nb_NO catches up the locale shouldn't be used. I've added mappings from nb_NO but bokmal etc map again to no_NO. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jakub@redhat.com Mon Feb 26 08:13:00 2001 From: jakub@redhat.com (Jakub Jelinek) Date: Mon, 26 Feb 2001 08:13:00 -0000 Subject: [PATCH] pthread_sighandler References: <20010223231721.P684@sunsite.ms.mff.cuni.cz> Message-ID: <20010226171714.S684@sunsite.ms.mff.cuni.cz> On Fri, Feb 23, 2001 at 02:25:48PM -0800, Ulrich Drepper wrote: > Jakub Jelinek writes: > > > What do you think? > > Not much. This is simply undocumented are fragile. Nobody should > depend on it. I won't spend my time thinking about this. If you come > up with a patch and it doesn't add much overhead to the general case > (since 99% of the users are not insane and don't use it) then maybe. What about this? I've done the i386 case only so far, I could try to do alpha later on. I don't think it adds much overhead. I wanted to make sure 16 byte alignment is ensured for the signal handler in case it would use SSE, that's why it looks uglier than it could. This is the testcase I was testing it on: #include #include void segv (int signo, struct sigcontext ctx) { ctx.eip += 2; } int main(void) { struct sigaction s; sigemptyset (&s.sa_mask); s.sa_handler = (void *)segv; s.sa_flags = SA_ONESHOT; sigaction (SIGSEGV, &s, NULL); asm volatile ("movl %0, (%0)" : : "r" (0)); return 0; } (i386 specific, works without -lpthread in all glibcs and with -lpthread with this patch in). 2001-02-26 Jakub Jelinek * signals.c (pthread_sighandler): Use CALL_SIGHANDLER. * sysdeps/generic/sigcontextinfo.h (CALL_SIGHANDLER): Define. * sysdeps/mach/hurd/i386/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/arm/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/i386/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/s390/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/sh/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h: Likewise. --- libc/linuxthreads/signals.c.jj Fri Feb 23 16:03:33 2001 +++ libc/linuxthreads/signals.c Mon Feb 26 17:25:50 2001 @@ -94,7 +94,7 @@ static void pthread_sighandler(int signo in_sighandler = THREAD_GETMEM(self, p_in_sighandler); if (in_sighandler == NULL) THREAD_SETMEM(self, p_in_sighandler, CURRENT_STACK_FRAME); - sighandler[signo].old(signo, SIGCONTEXT_EXTRA_ARGS ctx); + CALL_SIGHANDLER(sighandler[signo].old, signo, ctx); if (in_sighandler == NULL) THREAD_SETMEM(self, p_in_sighandler, NULL); } --- libc/sysdeps/generic/sigcontextinfo.h.jj Mon Aug 23 19:41:16 1999 +++ libc/sysdeps/generic/sigcontextinfo.h Mon Feb 26 17:28:13 2001 @@ -23,3 +23,5 @@ #define GET_PC(ctx) ((void *) 0) #define GET_FRAME(ctx) ((void *) 0) #define GET_STACK(ctx) ((void *) 0) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/mach/hurd/i386/sigcontextinfo.h.jj Mon Aug 23 19:41:41 1999 +++ libc/sysdeps/mach/hurd/i386/sigcontextinfo.h Mon Feb 26 17:28:18 2001 @@ -21,3 +21,5 @@ #define GET_PC(ctx) ((void *) (ctx).sc_eip) #define GET_FRAME(ctx) ((void *) (ctx).sc_ebp) #define GET_STACK(ctx) ((void *) (ctx).sc_uesp) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h.jj Mon Aug 23 19:42:07 1999 +++ libc/sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h Mon Feb 26 17:28:23 2001 @@ -21,3 +21,5 @@ #define GET_PC(ctx) ((void *) (ctx).sc_pc) #define GET_FRAME(ctx) ((void *) (ctx).sc_regs[15]) #define GET_STACK(ctx) ((void *) (ctx).sc_regs[30]) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h.jj Mon Jun 12 22:43:23 2000 +++ libc/sysdeps/unix/sysv/linux/sh/sigcontextinfo.h Mon Feb 26 17:28:34 2001 @@ -23,3 +23,5 @@ #define GET_PC(ctx) ((void *) ctx.sc_pc) #define GET_FRAME(ctx) ((void *) ctx.sc_regs[14]) #define GET_STACK(ctx) ((void *) ctx.sc_regs[15]) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h.jj Wed Aug 2 17:14:21 2000 +++ libc/sysdeps/unix/sysv/linux/s390/sigcontextinfo.h Mon Feb 26 17:28:39 2001 @@ -24,3 +24,5 @@ #define GET_PC(ctx) ((void *)((ctx)->sregs->regs.psw.addr)) #define GET_FRAME(ctx) (*(void **)((ctx)->sregs->regs.gprs[11])) #define GET_STACK(ctx) ((void *)((ctx)->sregs->regs.gprs[15])) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h.jj Thu Jan 13 10:47:56 2000 +++ libc/sysdeps/unix/sysv/linux/arm/sigcontextinfo.h Mon Feb 26 17:28:47 2001 @@ -31,3 +31,5 @@ ctx.v20.reg.ARM_sp : ctx.v21.arm_sp)) #define ADVANCE_STACK_FRAME(frm) \ ((struct layout *)frm - 1) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h.jj Mon Aug 23 19:42:51 1999 +++ libc/sysdeps/unix/sysv/linux/i386/sigcontextinfo.h Mon Feb 26 17:17:38 2001 @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -22,3 +22,30 @@ #define GET_PC(ctx) ((void *) ctx.eip) #define GET_FRAME(ctx) ((void *) ctx.ebp) #define GET_STACK(ctx) ((void *) ctx.esp_at_signal) +#define CALL_SIGHANDLER(handler, signo, ctx) \ +do { \ + int __tmp1, __tmp2, __tmp3, __tmp4; \ + __asm __volatile ("movl\t%%esp, %%edi\n\t" \ + "andl\t$-16, %%esp\n\t" \ + "subl\t%8, %%esp\n\t" \ + "movl\t%%edi, %c8-4(%%esp)\n\t" \ + "movl\t%1, 0(%%esp)\n\t" \ + "leal\t4(%%esp), %%edi\n\t" \ + "cld\n\t" \ + "rep\tmovsl\n\t" \ + "call\t*%0\n\t" \ + "cld\n\t" \ + "movl\t%9, %%ecx\n\t" \ + "subl\t%%edi, %%esi\n\t" \ + "leal\t4(%%esp,%%esi,1), %%edi\n\t" \ + "leal\t4(%%esp), %%esi\n\t" \ + "rep\tmovsl\n\t" \ + "movl\t%c8-4(%%esp), %%esp\n\t" \ + : "=a" (__tmp1), "=d" (__tmp2), "=S" (__tmp3), \ + "=c" (__tmp4) \ + : "0" (handler), "1" (signo), "2" (&ctx), \ + "3" (sizeof (struct sigcontext) / 4), \ + "n" ((sizeof (struct sigcontext) + 19) & ~15), \ + "i" (sizeof (struct sigcontext) / 4) \ + : "cc", "edi"); \ +} while (0) --- libc/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h.jj Mon Aug 23 19:43:28 1999 +++ libc/sysdeps/unix/sysv/linux/m68k/sigcontextinfo.h Mon Feb 26 17:28:51 2001 @@ -22,3 +22,5 @@ #define GET_PC(ctx) ((void *) (ctx)->sc_pc) #define GET_FRAME(ctx) ((void *) __builtin_frame_address (1)) #define GET_STACK(ctx) ((void *) (ctx)->sc_usp) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h.jj Wed Jan 31 16:35:23 2001 +++ libc/sysdeps/unix/sysv/linux/mips/sigcontextinfo.h Mon Feb 26 17:28:54 2001 @@ -23,3 +23,5 @@ #define GET_PC(ctx) ((void *) ctx->sc_pc) #define GET_FRAME(ctx) ((void *) ctx->sc_regs[30]) #define GET_STACK(ctx) ((void *) ctx->sc_regs[29]) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h.jj Mon Aug 23 19:43:48 1999 +++ libc/sysdeps/unix/sysv/linux/powerpc/sigcontextinfo.h Mon Feb 26 17:28:58 2001 @@ -23,3 +23,5 @@ #define GET_PC(ctx) ((void *)((ctx)->regs->nip)) #define GET_FRAME(ctx) (*(void **)((ctx)->regs->gpr[1])) #define GET_STACK(ctx) ((void *)((ctx)->regs->gpr[1])) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h.jj Wed Mar 29 16:07:30 2000 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/sigcontextinfo.h Mon Feb 26 17:29:02 2001 @@ -25,3 +25,5 @@ #define GET_STACK(__ctx) ((void *) (__ctx)->si_regs.u_regs[14]) #define GET_FRAME(__ctx) ADVANCE_STACK_FRAME (GET_STACK(__ctx)) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) --- libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h.jj Fri Dec 10 15:15:34 1999 +++ libc/sysdeps/unix/sysv/linux/sparc/sparc64/sigcontextinfo.h Mon Feb 26 17:29:06 2001 @@ -28,3 +28,5 @@ + STACK_BIAS))+14)) #define GET_STACK(__ctx) ((void *) ((__ctx)->sigc_regs.u_regs[14])) #define GET_FRAME(__ctx) ADVANCE_STACK_FRAME (GET_STACK (__ctx)) +#define CALL_SIGHANDLER(handler, signo, ctx) \ + (handler)((signo), SIGCONTEXT_EXTRA_ARGS (ctx)) Jakub From greg@mcgary.org Mon Feb 26 21:14:00 2001 From: greg@mcgary.org (Greg McGary) Date: Mon, 26 Feb 2001 21:14:00 -0000 Subject: PATCH: Handle `V' keyletter in make-syscalls.sh Message-ID: <200102270514.WAA15908@kayak.mcgary.org> This problem didn't show up in 2.2 kernels because it has no mincore. 2001-02-26 Greg McGary * sysdeps/unix/make-syscalls.sh (ptr): Handle `V' keyletter. OK to commit? Index: sysdeps/unix/make-syscalls.sh =================================================================== RCS file: /cvs/glibc/libc/sysdeps/unix/make-syscalls.sh,v retrieving revision 1.22 diff -u -p -r1.22 make-syscalls.sh --- make-syscalls.sh 2000/09/08 08:41:45 1.22 +++ make-syscalls.sh 2001/02/27 05:12:03 @@ -24,7 +24,7 @@ # V: byte-per-page vector (3rd arg to mincore) # W: wait status, optionally-NULL pointer to int (e.g., 2nd arg of wait4) -ptr='[abBfFINpPsSW]' # all pointer keyletters +ptr='[abBfFINpPsSWV]' # all pointer keyletters int='[inv]' # all scalar keyletters typ='[ifnNpP]' # typed-arg keyletters: we capture type for use in thunk From drepper@redhat.com Mon Feb 26 21:19:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Mon, 26 Feb 2001 21:19:00 -0000 Subject: PATCH: Handle `V' keyletter in make-syscalls.sh References: <200102270514.WAA15908@kayak.mcgary.org> Message-ID: Greg McGary writes: > OK to commit? OK. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From drepper@redhat.com Tue Feb 27 22:23:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Tue, 27 Feb 2001 22:23:00 -0000 Subject: in case you wonder... Message-ID: ...the ld.so changes I just checked in are only cleanups. They reduce the binary size by about 2.5k. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------ From jes@linuxcare.com Wed Feb 28 07:10:00 2001 From: jes@linuxcare.com (Jes Sorensen) Date: Wed, 28 Feb 2001 07:10:00 -0000 Subject: dl-misc compile fix Message-ID: <200102281509.QAA30565@lxplus015.cern.ch> 2001-02-28 Jes Sorensen * elf/dl-misc.c (_dl_debug_vdprintf): Remove superflous semi-colon. --- elf/dl-misc.c~ Wed Feb 28 10:00:35 2001 +++ elf/dl-misc.c Wed Feb 28 10:13:18 2001 @@ -181,7 +181,7 @@ different size. */ #if LONG_MAX != INT_MAX unsigned long int num = (long_mod - ? va_arg (arg, unsigned long int); + ? va_arg (arg, unsigned long int) : va_arg (arg, unsigned int)); #else unsigned long int num = va_arg (arg, unsigned int); From drepper@redhat.com Wed Feb 28 07:16:00 2001 From: drepper@redhat.com (Ulrich Drepper) Date: Wed, 28 Feb 2001 07:16:00 -0000 Subject: dl-misc compile fix References: <200102281509.QAA30565@lxplus015.cern.ch> Message-ID: Jes Sorensen writes: > 2001-02-28 Jes Sorensen > > * elf/dl-misc.c (_dl_debug_vdprintf): Remove superflous semi-colon. Already taken care of. -- ---------------. ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Red Hat `--' drepper at redhat.com `------------------------