aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-11 20:31:07 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-11 20:31:07 +0000
commitcf9fe93f07ccafc4130ecd3a641b9d5f01afb208 (patch)
tree06f951b999be9eb8ec88f8ceab90dc5ffc750d75
parent17f56d2f9c5893afc919e9a7666962cdfc99354a (diff)
downloadglibc-cf9fe93f07ccafc4130ecd3a641b9d5f01afb208.tar.xz
glibc-cf9fe93f07ccafc4130ecd3a641b9d5f01afb208.zip
Use __getopt_clean_environment only if USE_NONOPTION_FLAGS is defined.
-rw-r--r--sysdeps/arm/init-first.c6
-rw-r--r--sysdeps/mach/hurd/mips/init-first.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/sysdeps/arm/init-first.c b/sysdeps/arm/init-first.c
index cc8da31edb..6856314c83 100644
--- a/sysdeps/arm/init-first.c
+++ b/sysdeps/arm/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For ARM.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 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
@@ -20,7 +20,9 @@
#include <unistd.h>
extern void __libc_init (int, char **, char **);
+#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
+#endif
extern void __libc_global_ctors (void);
int __libc_multiple_libcs = 1;
@@ -35,8 +37,10 @@ init (int *data)
__environ = envp;
__libc_init (argc, argv, envp);
+#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
+#endif
}
#ifdef SHARED
diff --git a/sysdeps/mach/hurd/mips/init-first.c b/sysdeps/mach/hurd/mips/init-first.c
index b81fe3cc3c..d0ab593404 100644
--- a/sysdeps/mach/hurd/mips/init-first.c
+++ b/sysdeps/mach/hurd/mips/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For Mips/Hurd.
- Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 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
@@ -27,7 +27,9 @@
extern void __mach_init (void);
extern void __libc_init (int, char **, char **);
+#ifdef USE_NONOPTION_FLAGS
extern void __getopt_clean_environment (char **);
+#endif
extern void __libc_global_ctors (void);
unsigned int __hurd_threadvar_max;
@@ -106,8 +108,10 @@ init1 (int argc, char *arg0, ...)
__libc_init (argc, argv, __environ);
+#ifdef USE_NONOPTION_FLAGS
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
+#endif
#ifdef SHARED
__libc_global_ctors ();