summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-26 20:35:45 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-26 20:35:45 +0000
commitc7e41631b203863e5efe280446e553bbe231c549 (patch)
tree9414c9ea655e5837c86a7fc23b56c4f26d50fd75
parent6d2e234a786ceb96b8daf68995bb8cc2a4478225 (diff)
downloadglibc-c7e41631b203863e5efe280446e553bbe231c549.tar.gz
Update.
2000-03-20 Richard Henderson <rth@cygnus.com> * nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Last argument to yperr2nss is an int, not size_t. * posix/regex.c (print_partial_compiled_pattern): Cast all ptrdiff_t to long for printing. (print_compiled_pattern): Use Z for printing size_t. * posix/testfnm.c (tests): Avoid trigraphs. * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE): Use a C comment, not an assembly comment. * sysdeps/unix/sysv/linux/alpha/msgctl.c: Clarify use of __ASSUME_32BITUIDS.
-rw-r--r--ChangeLog14
-rw-r--r--nis/nss_nis/nis-service.c4
-rw-r--r--posix/regex.c75
-rw-r--r--posix/testfnm.c6
-rw-r--r--sysdeps/alpha/dl-machine.h4
-rw-r--r--sysdeps/unix/sysv/linux/alpha/msgctl.c3
6 files changed, 88 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index a90a8e63c9..79cd539f62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2000-03-20 Richard Henderson <rth@cygnus.com>
+
+ * nis/nss_nis/nis-service.c (_nss_nis_getservbyport_r): Last
+ argument to yperr2nss is an int, not size_t.
+ * posix/regex.c (print_partial_compiled_pattern): Cast all
+ ptrdiff_t to long for printing.
+ (print_compiled_pattern): Use Z for printing size_t.
+ * posix/testfnm.c (tests): Avoid trigraphs.
+ * sysdeps/alpha/dl-machine.h (ELF_MACHINE_RUNTIME_TRAMPOLINE):
+ Use a C comment, not an assembly comment.
+
+ * sysdeps/unix/sysv/linux/alpha/msgctl.c: Clarify use
+ of __ASSUME_32BITUIDS.
+
2000-03-26 Ulrich Drepper <drepper@redhat.com>
* libio/iofopncook.c: Remove K&R prototypes.
diff --git a/nis/nss_nis/nis-service.c b/nis/nss_nis/nis-service.c
index 43e090b9c7..12ae1c6151 100644
--- a/nis/nss_nis/nis-service.c
+++ b/nis/nss_nis/nis-service.c
@@ -325,6 +325,7 @@ _nss_nis_getservbyport_r (int port, char *protocol, struct servent *serv,
char key[100 + strlen (protocol) + 2];
char *domain, *result;
size_t keylen, len;
+ int int_len;
/* If this fails, the other solution will also fail. */
if (yp_get_default_domain (&domain))
@@ -333,7 +334,8 @@ _nss_nis_getservbyport_r (int port, char *protocol, struct servent *serv,
/* key is: "port/protocol" */
keylen = snprintf (key, sizeof (key), "%d/%s", port, protocol);
status = yperr2nss (yp_match (domain, "services.byname", key,
- keylen, &result, &len));
+ keylen, &result, &int_len));
+ len = int_len;
/* If we found the key, it's ok and parse the result. If not,
fall through and parse the complete table. */
diff --git a/posix/regex.c b/posix/regex.c
index 4c66337a24..3e942d41f5 100644
--- a/posix/regex.c
+++ b/posix/regex.c
@@ -691,7 +691,11 @@ print_partial_compiled_pattern (start, end)
/* Loop over pattern commands. */
while (p < pend)
{
- printf ("%d:\t", p - start);
+#ifdef _LIBC
+ printf ("%t:\t", p - start);
+#else
+ printf ("%ld:\t", (long int) (p - start));
+#endif
switch ((re_opcode_t) *p++)
{
@@ -781,17 +785,30 @@ print_partial_compiled_pattern (start, end)
case on_failure_jump:
extract_number_and_incr (&mcnt, &p);
- printf ("/on_failure_jump to %d", p + mcnt - start);
+#ifdef _LIBC
+ printf ("/on_failure_jump to %t", p + mcnt - start);
+#else
+ printf ("/on_failure_jump to %ld", (long int) (p + mcnt - start));
+#endif
break;
case on_failure_keep_string_jump:
extract_number_and_incr (&mcnt, &p);
- printf ("/on_failure_keep_string_jump to %d", p + mcnt - start);
+#ifdef _LIBC
+ printf ("/on_failure_keep_string_jump to %t", p + mcnt - start);
+#else
+ printf ("/on_failure_keep_string_jump to %ld",
+ (long int) (p + mcnt - start));
+#endif
break;
case dummy_failure_jump:
extract_number_and_incr (&mcnt, &p);
- printf ("/dummy_failure_jump to %d", p + mcnt - start);
+#ifdef _LIBC
+ printf ("/dummy_failure_jump to %t", p + mcnt - start);
+#else
+ printf ("/dummy_failure_jump to %ld", (long int) (p + mcnt - start));
+#endif
break;
case push_dummy_failure:
@@ -800,29 +817,50 @@ print_partial_compiled_pattern (start, end)
case maybe_pop_jump:
extract_number_and_incr (&mcnt, &p);
- printf ("/maybe_pop_jump to %d", p + mcnt - start);
+#ifdef _LIBC
+ printf ("/maybe_pop_jump to %t", p + mcnt - start);
+#else
+ printf ("/maybe_pop_jump to %ld", (long int) (p + mcnt - start));
+#endif
break;
case pop_failure_jump:
extract_number_and_incr (&mcnt, &p);
- printf ("/pop_failure_jump to %d", p + mcnt - start);
+#ifdef _LIBC
+ printf ("/pop_failure_jump to %t", p + mcnt - start);
+#else
+ printf ("/pop_failure_jump to %ld", (long int) (p + mcnt - start));
+#endif
break;
case jump_past_alt:
extract_number_and_incr (&mcnt, &p);
- printf ("/jump_past_alt to %d", p + mcnt - start);
+#ifdef _LIBC
+ printf ("/jump_past_alt to %t", p + mcnt - start);
+#else
+ printf ("/jump_past_alt to %ld", (long int) (p + mcnt - start));
+#endif
break;
case jump:
extract_number_and_incr (&mcnt, &p);
- printf ("/jump to %d", p + mcnt - start);
+#ifdef _LIBC
+ printf ("/jump to %t", p + mcnt - start);
+#else
+ printf ("/jump to %ld", (long int) (p + mcnt - start));
+#endif
break;
case succeed_n:
extract_number_and_incr (&mcnt, &p);
p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/succeed_n to %d, %d times", p1 - start, mcnt2);
+#ifdef _LIBC
+ printf ("/succeed_n to %t, %d times", p1 - start, mcnt2);
+#else
+ printf ("/succeed_n to %ld, %d times",
+ (long int) (p1 - start), mcnt2);
+#endif
break;
case jump_n:
@@ -836,7 +874,12 @@ print_partial_compiled_pattern (start, end)
extract_number_and_incr (&mcnt, &p);
p1 = p + mcnt;
extract_number_and_incr (&mcnt2, &p);
- printf ("/set_number_at location %d to %d", p1 - start, mcnt2);
+#ifdef _LIBC
+ printf ("/set_number_at location %t to %d", p1 - start, mcnt2);
+#else
+ printf ("/set_number_at location %ld to %d",
+ (long int) (p1 - start), mcnt2);
+#endif
break;
case wordbound:
@@ -903,7 +946,11 @@ print_partial_compiled_pattern (start, end)
putchar ('\n');
}
- printf ("%d:\tend of pattern.\n", p - start);
+#ifdef _LIBC
+ printf ("%t:\tend of pattern.\n", p - start);
+#else
+ printf ("%ld:\tend of pattern.\n", (long int) (p - start));
+#endif
}
@@ -923,7 +970,11 @@ print_compiled_pattern (bufp)
print_fastmap (bufp->fastmap);
}
- printf ("re_nsub: %d\t", bufp->re_nsub);
+#ifdef _LIBC
+ printf ("re_nsub: %Zd\t", bufp->re_nsub);
+#else
+ printf ("re_nsub: %ld\t", (long int) bufp->re_nsub);
+#endif
printf ("regs_alloc: %d\t", bufp->regs_allocated);
printf ("can_be_null: %d\t", bufp->can_be_null);
printf ("newline_anchor: %d\n", bufp->newline_anchor);
diff --git a/posix/testfnm.c b/posix/testfnm.c
index bec08b2b1a..a8b85c56ad 100644
--- a/posix/testfnm.c
+++ b/posix/testfnm.c
@@ -28,9 +28,9 @@ struct {
{ "?/b", "\\?/b", 0, 0 },
{ "[/b", "[/b", 0, FNM_NOMATCH },
{ "[/b", "\\[/b", 0, 0 },
- { "aa/b", "??/b", 0, 0 },
- { "aa/b", "???b", 0, 0 },
- { "aa/b", "???b", FNM_PATHNAME, FNM_NOMATCH },
+ { "aa/b", "?""?/b", 0, 0 },
+ { "aa/b", "?""?""?b", 0, 0 },
+ { "aa/b", "?""?""?b", FNM_PATHNAME, FNM_NOMATCH },
{ ".a/b", "?a/b", FNM_PATHNAME|FNM_PERIOD, FNM_NOMATCH },
{ "a/.b", "a/?b", FNM_PATHNAME|FNM_PERIOD, FNM_NOMATCH },
{ ".a/b", "*a/b", FNM_PATHNAME|FNM_PERIOD, FNM_NOMATCH },
diff --git a/sysdeps/alpha/dl-machine.h b/sysdeps/alpha/dl-machine.h
index 78a6f502ed..d0b5c485ea 100644
--- a/sysdeps/alpha/dl-machine.h
+++ b/sysdeps/alpha/dl-machine.h
@@ -1,5 +1,5 @@
/* Machine-dependent ELF dynamic relocation inline functions. Alpha version.
- Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>.
@@ -254,7 +254,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
#ifndef PROF
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
- TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, #nop);
+ TRAMPOLINE_TEMPLATE (_dl_runtime_profile, profile_fixup, /* nop */);
#else
#define ELF_MACHINE_RUNTIME_TRAMPOLINE \
TRAMPOLINE_TEMPLATE (_dl_runtime_resolve, fixup, imb); \
diff --git a/sysdeps/unix/sysv/linux/alpha/msgctl.c b/sysdeps/unix/sysv/linux/alpha/msgctl.c
index 2d07b1f400..93a9bf2618 100644
--- a/sysdeps/unix/sysv/linux/alpha/msgctl.c
+++ b/sysdeps/unix/sysv/linux/alpha/msgctl.c
@@ -51,6 +51,9 @@ int __new_msgctl (int, int, struct msqid_ds *);
int
__new_msgctl (int msqid, int cmd, struct msqid_ds *buf)
{
+ /* This is a misnomer -- Alpha had 32-bit uids at the beginning
+ of time. However, msg_qnum and msg_qbytes changed size at
+ the same time the size of uid changed elsewhere. */
#if __ASSUME_32BITUIDS > 0
return INLINE_SYSCALL (msgctl, 3, msqid, cmd | __IPC_64, buf);
#else