aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-08-14 01:54:13 +0000
committerUlrich Drepper <drepper@redhat.com>1997-08-14 01:54:13 +0000
commitca34d7a7c77fa8dc823fd05439870e5a96610c5a (patch)
tree4b4057b8b919007f42caa4e1558bb9c5487976ae /posix
parent0413b54c02d31cae62e8d13b3ee7ac109ceeff0e (diff)
downloadglibc-ca34d7a7c77fa8dc823fd05439870e5a96610c5a.tar
glibc-ca34d7a7c77fa8dc823fd05439870e5a96610c5a.tar.gz
glibc-ca34d7a7c77fa8dc823fd05439870e5a96610c5a.tar.bz2
glibc-ca34d7a7c77fa8dc823fd05439870e5a96610c5a.zip
1997-08-14 03:14 Ulrich Drepper <drepper@cygnus.com> * elf/dl-minimal.c: Don't use relative #include paths. (malloc): Don't try to initialize _dl_pagesize, it already is. (__sigjmp_save, longjmp): Reformat. * sysdeps/generic/dl-sysdep.c: Implement _dl_show_auxv function to show content of auxiliary array. (_dl_sysdep_start): Remember start of auxiliary vector. * sysdeps/mach/hurd/dl-sysdep.c: (_dl_show_auxv): New dummy function. * elf/link.h: Add prototype for _dl_show_auxv. * elf/rtld.c (dl_main): Call _dl_show_auxv if LD_SHOW_AUXV envvar is present. * libio/iofdopen.c: Better prepare for use in libstdc++. * libio/iofflush.c: Likewise. * libio/iofgetpos.c: Likewise. * libio/iofgets.c: Likewise. * libio/iofopen.c: Likewise. * libio/iofputs.c: Likewise. * libio/iofread.c: Likewise. * libio/iofsetpos.c: Likewise. * libio/ioftell.c: Likewise. * libio/iofwrite.c: Likewise. * libio/iogetdelim.c: Likewise. * libio/iogets.c: Likewise. * libio/iopopen.c: Likewise. * libio/ioputs.c: Likewise. * libio/iosetbuffer.c: Likewise. * libio/iosetvbuf.c: Likewise. * libio/ioungetc.c: Likewise. * libio/iovsprintf.c: Likewise. * libio/iovsscanf.c: Likewise. * manual/creature.texi: Mention _XOPEN_SOURCE_EXTENDED in correct place. * manual/math.texi: Add comment to sincos decsription to say it's a GNU extension. Fix description of random function. * posix/fnmatch.h: Recognize Windog by _WINDOWS32 not WIN32. * posix/glob.c: Likewise. Handle stupid system headers on SunOS. Add casts for all __alloca calls. * posix/glob.h: Recognize Windog by _WINDOWS32 not WIN32. Declare additional GLOB_* constants also if _GNU_SOURCE is defined. Patches by Paul D. Smith <psmith@BayNetworks.COM>. * stdio-common/_itoa.c: Don't use relateive #include paths. * sysdeps/i386/fpu/bits/mathinline.h: Enable optimizations even for gcc 2.7. (atan): Loading 1.0 from memory does not pay off. (asinh): Fix typo. 1997-08-13 09:44 Philip Blundell <Philip.Blundell@pobox.com> * sysdeps/stub/accept.c: Use socklen_t where necessary. * sysdeps/stub/bind.c: Likewise. * sysdeps/stub/connect.c: Likewise. * sysdeps/stub/getsockname.c: Likewise. * sysdeps/stub/getsockopt.c: Likewise. * sysdeps/stub/recvfrom.c: Likewise. * sysdeps/stub/sendto.c: Likewise. * sysdeps/stub/setsockopt.c: Likewise. 1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * io/ftw.c (object_compare): Avoid memcmp when comparing scalar types. 1997-08-12 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * math/libm-test.c (cbrt_test): Add epsilon for long double to `cbrt (-0.001)'. 1997-08-11 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/stub/bits/string.h: Fix comment. 1997-08-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/Makefile (routines): Remove dl-version. (dl-routines): Add it here instead. This removes dead code from libc.so. 1997-08-12 17:17 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> * malloc/thread-m.h (thread_atfork, thread_atfork_static): New macros to encapsulate pthread_atfork's functionality. * malloc/malloc.c (ptmalloc_lock_all, ptmalloc_unlock_all): New functions, registered via thread_atfork in the initialization routine or via thread_atfork_static in global scope. This ensures a consistent state of all locks across fork(). 1997-08-11 23:00:32 1997 Mark Kettenis <kettenis@phys.uva.nl> * login/programs/xtmp.c (compare_entry): Partially undo patch made by Klaus Espenlaub. There was no xtmp/utmp typo. Added comment to cclarify this. * login/programs/xtmp.h: Likewise. * posix/getopt.c: Recognize Windog by _WINDOWS32 not WIN32. Patch by Paul D. Smith <psmith@BayNetworks.COM>. 1997-08-12 13:51 Ulrich Drepper <drepper@cygnus.com> * login/getutid.c: Rename to __getutid and make getutid and getutxid weak aliases. Patch by ir. Mark M._Kettenis <kettenis@phys.uva.nl>. 1997-08-11 23:55 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/Makefile [subdir=misc] (sysdep_headers): Add bits/mman.h. 1997-08-11 08:51:21 1997 H.J. Lu <hjl@gnu.ai.mit.edu> * stdlib/fmtmsg.c (fmtmsg): Add static to __libc_once_define macro. * libc.map (__progname_full, __progname): Added. 1997-08-04 08:31 H.J. Lu <hjl@gnu.ai.mit.edu> * sysdeps/unix/sysv/linux/if_index.c (if_nametoindex): Return 0 if SIOGIFINDEX is not defined. (if_indextoname): Initialize "result" to NULL. (if_nametoindex, if_nameindex): Fix ENOSYS setting. 1997-08-11 11:58 Richard Henderson <rth@cygnus.com> Sparc ISO C 9x exception handling: * sysdeps/sparc/fpu/bits/mathdef.h: New file. * sysdeps/sparc/fpu/fclrexcpt.c: New file. * sysdeps/sparc/fpu/fegetenv.c: New file. * sysdeps/sparc/fpu/fegetround.c: New file. * sysdeps/sparc/fpu/feholdexcpt.c: New file. * sysdeps/sparc/fpu/fesetenv.c: New file. * sysdeps/sparc/fpu/fesetround.c: New file. * sysdeps/sparc/fpu/feupdateenv.c: New file. * sysdeps/sparc/fpu/fgetexcptflg.c: New file. * sysdeps/sparc/fpu/fraiseexcpt.c: New file. * sysdeps/sparc/fpu/fsetexcptflg.c: New file. * sysdeps/sparc/fpu/ftestexcept.c: New file. * sysdeps/sparc/sparc32/fpu/bits/fenv.h: New file. * sysdeps/sparc/sparc64/fpu/bits/fenv.h: New file. 1997-08-11 11:58 Richard Henderson <rth@cygnus.com> Sparc64 merge: * configure.in: Change up subdirectories, rename sparc8->sparcv8. * csu/Makefile: Nuke need-nopic-initfini bits. The problem was that sparc64 ld did not recognize pic relocs at all. * elf/dl-deps.c: Include <string.h>. * elf/do-rel.h (elf_dynamic_do_rel): Take reloc address and size directly instead of the DT names to get them from. * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): New macro distilled from ELF_DYNAMIC_DO_REL{,A}. Define a second version that accounts for the possibility that DT_RELA and DT_JMPPLT overlap, as such is the case on the Sparc. * elf/elf.h: Stub out Elf64_Ver*, and make them the same as the Elf32_Ver* bits. The linker does not even know to differentiate between the word sizes. Someone should examine this and figure out what the proper sizes of things should be for 64-bit hosts before the sparc64 libraries are distributed. * shlib-versions: Rename sparc64 ld.so to not conflict with sparc32 on the same machine. Move old sysdeps/sparc contents to sysdeps/sparc/sparc32, rename sparc8 subdir to sparcv8, move sysdeps/sparc64 content to sysdeps/sparc/sparc64. Same for sysdeps/unix/sysv/linux/sparc. * sysdeps/sparc/Implies: Do ieee754 here. * sysdeps/sparc/configure.in: Move from sparc32/. * sysdeps/sparc/sparc32/Implies: Do wordsize here. * sysdeps/sparc/sparc64/Implies: Likewise. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_load_address): Use uninitialized .got to find load address instead of AT_BASE, as the later does not exist when running ld.so directly. * sysdeps/sparc/sparc32/fpu/fpu_control.h: Move from ../. * sysdeps/sparc/sparc64/fpu/fpu_control.h: Likewise. * sysdeps/sparc/sparc32/udiv_qrnnd.S: Clean up PIC support. * sysdeps/sparc/sparc64/Makefile (sysdep_routines): Add s_finitel and s_signbitl for stdio. * sysdeps/sparc/sparc64/configure.in: Remove, we no longer need nopic_initfini. * sysdeps/sparc/sparc64/bsd-_setjmp.S: Remove. * sysdeps/sparc/sparc64/bsd-setjmp.S: Remove. * sysdeps/unix/sysv/linux/sparc/sparc64/bsd-_setjmp.S: New empty file. * sysdeps/unix/sysv/linux/sparc/sparc64/bsd-setjmp.S: New empty file. * sysdeps/unix/sysv/linux/sparc/sparc64/longjmp.S: Add __longjmp alias. * sysdeps/unix/sysv/linux/sparc/sparc64/setjmp.S: Add weak _setjmp and setjmp entry points. * sysdeps/sparc/sparc64/dl-machine.h: Finish real implementation. * sysdeps/sparc/sparc64/elf/crtbegin.S: Add copyright, fix PIC. * sysdeps/sparc/sparc64/elf/crtend.S: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h (struct sigaction): Fix sa_flags size for sparc64; add sa_restorer for kernel. * sysdeps/unix/sysv/linux/sparc/sparc64/brk.S: Fix PIC. * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/init-first.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscall.S: New file. 1997-08-10 18:29:08 1997 Mark Kettenis <kettenis@phys.uva.nl> * login/login.c (login): Check for correct return value of utmpname. 1997-08-11 16:49 Ulrich Drepper <drepper@cygnus.com> * time/tzset.c (__tzset_internal): Correctly handle TZ strings following incorrect old POSIX specs. Patch by Paul Eggert <eggert@twinsun.com>. * sysdeps/generic/bits/sigaction.h: Correct comment for SA_RESTART. * sysdeps/unix/bsd/osf/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/minix/bits/sigaction.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/sigaction.h: Likewise. Reported by NIIBE Yutaka <gniibe@mri.co.jp>. 1997-08-09 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * manual/math.texi: Define the macros @mul and @infinity and use them to format the multiplication and infinity signs. (FP Comparison Functions): Use @code, not @math, for C code examples. * elf/dl-profile.c: Add descriptions and implement reading of
Diffstat (limited to 'posix')
-rw-r--r--posix/fnmatch.h4
-rw-r--r--posix/getopt.c2
-rw-r--r--posix/glob.c41
-rw-r--r--posix/glob.h4
4 files changed, 27 insertions, 24 deletions
diff --git a/posix/fnmatch.h b/posix/fnmatch.h
index 58880eceec..38b7255f4d 100644
--- a/posix/fnmatch.h
+++ b/posix/fnmatch.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ extern "C" {
#endif
#if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
- || defined (WIN32))
+ || defined (WINDOWS32))
#undef __P
#define __P(protos) protos
#else /* Not C++ or ANSI C. */
diff --git a/posix/getopt.c b/posix/getopt.c
index 59b51cd679..c5574eab69 100644
--- a/posix/getopt.c
+++ b/posix/getopt.c
@@ -76,7 +76,7 @@
#endif
#endif
-#if defined (WIN32) && !defined (__CYGWIN32__)
+#if defined (_WINDOWS32) && !defined (__CYGWIN32__)
/* It's not Unix, really. See? Capital letters. */
#include <windows.h>
#define getpid() GetCurrentProcessId()
diff --git a/posix/glob.c b/posix/glob.c
index 6d9af102f8..6a82fe0254 100644
--- a/posix/glob.c
+++ b/posix/glob.c
@@ -37,6 +37,8 @@
/* #define NDEBUG 1 */
#include <assert.h>
+#include <stdio.h> /* Needed on stupid SunOS for assert. */
+
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
@@ -69,7 +71,7 @@
#endif
#endif
-#if !defined (_AMIGA) && !defined (VMS) && !defined(WIN32)
+#if !defined (_AMIGA) && !defined (VMS) && !defined(WINDOWS32)
#include <pwd.h>
#endif
@@ -113,7 +115,7 @@ extern int errno;
#endif
-#if (defined (POSIX) || defined (WIN32)) && !defined (__GNU_LIBRARY__)
+#if (defined (POSIX) || defined (WINDOWS32)) && !defined (__GNU_LIBRARY__)
/* Posix does not require that the d_ino field be present, and some
systems do not provide it. */
#define REAL_DIR_ENTRY(dp) 1
@@ -173,7 +175,7 @@ extern void bcopy ();
__inline
#endif
#ifndef __SASC
-#ifdef WIN32
+#ifdef WINDOWS32
static void *
#else
static char *
@@ -203,11 +205,11 @@ my_realloc (p, n)
#include <alloca.h>
#else /* Not HAVE_ALLOCA_H. */
#ifndef _AIX
-#ifdef WIN32
+#ifdef WINDOWS32
#include <malloc.h>
#else
extern char *alloca ();
-#endif /* WIN32 */
+#endif /* WINDOWS32 */
#endif /* Not _AIX. */
#endif /* sparc or HAVE_ALLOCA_H. */
#endif /* GCC. */
@@ -265,7 +267,8 @@ static
inline
#endif
const char *
-next_brace_sub (const char *begin)
+next_brace_sub (begin)
+ const char *begin;
{
unsigned int depth = 0;
const char *cp = begin;
@@ -504,17 +507,15 @@ glob (pattern, flags, errfunc, pglob)
if (home_dir == NULL || home_dir[0] == '\0')
home_dir = "SYS:";
#else
-#ifdef WIN32
+#ifdef WINDOWS32
if (home_dir == NULL || home_dir[0] == '\0')
home_dir = "c:/users/default"; /* poor default */
#else
if (home_dir == NULL || home_dir[0] == '\0')
{
- extern char *getlogin __P ((void));
- extern int getlogin_r __P ((char *, size_t));
int success;
-
#if defined HAVE_GETLOGIN_R || defined _LIBC
+ extern int getlogin_r __P ((char *, size_t));
size_t buflen = sysconf (_SC_LOGIN_NAME_MAX) + 1;
char *name;
@@ -522,11 +523,13 @@ glob (pattern, flags, errfunc, pglob)
/* `sysconf' does not support _SC_LOGIN_NAME_MAX. Try
a moderate value. */
buflen = 16;
- name = __alloca (buflen);
+ name = (char *) __alloca (buflen);
success = getlogin_r (name, buflen) >= 0;
#else
+ extern char *getlogin __P ((void));
char *name;
+
success = (name = getlogin ()) != NULL;
#endif
if (success)
@@ -536,7 +539,7 @@ glob (pattern, flags, errfunc, pglob)
char *pwtmpbuf;
struct passwd pwbuf, *p;
- pwtmpbuf = __alloca (pwbuflen);
+ pwtmpbuf = (char *) __alloca (pwbuflen);
success = (__getpwnam_r (name, &pwbuf, pwtmpbuf,
pwbuflen, &p) >= 0);
@@ -550,7 +553,7 @@ glob (pattern, flags, errfunc, pglob)
}
if (home_dir == NULL || home_dir[0] == '\0')
home_dir = (char *) "~"; /* No luck. */
-#endif /* WIN32 */
+#endif /* WINDOWS32 */
#endif
/* Now construct the full directory. */
if (dirname[1] == '\0')
@@ -559,13 +562,13 @@ glob (pattern, flags, errfunc, pglob)
{
char *newp;
size_t home_len = strlen (home_dir);
- newp = __alloca (home_len + dirlen);
+ newp = (char *) __alloca (home_len + dirlen);
memcpy (newp, home_dir, home_len);
memcpy (&newp[home_len], &dirname[1], dirlen);
dirname = newp;
}
}
-#if !defined _AMIGA && !defined WIN32
+#if !defined _AMIGA && !defined WINDOWS32
else
{
char *end_name = strchr (dirname, '/');
@@ -576,7 +579,7 @@ glob (pattern, flags, errfunc, pglob)
user_name = dirname + 1;
else
{
- user_name = __alloca (end_name - dirname);
+ user_name = (char *) __alloca (end_name - dirname);
memcpy (user_name, dirname + 1, end_name - dirname);
user_name[end_name - dirname - 1] = '\0';
}
@@ -585,7 +588,7 @@ glob (pattern, flags, errfunc, pglob)
{
#if defined HAVE_GETPWNAM_R || defined _LIBC
size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
- char *pwtmpbuf = __alloca (buflen);
+ char *pwtmpbuf = (char *) __alloca (buflen);
struct passwd pwbuf, *p;
if (__getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) >= 0)
home_dir = p->pw_dir;
@@ -605,14 +608,14 @@ glob (pattern, flags, errfunc, pglob)
char *newp;
size_t home_len = strlen (home_dir);
size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
- newp = __alloca (home_len + rest_len + 1);
+ newp = (char *) __alloca (home_len + rest_len + 1);
memcpy (newp, home_dir, home_len);
memcpy (&newp[home_len], end_name, rest_len);
newp[home_len + rest_len] = '\0';
dirname = newp;
}
}
-#endif /* Not Amiga && not Win32. */
+#endif /* Not Amiga && not WINDOWS32. */
}
#endif /* Not VMS. */
diff --git a/posix/glob.h b/posix/glob.h
index db44f7a69c..515514a4c2 100644
--- a/posix/glob.h
+++ b/posix/glob.h
@@ -28,7 +28,7 @@ extern "C"
#undef __ptr_t
#if (defined (__cplusplus) || (defined (__STDC__) && __STDC__) \
- || defined (WIN32))
+ || defined (WINDOWS32))
#undef __P
#define __P(protos) protos
#define __ptr_t void *
@@ -54,7 +54,7 @@ extern "C"
GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \
GLOB_NOMAGIC|GLOB_TILDE)
-#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE)
+#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_BSD_SOURCE) || defined (_GNU_SOURCE)
#define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */
#define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */
#define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */