convert // comments to /**/; remove empty #if/#endif pairs. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-09-18 23:07:26 +02:00
parent 21730caa66
commit 93f8a2e834
59 changed files with 86 additions and 242 deletions

View File

@@ -341,22 +341,22 @@ libc_hidden_proto(isascii_l)
# endif
/* Return the lowercase version of C in locale L. */
// "ordinary" ctype.h has no __tolower, why we try to have it?
// remove after 0.9.31
//extern int __tolower_l (int __c, __locale_t __l) __THROW;
/* "ordinary" ctype.h has no __tolower, why we try to have it?
* remove after 0.9.31
*extern int __tolower_l (int __c, __locale_t __l) __THROW; */
extern int tolower_l (int __c, __locale_t __l) __THROW;
libc_hidden_proto(tolower_l)
/* Return the uppercase version of C. */
//extern int __toupper_l (int __c, __locale_t __l) __THROW;
/*extern int __toupper_l (int __c, __locale_t __l) __THROW; */
extern int toupper_l (int __c, __locale_t __l) __THROW;
libc_hidden_proto(toupper_l)
# if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus
# define tolower_l(c, locale) __tobody(c, tolower_l, (locale)->__ctype_tolower, (c, locale))
# define toupper_l(c, locale) __tobody(c, toupper_l, (locale)->__ctype_toupper, (c, locale))
//# define __tolower_l(c, locale) tolower_l((c), (locale))
//# define __toupper_l(c, locale) toupper_l((c), (locale))
/*# define __tolower_l(c, locale) tolower_l((c), (locale)) */
/*# define __toupper_l(c, locale) toupper_l((c), (locale)) */
# endif /* Optimizing gcc */

View File

@@ -43,9 +43,6 @@
* leading 0 -> octal
* all else -> decimal
*/
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
int inet_aton(const char *cp, struct in_addr *addrptr)
{
in_addr_t addr;

View File

@@ -70,9 +70,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <net/if.h>
#include <ifaddrs.h>
#ifdef __UCLIBC_HAS_IPV6__
#endif
#define GAIH_OKIFUNSPEC 0x0100
#define GAIH_EAI ~(GAIH_OKIFUNSPEC)
@@ -638,8 +635,6 @@ gaih_inet(const char *name, const struct gaih_service *service,
do {
tmpbuflen *= 2;
tmpbuf = alloca(tmpbuflen);
//if (tmpbuf == NULL)
// return -EAI_MEMORY;
rc = gethostbyaddr_r(at2->addr,
((at2->family == AF_INET6)
? sizeof(struct in6_addr)

View File

@@ -53,11 +53,11 @@ if_nametoindex(const char* ifname)
strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
if (ioctl (fd, SIOCGIFINDEX, &ifr) < 0)
{
// close never fails here, fd is just a unconnected socket
//int saved_errno = errno;
/* close never fails here, fd is just a unconnected socket.
*int saved_errno = errno; */
close(fd);
//if (saved_errno == EINVAL)
// __set_errno(ENOSYS);
/*if (saved_errno == EINVAL)
* __set_errno(ENOSYS); */
return 0;
}

View File

@@ -38,10 +38,6 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
/*
* Internet network address interpretation routine.
* The library routines call this routine to interpret

View File

@@ -56,9 +56,6 @@
# include <wchar.h>
#endif
#ifdef USE_IN_LIBIO
#endif
/*
* Unix authenticator operations vector
*/

View File

@@ -51,9 +51,6 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
# define fputs(s, f) _IO_fputs (s, f)
#endif
#ifdef USE_IN_LIBIO
#endif
static char *auth_errmsg (enum auth_stat stat) internal_function;
#ifdef __UCLIBC_HAS_THREADS__

View File

@@ -65,9 +65,6 @@ static char sccsid[] = "@(#)clnt_tcp.c 1.37 87/10/05 Copyr 1984 Sun Micro";
# include <wchar.h>
#endif
#ifdef USE_IN_LIBIO
#endif
extern u_long _create_xid (void) attribute_hidden;
#define MCALL_MSG_SIZE 24

View File

@@ -87,10 +87,6 @@ static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94";
#endif
#include <sys/uio.h>
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
/* some forward declarations */
static int __ivaliduser2(FILE *hostf, u_int32_t raddr,

View File

@@ -35,13 +35,10 @@
#include <stdint.h>
#include <assert.h>
#include <locale.h>
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
#ifdef __UCLIBC_HAS_XLOCALE__
#include <xlocale.h>
#endif /* __UCLIBC_HAS_XLOCALE__ */
# include <xlocale.h>
#endif
/**********************************************************************/
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
@@ -276,9 +273,6 @@ IS_FUNC_BODY(xdigit);
#ifdef L_tolower
#undef tolower
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
int tolower(int c)
@@ -312,17 +306,14 @@ int tolower_l(int c, __locale_t l)
return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_tolower[c] : c;
}
libc_hidden_def(tolower_l)
//remove after 0.9.31. See ctype.h for why.
//weak_alias (tolower_l, __tolower_l)
/*remove after 0.9.31. See ctype.h for why.
*weak_alias (tolower_l, __tolower_l) */
#endif
/**********************************************************************/
#ifdef L_toupper
#undef toupper
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
int toupper(int c)
@@ -356,8 +347,8 @@ int toupper_l(int c, __locale_t l)
return __UCLIBC_CTYPE_IN_TO_DOMAIN(c) ? l->__ctype_toupper[c] : c;
}
libc_hidden_def(toupper_l)
//remove after 0.9.31. See ctype.h for why.
//weak_alias (toupper_l, __toupper_l)
/*remove after 0.9.31. See ctype.h for why.
*weak_alias (toupper_l, __toupper_l) */
#endif
/**********************************************************************/

View File

@@ -93,11 +93,11 @@ DIR *opendir(const char *name)
* to worry about it right now (if ever). */
if (fstat(fd, &statbuf) < 0) {
// this close() never fails
//int saved_errno;
//saved_errno = errno;
/* this close() never fails
*int saved_errno;
*saved_errno = errno; */
close(fd);
//__set_errno(saved_errno);
/*__set_errno(saved_errno);*/
return NULL;
}

View File

@@ -61,10 +61,7 @@
#endif
#ifdef __UCLIBC__
#define __memset memset
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
# define __memset memset
#endif
/* For platform which support the ISO C amendement 1 functionality we
@@ -73,10 +70,6 @@
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
# include <wchar.h>
# include <wctype.h>
# ifdef __UCLIBC__
# ifdef __UCLIBC_HAS_LOCALE__
# endif
# endif
#endif
/* We need some of the locale data (the collation sequence information)

View File

@@ -83,9 +83,6 @@ char *alloca ();
# include <sys/stat.h>
#endif
#ifdef __UCLIBC_HAS_LFS__
#endif
#if !defined _LIBC && !HAVE_DECL_STPCPY && !defined stpcpy
char *stpcpy ();
#endif

View File

@@ -209,9 +209,6 @@ int __glob_sort(const void *a, const void *b)
}
#endif /* !__GLOB64 */
#ifdef __GLOB64
#else
#endif
int glob(const char *pat, int flags, int (*errfunc)(const char *path, int err), glob_t *g)
{
const char *p=pat, *d;
@@ -285,9 +282,6 @@ libc_hidden_def(glob64)
libc_hidden_def(glob)
#endif
#ifdef __GLOB64
#else
#endif
void globfree(glob_t *g)
{
size_t i;

View File

@@ -469,9 +469,6 @@ static int glob_in_dir (const char *pattern, const char *directory, int flags,
return GLOB_NOSPACE;
}
#ifdef COMPILE_GLOB64
#else
#endif
/* Do glob searching for PATTERN, placing results in PGLOB.
The bits defined above may be set in FLAGS.
If a directory cannot be opened or read and ERRFUNC is not nil,

View File

@@ -28,12 +28,6 @@
#include <sys/sysmacros.h>
#ifdef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__
#endif
#ifndef __ARCH_HAS_NO_LDSO__
#endif
#ifndef SHARED
void *__libc_stack_end = NULL;

View File

@@ -1,7 +1,5 @@
#include "internal_errno.h"
#ifdef __UCLIBC_HAS_THREADS__
#endif
int errno = 0;
int h_errno = 0;

View File

@@ -45,9 +45,6 @@
#include <sys/time.h>
#include "tempname.h"
#ifdef __UCLIBC_HAS_LFS__
#endif
/* Return nonzero if DIR is an existent directory. */
static int direxists (const char *dir)
{

View File

@@ -58,9 +58,6 @@
#include <ctype.h>
#include <stdio.h>
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
#endif
#ifdef __UCLIBC_MJN3_ONLY__
#ifdef L_setlocale
#warning TODO: Make the link_warning()s a config option?
@@ -351,9 +348,6 @@ libc_hidden_def(localeconv)
/**********************************************************************/
#if defined(L__locale_init) && !defined(__LOCALE_C_ONLY)
#ifndef __UCLIBC_HAS_XLOCALE__
#endif
struct __uclibc_locale_struct __global_locale_data;
__locale_t __global_locale = &__global_locale_data;

View File

@@ -791,9 +791,6 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
/* Initialize DFA. We use the length of the regular expression PAT_LEN
as the initial length of some arrays. */
#ifdef __UCLIBC_HAS_WCHAR__
#endif
static reg_errcode_t
init_dfa (re_dfa_t *dfa, size_t pat_len)
{

View File

@@ -6035,17 +6035,18 @@ byte_re_match_2_internal (
{ /* No. So allocate them with malloc. We need one
extra element beyond `num_regs' for the `-1' marker
GNU code uses. */
// regex specs say:
// "If REGS_UNALLOCATED, allocate space in the regs structure
// for max(RE_NREGS, re_nsub + 1) groups"
// but real-world testsuites fail with contrived examples
// with lots of groups.
// I don't see why we can't just allocate exact needed number.
// Incidentally, it makes RE_NREGS unused.
//
// regs->num_regs = MAX (RE_NREGS, num_regs + 1); - VERY WRONG
// regs->num_regs = MIN (RE_NREGS, num_regs + 1); - slightly less wrong
// good one which passes uclibc test/regex/tst-regex2.c:
/* regex specs say:
* "If REGS_UNALLOCATED, allocate space in the regs structure
* for max(RE_NREGS, re_nsub + 1) groups"
* but real-world testsuites fail with contrived examples
* with lots of groups.
* I don't see why we can't just allocate exact needed number.
* Incidentally, it makes RE_NREGS unused.
*
* regs->num_regs = MAX (RE_NREGS, num_regs + 1); - VERY WRONG
* regs->num_regs = MIN (RE_NREGS, num_regs + 1); - slightly less wrong
* good one which passes uclibc test/regex/tst-regex2.c:
*/
regs->num_regs = num_regs + 1;
regs->start = TALLOC (regs->num_regs, regoff_t);
regs->end = TALLOC (regs->num_regs, regoff_t);

View File

@@ -29,12 +29,8 @@
#include <sys/statvfs.h>
#undef stat
#define stat stat64
#if !defined __UCLIBC_LINUX_SPECIFIC__
#else
#endif
int fstatvfs64 (int fd, struct statvfs64 *buf)
{

View File

@@ -31,9 +31,6 @@
#undef stat
#define stat stat64
#if defined __UCLIBC_LINUX_SPECIFIC__
#else
#endif
int statvfs64 (const char *file, struct statvfs64 *buf)
{

View File

@@ -35,11 +35,7 @@
#include <string.h>
#include <stdlib.h>
#ifdef __UCLIBC_HAS_THREADS__
#include <pthread.h>
#endif
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
# include <pthread.h>
#endif
static char zapchar;

View File

@@ -47,15 +47,16 @@ static void __setutent(void)
if (O_CLOEXEC == 0) {
/* Make sure the file will be closed on exec() */
fcntl(static_fd, F_SETFD, FD_CLOEXEC);
// thus far, {G,S}ETFD only has this single flag,
// and setting it never fails.
//int ret = fcntl(static_fd, F_GETFD, 0);
//if (ret >= 0) {
// ret = fcntl(static_fd, F_SETFD, ret | FD_CLOEXEC);
//}
//if (ret < 0) {
// static_fd = -1;
//}
/* thus far, {G,S}ETFD only has this single flag,
* and setting it never fails.
*int ret = fcntl(static_fd, F_GETFD, 0);
*if (ret >= 0) {
* ret = fcntl(static_fd, F_SETFD, ret | FD_CLOEXEC);
*}
*if (ret < 0) {
* static_fd = -1;
*}
*/
}
return;
}

View File

@@ -44,10 +44,6 @@
#ifdef __UCLIBC_HAS_XLOCALE__
#include <xlocale.h>
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif /* __UCLIBC_HAS_XLOCALE__ */
#ifdef __UCLIBC_HAS_CTYPE_TABLES__
#endif
/* We know wide char support is enabled. We wouldn't be here otherwise. */
@@ -682,11 +678,12 @@ wint_t towctrans(wint_t wc, wctrans_t desc)
{
if ((unsigned int)(desc - _CTYPE_tolower) <= (_CTYPE_toupper - _CTYPE_tolower)) {
/* Transliteration is either tolower or toupper. */
// I think it's wrong: _toupper(c) assumes that c is a *lowercase* *letter* -
// it is defined as ((c) ^ 0x20)!
// if ((__uwchar_t) wc <= 0x7f) {
// return (desc == _CTYPE_tolower) ? _tolower(wc) : _toupper(wc);
// }
/* I think it's wrong: _toupper(c) assumes that c is a *lowercase* *letter* -
* it is defined as ((c) ^ 0x20)!
* if ((__uwchar_t) wc <= 0x7f) {
* return (desc == _CTYPE_tolower) ? _tolower(wc) : _toupper(wc);
* }
*/
__uwchar_t c = wc | 0x20; /* lowercase if it's a letter */
if (c >= 'a' && c <= 'z') {
if (desc == _CTYPE_toupper)

View File

@@ -36,15 +36,14 @@
#include <wordexp.h>
#define __WORDEXP_FULL
//#undef __WORDEXP_FULL
/*
* This is a recursive-descent-style word expansion routine.
*/
/* These variables are defined and initialized in the startup code. */
//extern int __libc_argc;
//extern char **__libc_argv;
/*extern int __libc_argc;*/
/*extern char **__libc_argv;*/
/* FIXME!!!! */
int attribute_hidden __libc_argc;

View File

@@ -32,14 +32,10 @@
#include <grp.h>
#include <paths.h>
#ifdef __UCLIBC_HAS_SHADOW__
#include <shadow.h>
# include <shadow.h>
#endif
#include <bits/uClibc_mutex.h>
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
/**********************************************************************/
/* Prototypes for internal functions. */

View File

@@ -7,10 +7,6 @@
#include "_stdio.h"
#ifdef __UCLIBC_HAS_LFS__
#else
#endif
/**********************************************************************/
#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
/**********************************************************************/

View File

@@ -77,12 +77,6 @@
#include <bits/uClibc_fpmax.h>
#endif /* __UCLIBC_HAS_FLOATS__ */
#ifdef __UCLIBC_HAS_WCHAR__
#endif
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
#ifdef __UCLIBC_HAS_SCANF_GLIBC_A_FLAG__
#ifdef L_vfscanf
/* only emit this once */

View File

@@ -115,9 +115,6 @@
#include <bits/uClibc_uintmaxtostr.h>
#include <bits/uClibc_va_copy.h>
#ifdef __UCLIBC_HAS_WCHAR__
#endif
/* Some older or broken gcc toolchains define LONG_LONG_MAX but not
* LLONG_MAX. Since LLONG_MAX is part of the standard, that's what
* we use. So complain if we do not have it but should.
@@ -714,10 +711,6 @@ void attribute_hidden _ppfs_setargs(register ppfs_t *ppfs)
/**********************************************************************/
#ifdef L__ppfs_parsespec
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
/* Notes: argtype differs from glibc for the following:
* mine glibc
* lc PA_WCHAR PA_CHAR the standard says %lc means %C

View File

@@ -76,10 +76,6 @@ libc_hidden_def(__fgetc_unlocked)
strong_alias(__fgetc_unlocked,fgetc_unlocked)
libc_hidden_def(fgetc_unlocked)
///* libc_hidden_proto(__getc_unlocked) */
//strong_alias(__fgetc_unlocked,__getc_unlocked)
//libc_hidden_def(__getc_unlocked)
strong_alias(__fgetc_unlocked,getc_unlocked)
libc_hidden_def(getc_unlocked)

View File

@@ -7,9 +7,6 @@
#include "_stdio.h"
#ifdef __UCLIBC_HAS_LFS__
#endif
#ifndef __DO_LARGEFILE
# define FTELL ftell
# define OFFSET_TYPE long int

View File

@@ -172,10 +172,6 @@ extern void __fp_range_check(__fpmax_t y, __fpmax_t x) attribute_hidden;
/**********************************************************************/
#if defined(L___strtofpmax) || defined(L___strtofpmax_l) || defined(L___wcstofpmax) || defined(L___wcstofpmax_l)
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
#if defined(L___wcstofpmax) || defined(L___wcstofpmax_l)
#define __strtofpmax __wcstofpmax

View File

@@ -35,7 +35,6 @@
#include <sys/time.h>
#ifdef __ARC4RANDOM_USE_ERANDOM__
#include <sys/sysctl.h>
//libc_hidden_proto(sysctl)
#endif

View File

@@ -493,10 +493,6 @@ unsigned long attribute_hidden _stdlib_strto_l(register const Wchar * __restrict
/* This is the main work fuction which handles both strtol (sflag = 1) and
* strtoul (sflag = 0). */
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
unsigned long attribute_hidden __XL_NPP(_stdlib_strto_l)(register const Wchar * __restrict str,
Wchar ** __restrict endptr, int base,
int sflag __LOCALE_PARAM)

View File

@@ -33,7 +33,7 @@
#include <string.h>
#undef memchr
//#define memchr TESTING
/*#define memchr TESTING*/
void *memchr(const void *s, int c, size_t count)
{
void *edi;

View File

@@ -33,7 +33,7 @@
#include <string.h>
#undef memmove
//#define memmove TESTING
/*#define memmove TESTING*/
void *memmove(void *dest, const void *src, size_t n)
{
int eax, ecx, esi, edi;

View File

@@ -9,7 +9,7 @@
#include <string.h>
#undef strchrnul
//#define strchrnul TESTING
/*#define strchrnul TESTING*/
char *strchrnul(const char *s, int c)
{
int esi;

View File

@@ -33,7 +33,7 @@
#include <string.h>
#undef strncat
//#define strncat TESTING
/*#define strncat TESTING*/
char *strncat(char * dest, const char * src, size_t count)
{
int esi, edi, eax, ecx, edx;

View File

@@ -33,7 +33,7 @@
#include <string.h>
#undef strncpy
//#define strncpy TESTING
/*#define strncpy TESTING*/
char *strncpy(char * dest, const char * src, size_t count)
{
int esi, edi, ecx, eax;

View File

@@ -35,7 +35,7 @@
#ifdef __USE_GNU
#undef strnlen
//#define strnlen TESTING
/*#define strnlen TESTING*/
size_t strnlen(const char *s, size_t count)
{
int edx;

View File

@@ -12,8 +12,6 @@
#ifdef WANT_WIDE
# define strcasecmp wcscasecmp
# define strcasecmp_l wcscasecmp_l
# if defined(__USE_GNU) && defined(__UCLIBC_HAS_XLOCALE__)
# endif
# ifdef __UCLIBC_DO_XLOCALE
# define TOLOWER(C) towlower_l((C), locale_arg)
# else
@@ -23,8 +21,6 @@
# ifdef __UCLIBC_DO_XLOCALE
# define TOLOWER(C) tolower_l((C), locale_arg)
# else
#if !defined __UCLIBC_HAS_XLOCALE__ && defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
# define TOLOWER(C) tolower((C))
# endif
#endif

View File

@@ -8,10 +8,6 @@
#include "_string.h"
#include <ctype.h>
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
char *strcasestr(const char *s1, const char *s2)
{
register const char *s = s1;

View File

@@ -12,8 +12,6 @@
#ifdef WANT_WIDE
# define strncasecmp wcsncasecmp
# define strncasecmp_l wcsncasecmp_l
# if defined(__USE_GNU) && defined(__UCLIBC_HAS_XLOCALE__)
# endif
# ifdef __UCLIBC_DO_XLOCALE
# define TOLOWER(C) towlower_l((C), locale_arg)
# else

View File

@@ -20,9 +20,6 @@
#include <locale.h>
#include <stdlib.h>
#ifdef __UCLIBC_HAS_WCHAR__
#endif
int
__aeabi_MB_CUR_MAX (void)
{

View File

@@ -143,10 +143,11 @@ __END_DECLS
# define __ispunct(c) __body(ispunct,c)
# define __isgraph(c) __body(isgraph,c)
//locale-aware ctype.h has no __tolower, why stub locale
//tries to have it? remove after 0.9.31
//# define __tolower(c) __body(tolower,c)
//# define __toupper(c) __body(toupper,c)
/*locale-aware ctype.h has no __tolower, why stub locale
*tries to have it? remove after 0.9.31
*# define __tolower(c) __body(tolower,c)
*# define __toupper(c) __body(toupper,c)
*/
/* Do not combine in one #if - unifdef tool is not that clever */
# ifndef __NO_CTYPE

View File

@@ -25,10 +25,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef __UCLIBC_HAS_LFS__
#else
#endif
/* Return a malloc'd string containing the current directory name.
If the environment variable `PWD' is set, and its value is correct,
that value is used. */

View File

@@ -43,10 +43,10 @@ int __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oac
if (act) {
kact.k_sa_handler = act->sa_handler;
// BUG?! kact.sa_mask is a long, but sigset_t is a vector
// of longs and it may be bigger (in glibc, it _is_ bigger).
// Should we do this instead?
// kact.sa_mask = act->sa_mask.__val[0];
/* BUG?! kact.sa_mask is a long, but sigset_t is a vector
/* of longs and it may be bigger (in glibc, it _is_ bigger).
/* Should we do this instead?
/* kact.sa_mask = act->sa_mask.__val[0]; */
memcpy(&kact.sa_mask, &act->sa_mask, sizeof(sigset_t));
kact.sa_flags = act->sa_flags;
if (kact.sa_flags & SA_SIGINFO)
@@ -64,11 +64,11 @@ int __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oac
stub,
_NSIG / 8);
// BUG?! if ret == -1, we return -1 but do not set errno?!
/* BUG?! if ret == -1, we return -1 but do not set errno?! */
if (ret >= 0 || errno != ENOSYS) {
if (oact && ret >= 0) {
oact->sa_handler = koact.k_sa_handler;
// maybe oact->sa_mask.__val[0] = koact.sa_mask; ?
/* maybe oact->sa_mask.__val[0] = koact.sa_mask;? */
memcpy(&oact->sa_mask, &koact.sa_mask, sizeof(sigset_t));
oact->sa_flags = koact.sa_flags;
oact->sa_restorer = koact.sa_restorer;

View File

@@ -24,9 +24,6 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
//#include <sys/statvfs.h>
//#include "linux_fsinfo.h"
#ifndef __USE_FILE_OFFSET64

View File

@@ -29,7 +29,6 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/statfs.h>
//#include <sys/statvfs.h>
extern __typeof(statfs) __libc_statfs;

View File

@@ -27,9 +27,6 @@
/* version perusing nanosleep */
#if defined __UCLIBC_HAS_REALTIME__
//libc_hidden_proto(__sigaddset)
//libc_hidden_proto(__sigemptyset)
//libc_hidden_proto(__sigismember)
#if 0
/* This is a quick and dirty, but not 100% compliant with

View File

@@ -42,10 +42,6 @@
#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
#ifdef __UCLIBC_HAS_XLOCALE__
#elif defined __UCLIBC_HAS_CTYPE_TABLES__
#endif
/*
* Local shells should NOT be added here. They should be added in
* /etc/shells.

View File

@@ -356,9 +356,10 @@ strong_alias(__ieee754_lgamma, gamma)
#endif
// FIXME! Looks like someone just used __ieee754_gamma_r,
// believing it's a "true" gamma function, but it was not!
// Our tgamma is WRONG.
/* FIXME! Looks like someone just used __ieee754_gamma_r,
* believing it's a "true" gamma function, but it was not!
* Our tgamma is WRONG.
*/
/* double tgamma(double x)
* Return the Gamma function of x.

View File

@@ -42,7 +42,7 @@ libpthread_hidden_proto(pthread_attr_setscope)
* Therefore, define the function pthread_attr_init() here using
* a strong symbol. */
//int __pthread_attr_init_2_1(pthread_attr_t *attr)
/*int __pthread_attr_init_2_1(pthread_attr_t *attr)*/
int pthread_attr_init(pthread_attr_t *attr)
{
size_t ps = getpagesize ();

View File

@@ -36,9 +36,6 @@
#include "sysdeps/pthread/pthread-functions.h"
#if ! defined USE___THREAD && defined __UCLIBC_HAS_XLOCALE__
#endif
int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
int * __libc_pthread_init (const struct pthread_functions *functions)

View File

@@ -82,7 +82,7 @@ int pthread_atfork(void (*prepare)(void),
__pthread_mutex_unlock(&pthread_atfork_lock);
return 0;
}
//strong_alias (__pthread_atfork, pthread_atfork)
/*strong_alias (__pthread_atfork, pthread_atfork)*/
static __inline__ void pthread_call_handlers(struct handler_list * list)
{

View File

@@ -25,11 +25,6 @@
#endif
#include "internals.h"
#ifdef SHARED
#endif
#if !(USE_TLS && HAVE___THREAD) && defined __UCLIBC_HAS_XLOCALE__
#endif
int __libc_multiple_threads attribute_hidden __attribute__((nocommon));
strong_alias (__libc_multiple_threads, __librt_multiple_threads)

View File

@@ -72,15 +72,16 @@ int shm_open(const char *name, int oflag, mode_t mode)
fd = open(shm_name, oflag, mode);
if (fd >= 0) {
fcntl(fd, F_SETFD, FD_CLOEXEC);
// thus far, {G,S}ETFD only has this single flag,
// and setting it never fails.
//int fdflags = fcntl(fd, F_GETFD);
//if (fdflags >= 0)
// fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
//if (fdflags < 0) {
// close(fd);
// fd = -1;
//}
/* thus far, {G,S}ETFD only has this single flag,
* and setting it never fails.
*int fdflags = fcntl(fd, F_GETFD);
*if (fdflags >= 0)
* fdflags = fcntl(fd, F_SETFD, fdflags | FD_CLOEXEC);
*if (fdflags < 0) {
* close(fd);
* fd = -1;
*}
*/
}
#endif
free(shm_name); /* doesn't affect errno */