about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-07-06 17:09:00 +0000
committerUlrich Drepper <drepper@redhat.com>1998-07-06 17:09:00 +0000
commit8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43 (patch)
treed1c6fd49faf7237b3fa5c388885a049c46ffbad0 /posix
parentdd3c89f99cf911345abd1781be699a73f699aa00 (diff)
downloadglibc-8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43.tar.gz
glibc-8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43.tar.xz
glibc-8eaaffdeedf5a34a68a785e62b181e4e5fc6cf43.zip
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')
-rw-r--r--posix/Makefile5
-rw-r--r--posix/annexc.c23
2 files changed, 12 insertions, 16 deletions
diff --git a/posix/Makefile b/posix/Makefile
index ad70fddd63..5eadf35eb7 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -64,7 +64,7 @@ before-compile	:= testcases.h ptestcases.h
 
 # So they get cleaned up.
 generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
-	     $(objpfx)annexc $(objpfx)annexc.out
+	     annexc annexc.out
 
 include ../Rules
 
@@ -137,7 +137,8 @@ endif
 # Run a test on the header files we use.
 # XXX Please note that for now we ignore the result of this test.
 tests: $(objpfx)annexc
-	-$(dir $<)$(notdir $<) '$(CC)' '-I../include -I../include -I.. $(+sysdep-includes) -I../include -I../include -I..' > $<.out
+	-$(dir $<)$(notdir $<) '$(CC)' \
+			       '-I../include -I.. $(+sysdep-includes)' > $<.out
 
 $(objpfx)annexc: annexc.c
 	$(native-compile)
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))