+1998-09-06 09:53 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
+
+ * Makeconfig (+gccwarn): Remove -Wno-parentheses.
+
+ * elf/dl-open.c: Quiet -Wparentheses warnings.
+ * iconvdata/johab.c: Likewise.
+ * iconvdata/uhc.c: Likewise.
+ * inet/inet_net.c: Likewise.
+ * io/fts.c: Likewise.
+ * locale/newlocale.c: Likewise.
+ * misc/getttyent.c: Likewise.
+ * misc/mntent_r.c: Likewise.
+ * misc/ttyslot.c: Likewise.
+ * nscd/nscd_conf.c: Likewise.
+ * nss/nsswitch.c: Likewise.
+ * resolv/gethnamaddr.c: Likewise.
+ * resolv/nsap_addr.c: Likewise.
+ * resolv/res_debug.c: Likewise.
+ * stdio-common/_itoa.c: Likewise.
+ * stdlib/strtod.c: Likewise.
+ * string/strverscmp.c: Likewise.
+ * sunrpc/svc.c: Likewise.
+ * sysdeps/libm-ieee754/e_cosh.c: Likewise.
+ * sysdeps/libm-ieee754/e_gamma_r.c: Likewise.
+ * sysdeps/libm-ieee754/e_sinh.c: Likewise.
+ * sysdeps/posix/getaddrinfo.c: Likewise.
+
1998-09-06 15:13 Ulrich Drepper <drepper@cygnus.com>
* elf/dlsym.c (dlsym_doit): Use new RTLD_DEFAULT macro to test
* include/alloca.h: Add multiple-inclusion guard.
* include/db.h: Likewise.
* include/db_185.h: Likewise.
+ * include/dlfcn.h: Likewise.
* include/fcntl.h: Likewise.
* include/grp.h: Likewise.
* include/libintl.h: Likewise.
* include/sys/times.h: Likewise.
* include/sys/wait.h: Likewise.
- * include/dlfcn.h: Declare dladdr only for __USE_GNU.
- Define RTLD_DEFAULT.
-
1998-09-06 09:00 Ulrich Drepper <drepper@cygnus.com>
* version.h (VERSION): Bump to 2.0.96.
* elf/dl-support.c: Likewise.
* elf/dl-symbol.c: Likewise.
* elf/dl-version.c: Likewise.
- * elf/dlfcn.h: Likewise.
* elf/dlsym.c: Likewise.
* elf/dlvsym.c: Likewise.
* elf/ldsodefs.h: Likewise.
* sysdeps/i386/dl-machine.h: Likewise.
* sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise.
+ * elf/dlfcn.h: Declare dladdr only for __USE_GNU.
+ Define RTLD_DEFAULT.
+
1998-09-05 Mark Kettenis <kettenis@phys.uva.nl>
* sysdeps/mach/hurd/i386/init-first.c (init1): Call
endif
# Extra flags to pass to GCC.
-+gccwarn := -Wall -Wwrite-strings -Wno-parentheses -Winline -Wstrict-prototypes
++gccwarn := -Wall -Wwrite-strings -Winline -Wstrict-prototypes
# This is the program that generates makefile
# dependencies from C source files.
_dl_debug_state ();
/* Run the initializer functions of new objects. */
- while (init = _dl_init_next (&new->l_searchlist))
+ while ((init = _dl_init_next (&new->l_searchlist)))
(*(void (*) (int, char **, char **)) init) (__libc_argc, __libc_argv,
__environ);
} \
else if (i > 0 && m > 0) \
ch = ((i - 1) * 21 + (m - 1)) * 28 + f + 0xac00; \
- else if (i > 0 && m == 0 & f == 0) \
+ else if (i > 0 && m == 0 && f == 0) \
ch = init_to_ucs[i - 1]; \
- else if (i == 0 && m > 0 & f == 0) \
+ else if (i == 0 && m > 0 && f == 0) \
ch = 0x314e + m; /* 0x314f + m - 1 */ \
- else if (i == 0 && m == 0 & f > 0) \
+ else if (i == 0 && m == 0 && f > 0) \
ch = final_to_ucs[f - 1]; /* round trip?? */ \
else \
{ \
*outptr++ = s[0]; \
*outptr++ = s[1]; \
} \
- else if (ch >= 0x4e00 && ch <= 0x9fa5 || ch >= 0xf900 && ch <= 0xfa0b) \
+ else if ((ch >= 0x4e00 && ch <= 0x9fa5) || (ch >= 0xf900 && ch <= 0xfa0b))\
{ \
size_t written = ucs4_to_ksc5601_hanja (ch, outptr, \
(NEED_LENGTH_TEST \
+#ifndef _ALLOCA_H
+
#include <stdlib/alloca.h>
#undef __alloca
#ifdef __GNUC__
# define __alloca(size) __builtin_alloca (size)
#endif /* GCC. */
+
+#endif
+#ifndef _DB_H_
+
#include <db2/db.h>
/* Internal interface for NSS. */
int __nss_db_open __P((const char *,
DBTYPE, u_int32_t, int, DB_ENV *, DB_INFO *, DB **));
+
+#endif
+#ifndef _DB_185_H_
#include <db2/db_185.h>
/* Now define the internal interfaces. */
DB *__dbopen __P((const char *, int, int, DBTYPE, const void *));
+#endif
+#ifndef _DLFCN_H
#include <elf/dlfcn.h>
/* Now define the internal interfaces. */
extern void *__dlvsym __P ((void *__handle, __const char *__name,
__const char *__version));
+#endif
+#ifndef _FCNTL_H
#include <io/fcntl.h>
/* Now define the internal interfaces. */
extern int __open64 __P ((__const char *__file, int __oflag, ...));
+#endif
+#ifndef _GRP_H
#include <grp/grp.h>
/* Now define the internal interfaces. */
extern int __fgetgrent_r __P ((FILE * __stream, struct group *__resultbuf,
char *buffer, size_t __buflen,
struct group **__result));
+#endif
+#ifndef _LIBINTL_H
#include <intl/libintl.h>
/* Now define the internal interfaces. */
extern char *__textdomain __P ((__const char *__domainname));
extern char *__bindtextdomain __P ((__const char *__domainname,
__const char *__dirname));
+#endif
+#ifndef _MNTENT_H
#include <misc/mntent.h>
/* Now define the internal interfaces. */
extern int __endmntent __P ((FILE *__stream));
extern char *__hasmntopt __P ((__const struct mntent *__mnt,
__const char *__opt));
+#endif
+#ifndef _PWD_H
#include <pwd/pwd.h>
/* Now define the internal interfaces. */
extern int __fgetpwent_r __P ((FILE * __stream, struct passwd *__resultbuf,
char *__buffer, size_t __buflen,
struct passwd **__result));
+#endif
-#include "posix/sched.h"
+#ifndef _SCHED_H
+#include <posix/sched.h>
/* Now define the internal interfaces. */
/* This is Linux specific. */
extern int __clone __P ((int (*__fn) (void *__arg), void *__child_stack,
int __flags, void *__arg));
+#endif
+#ifndef _SEARCH_H
#include <misc/search.h>
/* Now define the internal interfaces. */
__compar_fn_t compar));
extern void __twalk __PMT ((__const void *__root, __action_fn_t action));
extern void __tdestroy __PMT ((void *__root, __free_fn_t freefct));
+#endif
+#ifndef _SETJMP_H
#include <setjmp/setjmp.h>
/* Now define the internal interfaces. */
This is used by the machine-dependent definition of `__sigsetjmp'.
Always returns zero, for convenience. */
extern int __sigjmp_save __P ((jmp_buf __env, int __savemask));
+#endif
+#ifndef _SHADOW_H
#include <shadow/shadow.h>
/* Now define the internal interfaces. */
struct spwd **__result));
extern int __lckpwdf __P ((void));
extern int __ulckpwdf __P ((void));
+#endif
+#ifndef _SIGNAL_H
#if defined __need_sig_atomic_t || defined __need_sigset_t
# include <signal/signal.h>
#else
extern int __sigaltstack __P ((__const struct sigaltstack *__ss,
struct sigaltstack *__oss));
#endif
+#endif
+#ifndef _STDIO_H
#ifdef USE_IN_LIBIO
#ifdef __need_FILE
# include <libio/stdio.h>
#else
#include <stdio/stdio.h>
#endif
+#endif
+#ifndef _STDLIB_H
#include <stdlib/stdlib.h>
/* Now define the internal interfaces. */
extern char *__realpath __P ((__const char *__name, char *__resolved));
extern int __ptsname_r __P ((int __fd, char *__buf, size_t __buflen));
extern int __getpt __P ((void));
+#endif
+#ifndef _STRING_H
#include <string/string.h>
/* Now define the internal interfaces. */
extern size_t __strnlen __P ((__const char *__string, size_t __maxlen));
extern char *__strsep __P ((char **__stringp, __const char *__delim));
extern int __strverscmp __P ((__const char *__s1, __const char *__s2));
+#endif
+#ifndef _SYS_FILE_H
#include <misc/sys/file.h>
/* Now define the internal interfaces. */
extern int __flock __P ((int __fd, int __operation));
+#endif
+#ifndef _SYS_GMON_H
#include <gmon/sys/gmon.h>
/* Now define the internal interfaces. */
/* Write current profiling data to file. */
extern void __write_profiling __P ((void));
extern void write_profiling __P ((void));
+#endif
+#ifndef _SYS_IOCTL_H
#include <misc/sys/ioctl.h>
/* Now define the internal interfaces. */
extern int __ioctl __P ((int __fd, unsigned long int __request, ...));
+#endif
+#ifndef _SYS_MMAN_H
#include_next <sys/mman.h>
/* Now define the internal interfaces. */
/* This one is Linux specific. */
extern __ptr_t __mremap __P ((__ptr_t __addr, size_t __old_len,
size_t __new_len, int __may_move));
+#endif
+#ifndef _SYS_RESOURCE_H
#include <resource/sys/resource.h>
/* Now define the internal interfaces. */
extern int __getrlimit __P ((enum __rlimit_resource __resource,
struct rlimit *__rlimits));
extern int __getrusage __P ((enum __rusage_who __who, struct rusage *__usage));
+#endif
+#ifndef _SYS_SELECT_H
#include <misc/sys/select.h>
/* Now define the internal interfaces. */
extern int __pselect __P ((int __nfds, __fd_set *__readfds,
__fd_set *__writefds, __fd_set *__exceptfds,
struct timespec *__timeout));
+#endif
+#ifndef _SYS_SOCKET_H
#include <socket/sys/socket.h>
/* Now define the internal interfaces. */
extern int __socket __P ((int __domain, int __type, int __protocol));
+#endif
+#ifndef _SYS_STATFS_H
#include <io/sys/statfs.h>
/* Now define the internal interfaces. */
extern int __statfs __P ((__const char *__file, struct statfs *__buf));
extern int __fstatfs __P ((int __fildes, struct statfs *__buf));
+#endif
+#ifndef _SYS_TIME_H
#include <time/sys/time.h>
/* Now document the internal interfaces. */
__const struct itimerval *__new,
struct itimerval *__old));
extern int __utimes __P ((__const char *__file, struct timeval __tvp[2]));
+#endif
+#ifndef _SYS_TIMES_H
#include <posix/sys/times.h>
/* Now define the internal interfaces. */
extern clock_t __times __P ((struct tms *__buffer));
+#endif
+#ifndef _SYS_WAIT_H
#include <posix/sys/wait.h>
/* Now define the internal interfaces. */
int __options, struct rusage * __usage));
extern __pid_t __wait4 __P ((__pid_t __pid, __WAIT_STATUS __stat_loc,
int __options, struct rusage *__usage));
+#endif
+#ifndef _TERMIOS_H
#include <termios/termios.h>
/* Now define the internal interfaces. */
extern int __tcgetattr __P ((int __fd, struct termios *__termios_p));
+#endif
--- /dev/null
+#include <math/tgmath.h>
+#ifndef _TIME_H
#if defined __need_time_t || defined __need_clock_t || defined __need_timespec
# include <time/time.h>
#else
struct timespec *__remaining));
extern int __getdate_r __P ((__const char *__string, struct tm *__resbufp));
#endif
+#endif
+#ifndef _ULIMIT_H
#include <resource/ulimit.h>
/* Now define the internal interfaces. */
extern long int __ulimit __P ((int __cmd, ...));
+#endif
+#ifndef _UTMP_H
#include <login/utmp.h>
/* Now define the internal interfaces. */
struct utmp **__result));
extern int __getutline_r __P ((__const struct utmp *__line,
struct utmp *__buffer, struct utmp **__result));
+#endif
+#ifndef _WCHAR_H
#include <wcsmbs/wchar.h>
/* Now define the internal interfaces. */
extern wchar_t *__wcpcpy __P ((wchar_t *__dest, __const wchar_t *__src));
extern wchar_t *__wcpncpy __P ((wchar_t *__dest, __const wchar_t *__src,
size_t __n));
+#endif
base = 8, cp++;
if (*cp == 'x' || *cp == 'X')
base = 16, cp++;
- while (c = *cp) {
+ while ((c = *cp)) {
if (isdigit(c)) {
val = (val * base) + (c - '0');
cp++;
_a > _b ? _a : _b; })
#endif
-#define ISDOT(a) (a[0] == '.' && (!a[1] || a[1] == '.' && !a[2]))
+#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2])))
#define ISSET(opt) (sp->fts_options & opt)
#define SET(opt) (sp->fts_options |= opt)
if (p->fts_info == FTS_D) {
/* If skipped or crossed mount point, do post-order visit. */
if (instr == FTS_SKIP ||
- ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev) {
+ (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) {
if (p->fts_flags & FTS_SYMFOLLOW)
(void)__close(p->fts_symfd);
if (sp->fts_child) {
/* Move to the next node on this level. */
next: tmp = p;
- if (p = p->fts_link) {
+ if ((p = p->fts_link)) {
free(tmp);
/*
/* Read the directory, attaching each entry to the `link' pointer. */
adjaddr = NULL;
- for (head = tail = NULL, nitems = 0; dp = __readdir(dirp);) {
+ head = tail = NULL;
+ nitems = 0;
+ while((dp = __readdir(dirp))) {
int namlen;
if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name))
p->fts_accpath = cur->fts_accpath;
} else if (nlinks == 0
#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE
- || nlinks > 0 &&
- dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN
+ || (nlinks > 0 &&
+ dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN)
#endif
) {
p->fts_accpath =
register FTSENT *p;
/* Free a linked list of structures. */
- while (p = head) {
+ while ((p = head)) {
head = head->fts_link;
free(p);
}
#ifndef __USE_FILE_OFFSET64
-# ifndef __USE_UNIX98
+# ifdef __USE_UNIX98
/* Seek to a certain position on STREAM. */
extern int fseeko __P ((FILE *__stream, __off_t __off, int __whence));
/* Return the current position of STREAM. */
extern __off_t ftello __P ((FILE *__stream));
-#endif
+# endif
/* Get STREAM's position. */
extern int fgetpos __P ((FILE *__restrict __stream,
extern int fsetpos __P ((FILE *__stream, __const fpos_t *__pos));
#else
# ifdef __REDIRECT
-# ifndef __USE_UNIX98
+# ifdef __USE_UNIX98
extern int __REDIRECT (fseeko,
__P ((FILE *__stream, __off64_t __off, int __whence)),
fseeko64);
extern int __REDIRECT (fsetpos, __P ((FILE *__stream, __const fpos_t *__pos)),
fsetpos64);
# else
-# ifndef __USE_UNIX98
+# ifdef __USE_UNIX98
# define fseeko fseeko64
# define ftello ftello64
# endif
#endif
#ifdef __USE_LARGEFILE64
-# ifndef __USE_UNIX98
+# ifdef __USE_UNIX98
extern int fseeko64 __P ((FILE *__stream, __off64_t __off, int __whence));
extern __off64_t ftello64 __P ((FILE *__stream));
# endif
+1998-09-06 10:56 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/pthread/semaphore.h: New file.
+
1998-09-06 09:08 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
--- /dev/null
+#include <linuxthreads/semaphore.h>
category_mask = (1 << LC_ALL) - 1;
/* Sanity check for CATEGORY argument. */
- if ((category_mask & ~(1 << LC_ALL) - 1) != 0)
+ if ((category_mask & ~((1 << LC_ALL) - 1)) != 0)
ERROR_RETURN;
/* `newlocale' does not support asking for the locale name. */
better if you make the source files indicate their own meaning in a
self-contained way.
+This system exists to allow the library to conform to multiple standards.
+Although the different standards are often described as supersets of each
+other, they are usually incompatible because larger standards require
+functions with names that smaller ones reserve to the user program. This
+is not mere pedantry --- it has been a problem in practice. For instance,
+some non-GNU programs define functions named @code{getline} that have
+nothing to do with this library's @code{getline}. They would not be
+compilable if all features were enabled indescriminantly.
+
+This should not be used to verify that a program conforms to a limited
+standard. It is insufficent for this purpose, as it will not protect you
+from including header files outside the standard, or relying on semantics
+undefined within the standard.
+
@comment (none)
@comment POSIX.1
@defvr Macro _POSIX_SOURCE
register struct ttyent *t;
setttyent();
- while (t = getttyent())
+ while ((t = getttyent()))
if (!strcmp(tty, t->ty_name))
break;
endttyent();
tty.ty_comment = p;
if (*p == 0)
tty.ty_comment = 0;
- if (p = index(p, '\n'))
+ if ((p = index(p, '\n')))
*p = '\0';
return (&tty);
}
if (tf) {
(void)rewind(tf);
return (1);
- } else if (tf = fopen(_PATH_TTYS, "r"))
+ } else if ((tf = fopen(_PATH_TTYS, "r")))
return (1);
return (0);
}
while ((p = strstr (rest, opt)) != NULL)
{
- if (p == rest || p[-1] == ',' &&
- (p[optlen] == '\0' ||
- p[optlen] == '=' ||
- p[optlen] == ','))
+ if (p == rest
+ || (p[-1] == ','
+ && (p[optlen] == '\0' ||
+ p[optlen] == '=' ||
+ p[optlen] == ',')))
return p;
rest = strchr (rest, ',');
setttyent();
for (cnt = 0; cnt < 3; ++cnt)
if (__ttyname_r (cnt, name, buflen) == 0) {
- if (p = rindex(name, '/'))
+ if ((p = rindex(name, '/')))
++p;
else
p = name;
- for (slot = 1; ttyp = getttyent(); ++slot)
+ for (slot = 1; (ttyp = getttyent()); ++slot)
if (!strcmp(ttyp->ty_name, p)) {
endttyent();
return(slot);
arg1 = cp;
++arg1;
*cp = '\0';
- if (*cp = '\0' || strlen (entry) == 0)
+ if (strlen (entry) == 0)
dbg_log (_("Parse error: %s"), line);
while (isspace (*arg1) && *arg1 != '\0')
++arg1;
lookup_actions action;
/* Grok ! before name to mean all statii but that one. */
- if (not = line[0] == '!')
+ not = line[0] == '!';
+ if (not)
++line;
/* Read status name. */
{ 0, "foo", "*$var*", 0, 1, { "*foo*", }, IFS },
{ 0, "o thr", "*$var*", 0, 2, { "two", "three" }, IFS },
+ /* Different IFS values */
+ { 0, NULL, "a b\tc\nd ", 0, 4, { "a", "b", "c", "d" }, NULL /* unset */ },
+ { 0, NULL, "a b\tc d ", 0, 1, { "a b\tc d " }, "" /* `null' */ },
+ { 0, NULL, "a,b c\n, d", 0, 3, { "a", "b c", " d" }, "\t\n," },
+
/* Other things that should succeed */
{ 0, NULL, "\\*\"|&;<>\"\\(\\)\\{\\}", 0, 1, { "*|&;<>(){}", }, IFS },
{ 0, "???", "$var", 0, 1, { "???", }, IFS },
{ 0, NULL, "", 0, 0, { NULL, }, IFS },
/* Things that should fail */
- { WRDE_BADCHAR, NULL, "new\nline", 0, 0, { NULL, }, IFS },
+ { WRDE_BADCHAR, NULL, "new\nline", 0, 0, { NULL, }, "" /* \n not IFS */ },
{ WRDE_BADCHAR, NULL, "pipe|symbol", 0, 0, { NULL, }, IFS },
{ WRDE_BADCHAR, NULL, "&ersand", 0, 0, { NULL, }, IFS },
{ WRDE_BADCHAR, NULL, "semi;colon", 0, 0, { NULL, }, IFS },
ifs = getenv ("IFS");
if (!ifs)
- /* NULL IFS means no field-splitting is to be performed */
- ifs = strcpy (ifs_white, "");
+ /* IFS unset - use <space><tab><newline>. */
+ ifs = strcpy (ifs_white, " \t\n");
else
{
char *ifsch = ifs;
for (words_offset = 0 ; words[words_offset] ; ++words_offset)
switch (words[words_offset])
{
- case '\n':
- case '|':
- case '&':
- case ';':
- case '<':
- case '>':
- case '(':
- case ')':
- case '{':
- case '}':
- /* Fail */
- wordfree (pwordexp);
- pwordexp->we_wordc = 0;
- pwordexp->we_wordv = old_wordv;
- return WRDE_BADCHAR;
-
case '\\':
error = parse_backslash (&word, &word_length, &max_length, words,
&words_offset);
/* Is it a field separator? */
if (strchr (ifs, words[words_offset]) == NULL)
{
+ /* Not a field separator -- but is it a valid word char? */
+ if (strchr ("\n|&;<>(){}", words[words_offset]))
+ {
+ /* Fail */
+ wordfree (pwordexp);
+ pwordexp->we_wordc = 0;
+ pwordexp->we_wordv = old_wordv;
+ return WRDE_BADCHAR;
+ }
+
/* "Ordinary" character -- add it to word */
word = w_addchar (word, &word_length, &max_length,
cp++;
host.h_name = cp;
q = host.h_aliases = host_aliases;
- if (cp = strpbrk(cp, " \t"))
+ if ((cp = strpbrk(cp, " \t")))
*cp++ = '\0';
while (cp && *cp) {
if (*cp == ' ' || *cp == '\t') {
}
if (q < &host_aliases[MAXALIASES - 1])
*q++ = cp;
- if (cp = strpbrk(cp, " \t"))
+ if ((cp = strpbrk(cp, " \t")))
*cp++ = '\0';
}
*q = NULL;
register char **cp;
_sethtent(0);
- while (p = _gethtent()) {
+ while ((p = _gethtent())) {
if (p->h_addrtype != af)
continue;
if (strcasecmp(p->h_name, name) == 0)
register struct hostent *p;
_sethtent(0);
- while (p = _gethtent())
+ while ((p = _gethtent()))
if (p->h_addrtype == af && !bcmp(p->h_addr, addr, len))
break;
_endhtent();
c = toupper(c);
if (isxdigit(c)) {
nib = xtob(c);
- if (c = *ascii++) {
+ if ((c = *ascii++)) {
c = toupper(c);
if (isxdigit(c)) {
*binary++ = (nib << 4) | xtob(c);
* Print answer records.
*/
sflag = (_res.pfcode & pflag);
- if (n = ntohs(cnt)) {
+ if ((n = ntohs(cnt))) {
if ((!_res.pfcode) ||
((sflag) && (_res.pfcode & RES_PRF_HEAD1)))
fprintf(file, hs);
/*
* Print question records.
*/
- if (n = ntohs(hp->qdcount)) {
+ if ((n = ntohs(hp->qdcount))) {
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_QUES))
fprintf(file, ";; QUESTIONS:\n");
while (--n >= 0) {
cp2 = cp1 + dlen;
while (cp < cp2) {
putc('"', file);
- if (n = (unsigned char) *cp++) {
+ if ((n = (unsigned char) *cp++)) {
for (c = n; c > 0 && cp < cp2; c--) {
if (strchr("\n\"\\", *cp))
(void) putc('\\', file);
if (BITS_PER_MP_LIMB % BITS != 0) \
{ \
work_lo |= ((work_hi \
- & ((1 << BITS - BITS_PER_MP_LIMB % BITS) \
+ & ((1 << (BITS - BITS_PER_MP_LIMB%BITS)) \
- 1)) \
<< BITS_PER_MP_LIMB % BITS); \
*--bp = digits[work_lo]; \
if ((wchar_t) c == decimal)
{
c = *++cp;
- while (c >= L_('0') && c <= L_('9') ||
+ while ((c >= L_('0') && c <= L_('9')) ||
(base == 16 && TOLOWER (c) >= L_('a') && TOLOWER (c) <= L_('f')))
{
if (c != L_('0') && lead_zero == -1)
c1 = *p1++;
c2 = *p2++;
/* Hint: '0' is a digit too. */
- state = S_N | (c1 == '0') + (isdigit (c1) != 0);
+ state = S_N | ((c1 == '0') + (isdigit (c1) != 0));
while ((diff = c1 - c2) == 0 && c1 != '\0')
{
state |= (c1 == '0') + (isdigit (c1) != 0);
}
- state = result_type[state << 2 | ((c2 == '0') + (isdigit (c2) != 0))];
+ state = result_type[state << 2 | (((c2 == '0') + (isdigit (c2) != 0)))];
switch (state)
{
maskp = (u_int32_t *) readfds->fds_bits;
for (sock = 0; sock < setsize; sock += 32)
{
- for (mask = *maskp++; bit = ffs (mask); mask ^= (1 << (bit - 1)))
+ for (mask = *maskp++; (bit = ffs (mask)); mask ^= (1 << (bit - 1)))
{
/* sock has input waiting */
xprt = xports[sock + bit - 1];
}
/* |x| in [22, log(maxdouble)] return half*exp(|x|) */
- if (ix < 0x40862E42) return half*__ieee754_exp(fabs(x));
+ if (ix < 0x40862e42) return half*__ieee754_exp(fabs(x));
/* |x| in [log(maxdouble), overflowthresold] */
GET_LOW_WORD(lx,x);
- if (ix<0x408633CE ||
- (ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d)) {
+ if (ix<0x408633ce || ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) {
w = __ieee754_exp(half*fabs(x));
t = half*w;
return t*w;
EXTRACT_WORDS (hx, lx, x);
- if ((hx & 0x7fffffff | lx) == 0)
+ if (((hx & 0x7fffffff) | lx) == 0)
/* Return value for x == 0 is NaN with invalid exception. */
return x / x;
if (hx < 0 && (u_int32_t) hx < 0xfff00000 && __rint (x) == x)
}
/* |x| in [22, log(maxdouble)] return 0.5*exp(|x|) */
- if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x));
+ if (ix < 0x40862e42) return h*__ieee754_exp(fabs(x));
/* |x| in [log(maxdouble), overflowthresold] */
GET_LOW_WORD(lx,x);
- if (ix<0x408633CE || (ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d)) {
+ if (ix<0x408633ce || ((ix==0x408633ce)&&(lx<=(u_int32_t)0x8fb9f87d))) {
w = __ieee754_exp(0.5*fabs(x));
t = h*w;
return t*w;
{
if (tp->name != NULL)
{
- if (rc = gaih_inet_serv (service->name, tp, &st))
+ if ((rc = gaih_inet_serv (service->name, tp, &st)))
return rc;
}
else
struct gaih_servtuple **pst = &st;
for (tp++; tp->name; tp++)
{
- if (rc = gaih_inet_serv (service->name, tp, pst))
+ if ((rc = gaih_inet_serv (service->name, tp, pst)))
{
if (rc & GAIH_OKIFUNSPEC)
continue;
if ((pg == NULL) || (pg->gaih != g->gaih))
{
pg = g;
- if (i = g->gaih (name, pservice, hints, end))
+ if ((i = g->gaih (name, pservice, hints, end)))
{
if ((hints->ai_family == AF_UNSPEC) && (i & GAIH_OKIFUNSPEC))
continue;
if (bytes == 0)
break;
- if (bytes == (size_t) -2 || bytes == (size_t) -1)
+ if (bytes == (size_t) -2)
+ {
+ len += strlen (f + len);
+ break;
+ }
+
+ if (bytes == (size_t) -1)
{
len++;
break;
while (! mbsinit (&mbstate));
cpy (len, f);
+ f += len - 1;
continue;
}
}