mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
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:
16
ChangeLog
16
ChangeLog
@ -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>
|
Fri Jun 28 02:41:08 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
|
||||||
|
|
||||||
* nss/Makefile (databases): New variable.
|
* nss/Makefile (databases): New variable.
|
||||||
|
8
PROJECTS
8
PROJECTS
@ -87,7 +87,8 @@ contact <bug-glibc@prep.ai.mit.edu>
|
|||||||
|
|
||||||
[ 9] Write AVL-tree based tsearch() et.al. functions. Currently only
|
[ 9] Write AVL-tree based tsearch() et.al. functions. Currently only
|
||||||
a very simple algorithm is used.
|
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.
|
[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.
|
contribute it to the FSF.
|
||||||
|
|
||||||
|
|
||||||
[13] Write access function for group, ether, shadow, rpc, netmasks,
|
[13] Write access function for ether, shadow, netmasks, bootparams,
|
||||||
bootparams, netgroup, publickey, automount, aliases databases.
|
netgroup, publickey, automount, aliases databases for nss_files
|
||||||
|
and nss_db module.
|
||||||
The functions should be embedded in the nss scheme. This is not
|
The functions should be embedded in the nss scheme. This is not
|
||||||
hard and not all services must be supported at once.
|
hard and not all services must be supported at once.
|
||||||
|
18
rpm/Makefile
18
rpm/Makefile
@ -15,15 +15,17 @@ distinfo := $(common-objpfx)distinfo- \
|
|||||||
|
|
||||||
config = $(config-machine)-$(config-vendor)-$(config-os)
|
config = $(config-machine)-$(config-vendor)-$(config-os)
|
||||||
|
|
||||||
headers := $(foreach d,$(subdirs),$($d-headers))
|
headers := $(-headers) $(foreach d,$(subdirs),$($d-headers))
|
||||||
install-lib := $(foreach d,$(subdirs),$($d-install-lib))
|
install-lib := $(-install-lib) $(foreach d,$(subdirs),$($d-install-lib))
|
||||||
install-lib.so := $(foreach d,$(subdirs),$(filter-out $($d-versioned),\
|
install-lib.so := $(-install-lib.so) \
|
||||||
|
$(foreach d,$(subdirs),$(filter-out $($d-versioned),\
|
||||||
$($d-install-lib.so)))
|
$($d-install-lib.so)))
|
||||||
versioned := $(foreach d,$(subdirs),$($d-versioned))
|
versioned := $(-versioned) $(foreach d,$(subdirs),$($d-versioned))
|
||||||
install-bin := $(foreach d,$(subdirs),$($d-install-bin))
|
install-bin := $(-install-bin) $(foreach d,$(subdirs),$($d-install-bin))
|
||||||
install-sbin := $(foreach d,$(subdirs),$($d-install-sbin))
|
install-sbin := $(-install-sbin) $(foreach d,$(subdirs),$($d-install-sbin))
|
||||||
install-data := $(foreach d,$(subdirs),$($d-install-data))
|
install-data := $(-install-data) $(foreach d,$(subdirs),$($d-install-data))
|
||||||
install-others := $(foreach d,$(subdirs),$($d-install-others))
|
install-others := $(-install-others) \
|
||||||
|
$(foreach d,$(subdirs),$($d-install-others))
|
||||||
|
|
||||||
# Notice things to be installed in /etc. They get specially marked as
|
# Notice things to be installed in /etc. They get specially marked as
|
||||||
# possibly user-modified config files.
|
# possibly user-modified config files.
|
||||||
|
@ -107,8 +107,11 @@ extern char *strndup __P ((__const char *__string, size_t __n));
|
|||||||
#define strndupa(s, n) \
|
#define strndupa(s, n) \
|
||||||
({ \
|
({ \
|
||||||
__const char *__old = (s); \
|
__const char *__old = (s); \
|
||||||
size_t __len = strnlen (__old) + 1; \
|
char *__new; \
|
||||||
memcpy (__builtin_alloca (__len), __old, __len); \
|
size_t __len = strnlen (__old); \
|
||||||
|
__new = memcpy (__builtin_alloca (__len + 1), __old, __len); \
|
||||||
|
__new[__len] = '\0'; \
|
||||||
|
__new; \
|
||||||
})
|
})
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -24,13 +24,14 @@ Cambridge, MA 02139, USA. */
|
|||||||
char *
|
char *
|
||||||
strndup (const char *s, size_t n)
|
strndup (const char *s, size_t n)
|
||||||
{
|
{
|
||||||
size_t len = strnlen (s) + 1;
|
size_t len = strnlen (s);
|
||||||
char *new = malloc (len);
|
char *new = malloc (len + 1);
|
||||||
|
|
||||||
if (new == NULL)
|
if (new == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memcpy (new, s, len);
|
memcpy (new, s, len);
|
||||||
|
new[len] = '\0';
|
||||||
|
|
||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user