* lib/readtokens.c (STREQ): Remove unused definition.
* lib/xmalloc.c (SIZE_MAX): Likewise.
* lib/openat-die.c (N_): Likewise.
* lib/mountlist.c (SIZE_MAX): Remove definition.
Instead, include <stdint.h>.
* lib/readutmp.c: Likewise.
* modules/readutmp (Depends-on): Add stdint.
* modules/mountlist (Depends-on): Add stdint.
* lib/userspec.c (ISDIGIT): Move definition into #if block where used.
+2009-03-12 Jim Meyering <meyering@redhat.com>
+
+ avoid gcc warnings about unused macro definitions
+ * lib/readtokens.c (STREQ): Remove unused definition.
+ * lib/xmalloc.c (SIZE_MAX): Likewise.
+ * lib/openat-die.c (N_): Likewise.
+ * lib/mountlist.c (SIZE_MAX): Remove definition.
+ Instead, include <stdint.h>.
+ * lib/readutmp.c: Likewise.
+ * modules/readutmp (Depends-on): Add stdint.
+ * modules/mountlist (Depends-on): Add stdint.
+ * lib/userspec.c (ISDIGIT): Move definition into #if block where used.
+
2009-03-10 Bruno Haible <bruno@clisp.org>
Tests for module 'mbmemcasecoll'.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <stdint.h>
#include "xalloc.h"
# include "unlocked-io.h"
#endif
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
/* The results of open() in this file are not used with fchdir,
therefore save some unnecessary work in fchdir.c. */
#undef open
/* Report a save- or restore-cwd failure in our openat replacement and then exit.
- Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008-2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "gettext.h"
#define _(msgid) gettext (msgid)
-#define N_(msgid) msgid
void
openat_save_fail (int errnum)
/* readtokens.c -- Functions for reading tokens from an input stream.
- Copyright (C) 1990-1991, 1999-2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1990-1991, 1999-2004, 2006, 2009 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
# include "unlocked-io.h"
#endif
-#define STREQ(a,b) ((a) == (b) || ((a) && (b) && *(a) == *(b) \
- && strcmp(a, b) == 0))
-
/* Initialize a tokenbuffer. */
void
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
+#include <stdint.h>
#include "xalloc.h"
# include "unlocked-io.h"
#endif
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
/* Copy UT->ut_name into storage obtained from malloc. Then remove any
trailing spaces from the copy, NUL terminate it, and return the copy. */
# define MAXGID GID_T_MAX
#endif
+#ifdef __DJGPP__
+
/* ISDIGIT differs from isdigit, as follows:
- Its arg may be any int or unsigned int; it need not be an unsigned char
or EOF.
of `digit' even when the host does not conform to POSIX. */
#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
-#ifdef __DJGPP__
-
/* Return true if STR represents an unsigned decimal integer. */
static bool
/* xmalloc.c -- malloc with out of memory checking
Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2008 Free Software Foundation,
+ 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2008-2009 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
#include <stdlib.h>
#include <string.h>
-#ifndef SIZE_MAX
-# define SIZE_MAX ((size_t) -1)
-#endif
-
/* 1 if calloc is known to be compatible with GNU calloc. This
matters if we are not also using the calloc module, which defines
HAVE_CALLOC and supports the GNU API even on non-GNU platforms. */
Depends-on:
stdbool
+stdint
xalloc
configure.ac:
extensions
xalloc
stdbool
+stdint
configure.ac:
gl_READUTMP