/* Version information is requested. */
if (do_version)
{
- fprintf (stderr, "gencat - GNU %s %s\n", PACKAGE, VERSION);
+ fprintf (stderr, "gencat (GNU %s) %s\n", PACKAGE, VERSION);
fprintf (stderr, _("\
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"), "1996");
- fprintf (stderr, _("Written by %s\n"),
- "Ulrich Drepper <drepper@cygnus.com>");
+ fprintf (stderr, _("Written by %s.\n"),
+ "Ulrich Drepper");
exit (EXIT_SUCCESS);
}
If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n\
is -, output is written to standard output.\n"),
program_invocation_name, program_invocation_name);
- printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
+ fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
+ stdout);
}
exit (status);
if (__gmon_start__)
__gmon_start__ ();
+#ifdef _LIBC_REENTRANT
+ {
+ /* This is a trick to generate a reference for the symbol
+ __libc_force_cancel_wrapper which can be used to force parts of
+ the thread library to be used where some functions and system
+ calls are overwritten. The value of this variable is always 0. */
+ extern const int __libc_force_cancel_wrapper;
+ if (__libc_force_cancel_wrapper)
+ _init ();
+ }
+#endif
+
/* End the here document containing the .init prologue code.
Then fetch the .section directive just written and append that
to crtn.s-new, followed by the function epilogue. */
/* Version information is requested. */
if (do_version)
{
- fprintf (stderr, "makedb - GNU %s %s\n", PACKAGE, VERSION);
+ fprintf (stderr, "makedb (GNU %s) %s\n", PACKAGE, VERSION);
fprintf (stderr, _("\
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
"), "1996");
- fprintf (stderr, _("Written by %s\n"),
- "Ulrich Drepper <drepper@cygnus.com>");
+ fprintf (stderr, _("Written by %s.\n"),
+ "Ulrich Drepper");
exit (EXIT_SUCCESS);
}
If INPUT-FILE is -, input is read from standard input.\n"),
program_invocation_name, program_invocation_name,
program_invocation_name);
- printf (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"));
+ fputs (gettext ("Report bugs to <bug-glibc@prep.ai.mit.edu>.\n"),
+ stdout);
}
exit (status);
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <ansidecl.h>
#include <dirent.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
int
-DEFUN(scandir, (dir, namelist, select, cmp),
- CONST char *dir AND
- struct dirent ***namelist AND
- int EXFUN((*select), (struct dirent *)) AND
- int EXFUN((*cmp), (CONST PTR, CONST PTR)))
+scandir (dir, namelist, select, cmp)
+ const char *dir;
+ struct dirent ***namelist;
+ int (*select) __P ((struct dirent *));
+ int (*cmp) __P ((const void *, const void *));
{
DIR *dp = opendir (dir);
struct dirent **v = NULL;
return -1;
save = errno;
- errno = 0;
+ __set_errno (0);
i = 0;
while ((d = readdir (dp)) != NULL)
if (new == NULL)
{
lose:
- errno = ENOMEM;
+ __set_errno (ENOMEM);
break;
}
v = new;
while (i > 0)
free (v[--i]);
free (v);
- errno = save;
+ __set_errno (save);
return -1;
}
(void) closedir (dp);
- errno = save;
+ __set_errno (save);
/* Sort the list if we have a comparison function to sort with. */
if (cmp != NULL)
p = dirpath;
if (p == NULL || *p == '\0')
{
- errno = ENOENT;
+ __set_errno (ENOENT);
return -1;
}
preloads = NULL;
npreloads = 0;
+ if (! __libc_enable_secure)
+ {
+ const char *preloadlist = getenv ("LD_PRELOAD");
+ if (preloadlist)
+ {
+ /* The LD_PRELOAD environment variable gives a colon-separated
+ list of libraries that are loaded before the executable's
+ dependencies and prepended to the global scope list. */
+ char *list = strdupa (preloadlist);
+ char *p;
+ while ((p = strsep (&list, ":")) != NULL)
+ {
+ (void) _dl_map_object (NULL, p, lt_library);
+ ++npreloads;
+ }
+ }
+ }
+
/* Read the contents of the file. */
file = _dl_sysdep_read_whole_file ("/etc/ld.so.preload", &file_size,
PROT_READ | PROT_WRITE);
__munmap (file, file_size);
}
- if (! __libc_enable_secure)
- {
- const char *preloadlist = getenv ("LD_PRELOAD");
- if (preloadlist)
- {
- /* The LD_PRELOAD environment variable gives a colon-separated
- list of libraries that are loaded before the executable's
- dependencies and prepended to the global scope list. */
- char *list = strdupa (preloadlist);
- char *p;
- while ((p = strsep (&list, ":")) != NULL)
- {
- (void) _dl_map_object (NULL, p, lt_library);
- ++npreloads;
- }
- }
- }
-
if (npreloads != 0)
{
/* Set up PRELOADS with a vector of the preloaded libraries. */