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:
2013-01-14 11:36:26 +01:00
parent f6aac1c3b5
commit f14fb60209
1285 changed files with 44244 additions and 14308 deletions
+8 -10
View File
@@ -1,4 +1,4 @@
/* $NetBSD: fopen.c,v 1.13 2008/03/13 15:40:00 christos Exp $ */
/* $NetBSD: fopen.c,v 1.15 2012/03/15 18:22:30 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)fopen.c 8.1 (Berkeley) 6/4/93";
#else
__RCSID("$NetBSD: fopen.c,v 1.13 2008/03/13 15:40:00 christos Exp $");
__RCSID("$NetBSD: fopen.c,v 1.15 2012/03/15 18:22:30 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -53,9 +53,7 @@ __RCSID("$NetBSD: fopen.c,v 1.13 2008/03/13 15:40:00 christos Exp $");
#include "local.h"
FILE *
fopen(file, mode)
const char *file;
const char *mode;
fopen(const char *file, const char *mode)
{
FILE *fp;
int f;
@@ -63,9 +61,9 @@ fopen(file, mode)
_DIAGASSERT(file != NULL);
if ((flags = __sflags(mode, &oflags)) == 0)
return (NULL);
return NULL;
if ((fp = __sfp()) == NULL)
return (NULL);
return NULL;
if ((f = open(file, oflags, DEFFILEMODE)) < 0)
goto release;
if (oflags & O_NONBLOCK) {
@@ -111,9 +109,9 @@ fopen(file, mode)
* fseek and ftell.)
*/
if (oflags & O_APPEND)
(void) __sseek((void *)fp, (fpos_t)0, SEEK_END);
return (fp);
(void) __sseek((void *)fp, (off_t)0, SEEK_END);
return fp;
release:
fp->_flags = 0; /* release */
return (NULL);
return NULL;
}