aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rw-r--r--Rules10
-rw-r--r--string/argz.h8
-rw-r--r--string/envz.h8
-rw-r--r--string/strings.h16
5 files changed, 30 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cf6b1ec3a..6e0f62d292 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-05-17 Andreas Jaeger <aj@suse.de>
+
+ * string/envz.h: Add pure attributes if possible.
+
+ * string/argz.h: argz_count is a pure function.
+
+ * string/strings.h: Add pure and const attributes if possible.
+
2000-05-17 Jakub Jelinek <jakub@redhat.com>
* sysdeps/generic/dl-cache.h (_DL_CACHE_DEFAULT_ID): Only define if
@@ -12,14 +20,10 @@
since the description is wrong.
Closes PR libc/1691, reported by Geoff Clare <gwc@unisoft.com>.
-2000-05-17 Andreas Jaeger <aj@suse.de>
-
* scripts/config.sub: New version.
* scripts/config.guess: Likewise.
* manual/texinfo.tex: Likewise.
-2000-05-17 Andreas Jaeger <aj@suse.de>
-
* time/test_time.args: Removed.
* time/Makefile (test_time-ARGS): Added contents here instead.
diff --git a/Rules b/Rules
index adcddc6b44..d5cd34e65a 100644
--- a/Rules
+++ b/Rules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
+# Copyright (C) 1991,92,93,94,95,96,97,98,99,2000 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
@@ -118,14 +118,10 @@ endif
ifneq "$(strip $(tests) $(test-srcs))" ""
# These are the implicit rules for making test outputs
# from the test programs and whatever input files are present.
-$(objpfx)%.out: %.args $(objpfx)% %.input
- $($*-ENV) $(built-program-cmd) `cat $(word 1,$^)` < $(word 3,$^) > $@
-$(objpfx)%.out: %.args $(objpfx)%
- $($*-ENV) $(built-program-cmd) `cat $(word 1,$^)` > $@
$(objpfx)%.out: %.input $(objpfx)%
- $($*-ENV) $(built-program-cmd) < $(word 1,$^) > $@
+ $($*-ENV) $(built-program-cmd) $($*-ARGS) < $(word 1,$^) > $@
$(objpfx)%.out: /dev/null $(objpfx)% # Make it 2nd arg for canned sequence.
- $($*-ENV) $(built-program-cmd) > $@
+ $($*-ENV) $(built-program-cmd) $($*-ARGS) > $@
endif # tests
.PHONY: distclean realclean subdir_distclean subdir_realclean \
diff --git a/string/argz.h b/string/argz.h
index 45441db221..d4ff07dc9d 100644
--- a/string/argz.h
+++ b/string/argz.h
@@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated arg vectors.
- Copyright (C) 1995, 96, 97, 98, 99 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -56,8 +56,10 @@ extern error_t argz_create_sep (__const char *__restrict __string,
size_t *__restrict __len) __THROW;
/* Returns the number of strings in ARGZ. */
-extern size_t __argz_count (__const char *__argz, size_t __len) __THROW;
-extern size_t argz_count (__const char *__argz, size_t __len) __THROW;
+extern size_t __argz_count (__const char *__argz, size_t __len)
+ __THROW __attribute_pure__;
+extern size_t argz_count (__const char *__argz, size_t __len)
+ __THROW __attribute_pure__;
/* Puts pointers to each string in ARGZ into ARGV, which must be large enough
to hold them all. */
diff --git a/string/envz.h b/string/envz.h
index 1595a95658..293166ba24 100644
--- a/string/envz.h
+++ b/string/envz.h
@@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated environment vectors
- Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995, 96, 98, 99, 2000 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -31,12 +31,14 @@ __BEGIN_DECLS
/* Returns a pointer to the entry in ENVZ for NAME, or 0 if there is none. */
extern char *envz_entry (__const char *__restrict __envz, size_t __envz_len,
- __const char *__restrict __name) __THROW;
+ __const char *__restrict __name)
+ __THROW __attribute_pure__;
/* Returns a pointer to the value portion of the entry in ENVZ for NAME, or 0
if there is none. */
extern char *envz_get (__const char *__restrict __envz, size_t __envz_len,
- __const char *__restrict __name) __THROW;
+ __const char *__restrict __name)
+ __THROW __attribute_pure__;
/* Adds an entry for NAME with value VALUE to ENVZ & ENVZ_LEN. If an entry
with the same name already exists in ENVZ, it is removed. If VALUE is
diff --git a/string/strings.h b/string/strings.h
index 3fb92ded8f..0c48e72cd0 100644
--- a/string/strings.h
+++ b/string/strings.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,96,97,99,2000 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
@@ -30,7 +30,8 @@
__BEGIN_DECLS
/* Compare N bytes of S1 and S2 (same as memcmp). */
-extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) __THROW;
+extern int bcmp (__const void *__s1, __const void *__s2, size_t __n)
+ __THROW __attribute_pure__;
/* Copy N bytes of SRC to DEST (like memmove, but args reversed). */
extern void bcopy (__const void *__src, void *__dest, size_t __n) __THROW;
@@ -40,20 +41,21 @@ extern void bzero (void *__s, size_t __n) __THROW;
/* Return the position of the first bit set in I, or 0 if none are set.
The least-significant bit is position 1, the most-significant 32. */
-extern int ffs (int __i) __THROW;
+extern int ffs (int __i) __THROW __attribute__ ((const));
/* Find the first occurrence of C in S (same as strchr). */
-extern char *index (__const char *__s, int __c) __THROW;
+extern char *index (__const char *__s, int __c) __THROW __attribute_pure__;
/* Find the last occurrence of C in S (same as strrchr). */
-extern char *rindex (__const char *__s, int __c) __THROW;
+extern char *rindex (__const char *__s, int __c) __THROW __attribute_pure__;
/* Compare S1 and S2, ignoring case. */
-extern int strcasecmp (__const char *__s1, __const char *__s2) __THROW;
+extern int strcasecmp (__const char *__s1, __const char *__s2)
+ __THROW __attribute_pure__;
/* Compare no more than N chars of S1 and S2, ignoring case. */
extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n)
- __THROW;
+ __THROW __attribute_pure__;
__END_DECLS