diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-07-06 17:09:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-07-06 17:09:00 +0000 |
commit | 8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43 (patch) | |
tree | d1c6fd49faf7237b3fa5c388885a049c46ffbad0 /posix/annexc.c | |
parent | dd3c89f99cf911345abd1781be699a73f699aa00 (diff) | |
download | glibc-8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43.tar.gz |
Update.
1998-07-06 14:36 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* posix/Makefile (generated): Remove $(objpfx) from the names.
1998-07-05 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* stdio-common/test_rdwr.c: Use %Zu for size_t in printf
format string.
* libio/iofread_u.c: Include <stdio.h> for prototype.
* libio/iofwrite_u.c: Likewise.
1998-07-06 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* db2/Versions: New file.
1998-07-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* Makefile (lib-noranlib): Don't depend on sysd-versions.
($(common-objpfx)sysd-versions): Remove rule.
* Makerules ($(common-objpfx)sysd-versions): Define here instead.
Pass name of Versions.def file to script and redirect output to
target. Include it and make all generated version maps depend on
it.
* versions.awk: Print out variable definition containing all
generated version maps. Print error messages to stderr. Remove
temp file.
1998-07-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* posix/annexc.c (check_header): Terminate macro name before
comparing.
(get_null_defines): Allow builtin macros with parameters.
(fmt, testfmt): Add -D_LIBC.
* posix/Makefile: Remove bogus duplicate include directories from
annexc test command.
1998-07-06 12:04 Ulrich Drepper <drepper@cygnus.com>
* nis/nss_nis/nis-pwd.c (internal_nis_getpwent_r): Handle adjunct
password scheme.
(_nss_nis_getpwnam_r): Likewise.
(_nss_nis_getpwuid_r): Likewise.
1998-07-05 Mark Kettenis <kettenis@phys.uva.nl>
* libio/Versions: Move symbols whose source lives in
stdio-common to ...
* stdio-common/Versions: ... here.
* stdio/Versions: Add missing symbols.
Diffstat (limited to 'posix/annexc.c')
-rw-r--r-- | posix/annexc.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/posix/annexc.c b/posix/annexc.c index dbc5e28520..8b95311314 100644 --- a/posix/annexc.c +++ b/posix/annexc.c @@ -609,12 +609,12 @@ static struct header /* Format string to build command to invoke compiler. */ static const char fmt[] = "\ echo \"#include <%s>\" |\ -%s -E -dM -D_POSIX_SOURCE %s \ +%s -E -dM -D_POSIX_SOURCE -D_LIBC %s \ -isystem `%s --print-prog-name=include` - > %s"; static const char testfmt[] = "\ echo \"#include <unistd.h>\n#ifndef %s\n#error not defined\n#endif\n\" |\ -%s -E -dM -D_POSIX_SOURCE %s \ +%s -E -dM -D_POSIX_SOURCE -D_LIBC %s \ -isystem `%s --print-prog-name=include` - 2> /dev/null > %s"; @@ -709,7 +709,7 @@ get_null_defines (void) while (fgets (line, sizeof line, input) != NULL) { - char *start, *end; + char *start; if (strlen (line) < 9 || line[7] != ' ') { /* "#define A" */ printf ("Malformed input, expected '#define MACRO'\ngot '%s'\n", @@ -730,9 +730,7 @@ get_null_defines (void) } } start = &line[8]; - for (end = start + 1; !isspace (*end) && *end != '\0'; ++end) - ; - result[result_len++] = xstrndup (start, end - start); + result[result_len++] = xstrndup (start, strcspn (start, " (")); if (first) { @@ -809,7 +807,6 @@ check_header (const struct header *header, const char **except) while (fgets (line, sizeof line, input) != NULL) { - char *endmac; const char **ignore; if (strlen (line) < 9 || line[7] != ' ') { /* "#define A" */ @@ -819,9 +816,13 @@ check_header (const struct header *header, const char **except) continue; } + /* Find next char after the macro identifier; this can be either + a space or an open parenthesis. */ + line[8 + strcspn (&line[8], " (")] = '\0'; + /* Now check whether it's one of the required macros. */ for (i = 0; i < header->nsyms; ++i) - if (!strncmp (&line[8], header->syms[i], strlen (header->syms[i]))) + if (!strcmp (&line[8], header->syms[i])) break; if (i < header->nsyms) { @@ -833,12 +834,6 @@ check_header (const struct header *header, const char **except) if (line[8] == '_') continue; - /* Find next char after the macro identifier; this can be either - a space or an open parenthesis. */ - endmac = strpbrk (&line[8], " ("); - if (endmac != NULL) - *endmac = '\0'; - /* Maybe one of the symbols which are always defined. */ for (ignore = except; *ignore != NULL; ++ignore) if (! strcmp (&line[8], *ignore)) |