Fri Jun 28 07:27:10 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>

* string/strndup.c (strndup): Always terminate the string.
	* string/string.h (strndupa): Likewise.

Thu Jun 27 14:22:31 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* stdio/Makefile (routines): Add vscanf.
	* stdio-common/Makefile (routines): Remove vscanf.
	* stdio-common/vscanf.c: Move to ...
	* stdio/vscanf.c: here.

	* rpm/Makefile (headers, install-lib, install-lib.so,
	versioned, install-bin, install-sbin, install-data,
	install-others): Add $(-VARIABLE).
This commit is contained in:
Roland McGrath 1996-06-28 11:42:05 +00:00
parent 6dbe283756
commit de6b062321
5 changed files with 39 additions and 15 deletions

View File

@ -1,3 +1,19 @@
Fri Jun 28 07:27:10 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* string/strndup.c (strndup): Always terminate the string.
* string/string.h (strndupa): Likewise.
Thu Jun 27 14:22:31 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* stdio/Makefile (routines): Add vscanf.
* stdio-common/Makefile (routines): Remove vscanf.
* stdio-common/vscanf.c: Move to ...
* stdio/vscanf.c: here.
* rpm/Makefile (headers, install-lib, install-lib.so,
versioned, install-bin, install-sbin, install-data,
install-others): Add $(-VARIABLE).
Fri Jun 28 02:41:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* nss/Makefile (databases): New variable.

View File

@ -87,7 +87,8 @@ contact <bug-glibc@prep.ai.mit.edu>
[ 9] Write AVL-tree based tsearch() et.al. functions. Currently only
a very simple algorithm is used.
There is a public domain version but using this would cause problems
with the assignment.
[10] Extend regex and/or rx to work with wide characters.
@ -107,7 +108,8 @@ contact <bug-glibc@prep.ai.mit.edu>
contribute it to the FSF.
[13] Write access function for group, ether, shadow, rpc, netmasks,
bootparams, netgroup, publickey, automount, aliases databases.
[13] Write access function for ether, shadow, netmasks, bootparams,
netgroup, publickey, automount, aliases databases for nss_files
and nss_db module.
The functions should be embedded in the nss scheme. This is not
hard and not all services must be supported at once.

View File

@ -15,15 +15,17 @@ distinfo := $(common-objpfx)distinfo- \
config = $(config-machine)-$(config-vendor)-$(config-os)
headers := $(foreach d,$(subdirs),$($d-headers))
install-lib := $(foreach d,$(subdirs),$($d-install-lib))
install-lib.so := $(foreach d,$(subdirs),$(filter-out $($d-versioned),\
headers := $(-headers) $(foreach d,$(subdirs),$($d-headers))
install-lib := $(-install-lib) $(foreach d,$(subdirs),$($d-install-lib))
install-lib.so := $(-install-lib.so) \
$(foreach d,$(subdirs),$(filter-out $($d-versioned),\
$($d-install-lib.so)))
versioned := $(foreach d,$(subdirs),$($d-versioned))
install-bin := $(foreach d,$(subdirs),$($d-install-bin))
install-sbin := $(foreach d,$(subdirs),$($d-install-sbin))
install-data := $(foreach d,$(subdirs),$($d-install-data))
install-others := $(foreach d,$(subdirs),$($d-install-others))
versioned := $(-versioned) $(foreach d,$(subdirs),$($d-versioned))
install-bin := $(-install-bin) $(foreach d,$(subdirs),$($d-install-bin))
install-sbin := $(-install-sbin) $(foreach d,$(subdirs),$($d-install-sbin))
install-data := $(-install-data) $(foreach d,$(subdirs),$($d-install-data))
install-others := $(-install-others) \
$(foreach d,$(subdirs),$($d-install-others))
# Notice things to be installed in /etc. They get specially marked as
# possibly user-modified config files.

View File

@ -107,8 +107,11 @@ extern char *strndup __P ((__const char *__string, size_t __n));
#define strndupa(s, n) \
({ \
__const char *__old = (s); \
size_t __len = strnlen (__old) + 1; \
memcpy (__builtin_alloca (__len), __old, __len); \
char *__new; \
size_t __len = strnlen (__old); \
__new = memcpy (__builtin_alloca (__len + 1), __old, __len); \
__new[__len] = '\0'; \
__new; \
})
#endif

View File

@ -24,13 +24,14 @@ Cambridge, MA 02139, USA. */
char *
strndup (const char *s, size_t n)
{
size_t len = strnlen (s) + 1;
char *new = malloc (len);
size_t len = strnlen (s);
char *new = malloc (len + 1);
if (new == NULL)
return NULL;
memcpy (new, s, len);
new[len] = '\0';
return new;
}