Libraries updates and cleanup

* Updating common/lib
 * Updating lib/csu
 * Updating lib/libc
 * Updating libexec/ld.elf_so
 * Corrected test on __minix in featuretest to actually follow the
   meaning of the comment.
 * Cleaned up _REENTRANT-related defintions.
 * Disabled -D_REENTRANT for libfetch
 * Removing some unneeded __NBSD_LIBC defines and tests

Change-Id: Ic1394baef74d11b9f86b312f5ff4bbc3cbf72ce2
This commit is contained in:
2012-11-15 12:06:41 +01:00
parent f6aac1c3b5
commit f14fb60209
1285 changed files with 44244 additions and 14308 deletions

View File

@@ -1,4 +1,4 @@
/* $NetBSD: clock_settime.c,v 1.11 2009/01/11 02:46:30 christos Exp $ */
/* $NetBSD: clock_settime.c,v 1.12 2011/10/15 23:00:02 christos Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
__RCSID("$NetBSD: clock_settime.c,v 1.11 2009/01/11 02:46:30 christos Exp $");
__RCSID("$NetBSD: clock_settime.c,v 1.12 2011/10/15 23:00:02 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -51,6 +51,10 @@ __RCSID("$NetBSD: clock_settime.c,v 1.11 2009/01/11 02:46:30 christos Exp $");
#include <sys/clockctl.h>
#if defined(__minix) && !defined(O_CLOEXEC)
#define O_CLOEXEC 0
#endif
extern int __clockctl_fd;
int ____clock_settime50(clockid_t, const struct timespec *);
@@ -78,14 +82,12 @@ clock_settime(clockid_t clock_id, const struct timespec *tp)
* If this fails, it means that we are not root
* and we cannot open clockctl. This is a failure.
*/
__clockctl_fd = open(_PATH_CLOCKCTL, O_WRONLY, 0);
__clockctl_fd = open(_PATH_CLOCKCTL, O_WRONLY | O_CLOEXEC, 0);
if (__clockctl_fd == -1) {
/* original error was EPERM - don't leak open errors */
errno = EPERM;
return -1;
}
(void) fcntl(__clockctl_fd, F_SETFD, FD_CLOEXEC);
}
/*