mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 06:20:06 +00:00
Update.
2004-10-05 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Return 200112L for _SC_CPUTIME or _SC_THREAD_CPUTIME. * nscd/Makefile (nscd-cflags): Set to -DIS_IN_nscd=1, plus -fpie if building PIE. (CFLAGS-*.c): Use it. * nscd/Makefile (relro-LDFLAGS): Add -Wl,-z,now if have-z-relro. ($(objpfx)nscd): Add $(relro-LDFLAGS). * sysdeps/unix/sysv/linux/i386/sysconf.c: Include hp-timing.h. (__sysconf): Return -1 for _SC_CPUTIME or _SC_THREAD_CPUTIME if !HP_TIMING_AVAIL. 2004-10-05 Ulrich Drepper <drepper@redhat.com> * nscd/Makefile (distribute): Remove TODO. * nscd/TODO: Removed.
This commit is contained in:
parent
e14bbf537e
commit
6ab5f50de4
21
ChangeLog
21
ChangeLog
@ -1,3 +1,24 @@
|
|||||||
|
2004-10-05 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Return 200112L
|
||||||
|
for _SC_CPUTIME or _SC_THREAD_CPUTIME.
|
||||||
|
|
||||||
|
* nscd/Makefile (nscd-cflags): Set to -DIS_IN_nscd=1, plus
|
||||||
|
-fpie if building PIE.
|
||||||
|
(CFLAGS-*.c): Use it.
|
||||||
|
|
||||||
|
* nscd/Makefile (relro-LDFLAGS): Add -Wl,-z,now if have-z-relro.
|
||||||
|
($(objpfx)nscd): Add $(relro-LDFLAGS).
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/sysconf.c: Include hp-timing.h.
|
||||||
|
(__sysconf): Return -1 for _SC_CPUTIME or _SC_THREAD_CPUTIME if
|
||||||
|
!HP_TIMING_AVAIL.
|
||||||
|
|
||||||
|
2004-10-05 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* nscd/Makefile (distribute): Remove TODO.
|
||||||
|
* nscd/TODO: Removed.
|
||||||
|
|
||||||
2004-10-04 Ulrich Drepper <drepper@redhat.com>
|
2004-10-04 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* nscd/gai.c: Define __no_netlink_support if NEED_NETLINK is
|
* nscd/gai.c: Define __no_netlink_support if NEED_NETLINK is
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-10-05 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
|
||||||
|
_POSIX_THREAD_CPUTIME): Define to 0.
|
||||||
|
|
||||||
2004-10-04 Ulrich Drepper <drepper@redhat.com>
|
2004-10-04 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
|
* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
|
||||||
|
@ -106,10 +106,10 @@
|
|||||||
#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
|
#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
|
||||||
|
|
||||||
/* CPU-time clocks supported. */
|
/* CPU-time clocks supported. */
|
||||||
#define _POSIX_CPUTIME 200112L
|
#define _POSIX_CPUTIME 0
|
||||||
|
|
||||||
/* We support the clock also in threads. */
|
/* We support the clock also in threads. */
|
||||||
#define _POSIX_THREAD_CPUTIME 200112L
|
#define _POSIX_THREAD_CPUTIME 0
|
||||||
|
|
||||||
/* GNU libc provides regular expression handling. */
|
/* GNU libc provides regular expression handling. */
|
||||||
#define _POSIX_REGEXP 1
|
#define _POSIX_REGEXP 1
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2004-10-05 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
|
||||||
|
_POSIX_THREAD_CPUTIME): Define to 0.
|
||||||
|
|
||||||
2004-10-04 Ulrich Drepper <drepper@redhat.com>
|
2004-10-04 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
|
* sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
|
||||||
|
@ -103,10 +103,10 @@
|
|||||||
#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
|
#define _POSIX_SHARED_MEMORY_OBJECTS 200112L
|
||||||
|
|
||||||
/* CPU-time clocks supported. */
|
/* CPU-time clocks supported. */
|
||||||
#define _POSIX_CPUTIME 200112L
|
#define _POSIX_CPUTIME 0
|
||||||
|
|
||||||
/* We support the clock also in threads. */
|
/* We support the clock also in threads. */
|
||||||
#define _POSIX_THREAD_CPUTIME 200112L
|
#define _POSIX_THREAD_CPUTIME 0
|
||||||
|
|
||||||
/* GNU libc provides regular expression handling. */
|
/* GNU libc provides regular expression handling. */
|
||||||
#define _POSIX_REGEXP 1
|
#define _POSIX_REGEXP 1
|
||||||
|
@ -58,7 +58,7 @@ endif
|
|||||||
|
|
||||||
distribute := nscd.h nscd-client.h dbg_log.h \
|
distribute := nscd.h nscd-client.h dbg_log.h \
|
||||||
$(addsuffix .c, $(filter-out xmalloc, $(nscd-modules))) \
|
$(addsuffix .c, $(filter-out xmalloc, $(nscd-modules))) \
|
||||||
nscd_nischeck.c TODO nscd.conf nscd.init nscd_proto.h \
|
nscd_nischeck.c nscd.conf nscd.init nscd_proto.h \
|
||||||
nscd-types.h
|
nscd-types.h
|
||||||
|
|
||||||
include ../Rules
|
include ../Rules
|
||||||
@ -69,34 +69,43 @@ CFLAGS-nscd_gethst_r.c = -fexceptions
|
|||||||
CFLAGS-nscd_getai.c = -fexceptions
|
CFLAGS-nscd_getai.c = -fexceptions
|
||||||
CFLAGS-nscd_initgroups.c = -fexceptions
|
CFLAGS-nscd_initgroups.c = -fexceptions
|
||||||
|
|
||||||
|
nscd-cflags = -DIS_IN_nscd=1
|
||||||
ifeq (yesyes,$(have-fpie)$(build-shared))
|
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||||
CFLAGS-nscd.c += -fpie
|
nscd-cflags += -fpie
|
||||||
CFLAGS-connections.c += -fpie
|
endif
|
||||||
CFLAGS-pwdcache.c += -fpie
|
|
||||||
CFLAGS-getpwnam_r.c += -fpie
|
CFLAGS-nscd.c += $(nscd-cflags)
|
||||||
CFLAGS-getpwuid_r.c += -fpie
|
CFLAGS-connections.c += $(nscd-cflags)
|
||||||
CFLAGS-grpcache.c += -fpie
|
CFLAGS-pwdcache.c += $(nscd-cflags)
|
||||||
CFLAGS-getgrnam_r.c += -fpie
|
CFLAGS-getpwnam_r.c += $(nscd-cflags)
|
||||||
CFLAGS-getgrgid_r.c += -fpie
|
CFLAGS-getpwuid_r.c += $(nscd-cflags)
|
||||||
CFLAGS-hstcache.c += -fpie
|
CFLAGS-grpcache.c += $(nscd-cflags)
|
||||||
CFLAGS-gethstbyad_r.c += -fpie
|
CFLAGS-getgrnam_r.c += $(nscd-cflags)
|
||||||
CFLAGS-gethstbynm2_r.c += -fpie
|
CFLAGS-getgrgid_r.c += $(nscd-cflags)
|
||||||
CFLAGS-dbg_log.c += -fpie
|
CFLAGS-hstcache.c += $(nscd-cflags)
|
||||||
CFLAGS-nscd_conf.c += -fpie
|
CFLAGS-gethstbyad_r.c += $(nscd-cflags)
|
||||||
CFLAGS-nscd_stat.c += -fpie
|
CFLAGS-gethstbynm2_r.c += $(nscd-cflags)
|
||||||
CFLAGS-cache.c += -fpie
|
CFLAGS-dbg_log.c += $(nscd-cflags)
|
||||||
CFLAGS-xmalloc.c += -fpie
|
CFLAGS-nscd_conf.c += $(nscd-cflags)
|
||||||
CFLAGS-xstrdup.c += -fpie
|
CFLAGS-nscd_stat.c += $(nscd-cflags)
|
||||||
CFLAGS-mem.c += -fpie
|
CFLAGS-cache.c += $(nscd-cflags)
|
||||||
CFLAGS-nscd_setup_thread.c += -fpie
|
CFLAGS-xmalloc.c += $(nscd-cflags)
|
||||||
CFLAGS-aicache.c += -fpie
|
CFLAGS-xstrdup.c += $(nscd-cflags)
|
||||||
CFLAGS-selinux.c += -fpie
|
CFLAGS-mem.c += $(nscd-cflags)
|
||||||
CFLAGS-initgrcache.c += -fpie
|
CFLAGS-nscd_setup_thread.c += $(nscd-cflags)
|
||||||
CFLAGS-gai.c += -fpie
|
CFLAGS-aicache.c += $(nscd-cflags)
|
||||||
|
CFLAGS-selinux.c += $(nscd-cflags)
|
||||||
|
CFLAGS-initgrcache.c += $(nscd-cflags)
|
||||||
|
CFLAGS-gai.c += $(nscd-cflags)
|
||||||
|
|
||||||
|
ifeq (yesyes,$(have-fpie)$(build-shared))
|
||||||
|
ifeq (yes,$(have-z-relro))
|
||||||
|
relro-LDFLAGS += -Wl,-z,now
|
||||||
|
endif
|
||||||
|
|
||||||
$(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
|
$(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
|
||||||
$(LINK.o) -pie -Wl,-O1 \
|
$(LINK.o) -pie -Wl,-O1 \
|
||||||
$(sysdep-LDFLAGS) $(config-LDFLAGS) \
|
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(relro-LDFLAGS) \
|
||||||
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
|
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
|
||||||
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
|
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
|
||||||
$(LDFLAGS) $(LDFLAGS-$(@F)) \
|
$(LDFLAGS) $(LDFLAGS-$(@F)) \
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
* If we have reached the max. # of process, close accept socket.
|
|
||||||
! THIS COULD CAUSE THE KERNEL TO HANG ! BE CAREFUL !
|
|
@ -21,7 +21,7 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <hp-timing.h>
|
||||||
|
|
||||||
static long int linux_sysconf (int name);
|
static long int linux_sysconf (int name);
|
||||||
|
|
||||||
@ -347,13 +347,13 @@ __sysconf (int name)
|
|||||||
{
|
{
|
||||||
if (name == _SC_CPUTIME || name == _SC_THREAD_CPUTIME)
|
if (name == _SC_CPUTIME || name == _SC_THREAD_CPUTIME)
|
||||||
{
|
{
|
||||||
/* Check dynamically. */
|
#if HP_TIMING_AVAIL
|
||||||
int ac = i386_i486_test ();
|
|
||||||
|
|
||||||
/* Only i386 and i486 have no TSC. */
|
|
||||||
// XXX We can add here test for machines which cannot support a
|
// XXX We can add here test for machines which cannot support a
|
||||||
// XXX usabel TSC.
|
// XXX usable TSC.
|
||||||
return ac == 0 || (ac & (1 << 21)) == 0 ? -1 : 200112L;
|
return 200112L;
|
||||||
|
#else
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All the remainder, except the cache information, is handled in
|
/* All the remainder, except the cache information, is handled in
|
||||||
|
@ -279,6 +279,12 @@ handle_amd (int name)
|
|||||||
long int
|
long int
|
||||||
__sysconf (int name)
|
__sysconf (int name)
|
||||||
{
|
{
|
||||||
|
if (name == _SC_CPUTIME || name == _SC_THREAD_CPUTIME)
|
||||||
|
{
|
||||||
|
/* XXX Test whether TSC is usable. */
|
||||||
|
return 200112L;
|
||||||
|
}
|
||||||
|
|
||||||
/* We only handle the cache information here (for now). */
|
/* We only handle the cache information here (for now). */
|
||||||
if (name < _SC_LEVEL1_ICACHE_SIZE || name > _SC_LEVEL4_CACHE_LINESIZE)
|
if (name < _SC_LEVEL1_ICACHE_SIZE || name > _SC_LEVEL4_CACHE_LINESIZE)
|
||||||
return linux_sysconf (name);
|
return linux_sysconf (name);
|
||||||
|
Loading…
Reference in New Issue
Block a user