/* Return the full pathname of the current executable, based on the earlier
call to set_program_name_and_installdir. Return NULL if unknown. */
char *
-get_full_program_name ()
+get_full_program_name (void)
{
return executable_fullname;
}
never made it. Nevertheless the POSIX.9 standard (POSIX bindings
for Fortran 77) requires this function. */
int
-clearenv ()
+clearenv (void)
{
LOCK;
/* Specification. */
#include "stpncpy.h"
-#ifdef _LIBC
-# include <string.h>
-#else
-# include <sys/types.h>
-#endif
-
#ifndef weak_alias
# define __stpncpy stpncpy
#endif
-/* Copyright (C) 1991, 1996, 1997, 1998, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003 Free Software
+ Foundation, Inc.
+
This file is part of the GNU C Library.
This program is free software; you can redistribute it and/or modify
#include <config.h>
#endif
-#if defined _LIBC || defined STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-char *malloc ();
-char *memcpy ();
-#endif
+#include <stdlib.h>
+#include <string.h>
#undef __strdup
#undef strdup
-/* Copyright (C) 1991, 1992, 1997, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1997, 1999, 2003 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 <math.h>
-#if HAVE_FLOAT_H
-# include <float.h>
-#else
-# define DBL_MAX 1.7976931348623159e+308
-# define DBL_MIN 2.2250738585072010e-308
-#endif
-
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <string.h>
-#else
-# define NULL 0
-# ifndef HUGE_VAL
-# define HUGE_VAL HUGE
-# endif
-#endif
+#include <float.h>
+#include <stdlib.h>
+#include <string.h>
/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the
character after the last one used in the number is put in *ENDPTR. */
# include <stdint.h>
#endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
#ifdef UNSIGNED
-# ifndef HAVE_DECL_STRTOUL
-"this configure-time declaration test was not run"
-# endif
-# if !HAVE_DECL_STRTOUL
-unsigned long strtoul (char const *, char **, int);
-# endif
# ifndef HAVE_DECL_STRTOULL
"this configure-time declaration test was not run"
# endif
#else
-# ifndef HAVE_DECL_STRTOL
-"this configure-time declaration test was not run"
-# endif
-# if !HAVE_DECL_STRTOL
-long strtol (char const *, char **, int);
-# endif
# ifndef HAVE_DECL_STRTOLL
"this configure-time declaration test was not run"
# endif
/* Convert string representation of a number into an integer value.
- Copyright (C) 1991, 92, 94, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+
+ Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2003
+ Free Software Foundation, Inc.
+
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@gnu.org.
#ifdef _LIBC
# define USE_NUMBER_GROUPING
-# define STDC_HEADERS
-# define HAVE_LIMITS_H
#endif
#include <ctype.h>
# define __set_errno(Val) errno = (Val)
#endif
-#ifdef HAVE_LIMITS_H
-# include <limits.h>
-#endif
-
-#ifdef STDC_HEADERS
-# include <stddef.h>
-# include <stdlib.h>
-# include <string.h>
-#else
-# ifndef NULL
-# define NULL 0
-# endif
-#endif
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef USE_NUMBER_GROUPING
# include "../locale/localeinfo.h"
# endif
#else
# define LONG long
-
-# ifndef ULONG_MAX
-# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
-# endif
-# ifndef LONG_MAX
-# define LONG_MAX ((long int) (ULONG_MAX >> 1))
-# endif
# define STRTOL_LONG_MIN LONG_MIN
# define STRTOL_LONG_MAX LONG_MAX
# define STRTOL_ULONG_MAX ULONG_MAX
# define _NL_CURRENT(category, item) \
(current->values[_NL_ITEM_INDEX (item)].string)
# define LOCALE_PARAM , loc
-# define LOCALE_PARAM_DECL __locale_t loc;
+# define LOCALE_PARAM_DECL , __locale_t loc
#else
# define LOCALE_PARAM
# define LOCALE_PARAM_DECL
# endif
#endif
-/* For compilers which are ansi but don't define __STDC__, like SGI
- Irix-4.0.5 cc, also check whether PROTOTYPES is defined. */
-#if defined (__STDC__) || defined (PROTOTYPES)
-# define INTERNAL(X) INTERNAL1(X)
-# define INTERNAL1(X) __##X##_internal
-# define WEAKNAME(X) WEAKNAME1(X)
-#else
-# define INTERNAL(X) __/**/X/**/_internal
-#endif
+#define INTERNAL(X) INTERNAL1(X)
+#define INTERNAL1(X) __##X##_internal
+#define WEAKNAME(X) WEAKNAME1(X)
#ifdef USE_NUMBER_GROUPING
/* This file defines a function to check for correct grouping. */
one converted is stored in *ENDPTR. */
INT
-INTERNAL (strtol) (nptr, endptr, base, group LOCALE_PARAM)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int base;
- int group;
- LOCALE_PARAM_DECL
+INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base, int group LOCALE_PARAM_DECL)
{
int negative;
register unsigned LONG int cutoff;
\f
/* External user entry point. */
-#if _LIBC - 0 == 0
-# undef PARAMS
-# if defined (__STDC__) && __STDC__
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
-# endif
-
-/* Prototype. */
-INT strtol PARAMS ((const STRING_TYPE *nptr, STRING_TYPE **endptr, int base));
-#endif
-
INT
#ifdef weak_function
weak_function
#endif
-strtol (nptr, endptr, base LOCALE_PARAM)
- const STRING_TYPE *nptr;
- STRING_TYPE **endptr;
- int base;
- LOCALE_PARAM_DECL
+strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base LOCALE_PARAM_DECL)
{
return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
}
#endif
#include <stddef.h>
-
-#if STDC_HEADERS || _LIBC
-# include <string.h>
-#endif
-
#include <stdlib.h>
+#include <string.h>
#if HAVE_FCNTL_H || _LIBC
# include <fcntl.h>
#endif
#include <limits.h>
-
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
#if HAVE_UNISTD_H
# include <unistd.h>
If malloc fails, exit.
Upon any other failure, return NULL. */
char *
-xgethostname ()
+xgethostname (void)
{
char *hostname;
size_t size;
# include <config.h>
#endif
-#include <sys/types.h>
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-void *calloc ();
-void *malloc ();
-void *realloc ();
-void free ();
-#endif
+#include "xalloc.h"
+
+#include <stdlib.h>
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "error.h"
#include "exitfail.h"
-#include "xalloc.h"
#ifndef EXIT_FAILURE
# define EXIT_FAILURE 1
/* xstrtod.c - error-checking interface to strtod
- Copyright (C) 1996, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2000, 2003 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 <config.h>
#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#else
-double strtod ();
-#endif
+#include "xstrtod.h"
#include <errno.h>
-#include <stdio.h>
#include <limits.h>
-#include "xstrtod.h"
+#include <stdio.h>
+#include <stdlib.h>
/* Tell the compiler that non-default rounding modes are used. */
#if 199901 <= __STDC_VERSION__
non-zero and don't modify *RESULT upon any failure. */
int
-xstrtod (str, ptr, result)
- const char *str;
- const char **ptr;
- double *result;
+xstrtod (char const *str, char const **ptr, double *result)
{
double val;
char *terminator;
need stderr defined if assertion checking is enabled. */
#include <stdio.h>
-#if STDC_HEADERS
-# include <stdlib.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef strchr
-# define strchr index
-# endif
-#endif
-
#include <assert.h>
#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
#include <errno.h>
#ifndef errno
#include "xstrtol.h"
-#if !HAVE_DECL_STRTOL && !defined strtol
-long int strtol ();
-#endif
-
-#if !HAVE_DECL_STRTOUL && !defined strtoul
-unsigned long int strtoul ();
-#endif
-
#if !HAVE_DECL_STRTOIMAX && !defined strtoimax
intmax_t strtoimax ();
#endif
char *program_name;
int
-main (int argc, char** argv)
+main (int argc, char **argv)
{
strtol_error s_err;
int i;
# Prerequisites of lib/tempname.c.
AC_DEFUN([jm_PREREQ_TEMPNAME],
[
- AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_HEADER_STAT])
AC_CHECK_HEADERS_ONCE(fcntl.h sys/time.h unistd.h)
AC_CHECK_HEADERS(stdint.h)
-# strdup.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# strdup.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
# Prerequisites of lib/strdup.c.
AC_DEFUN([gl_PREREQ_STRDUP], [
- AC_REQUIRE([AC_HEADER_STDC])
:
])
-# strtod.m4 serial 2
+# strtod.m4 serial 3
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
# The need for pow() is already handled by AC_FUNC_STRTOD.
AC_DEFUN([gl_PREREQ_STRTOD], [
AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS(float.h)
AC_CHECK_FUNCS_ONCE(isascii)
])
-# strtoimax.m4 serial 2
+# strtoimax.m4 serial 3
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
# Prerequisites of lib/strtoimax.c.
AC_DEFUN([gl_PREREQ_STRTOIMAX], [
jm_AC_TYPE_INTMAX_T
- AC_CHECK_HEADERS_ONCE(stdlib.h)
- AC_CHECK_DECLS_ONCE(strtol)
AC_CHECK_DECLS(strtoll)
AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
])
-# strtol.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# strtol.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
# Prerequisites of lib/strtol.c.
AC_DEFUN([gl_PREREQ_STRTOL], [
AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(limits.h)
AC_CHECK_FUNCS_ONCE(isascii)
])
-# userspec.m4 serial 2
+# userspec.m4 serial 3
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
AC_DEFUN([gl_USERSPEC],
[
dnl Prerequisites of lib/userspec.c.
- AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_CHECK_HEADERS_ONCE(string.h sys/param.h unistd.h)
+ AC_CHECK_HEADERS_ONCE(sys/param.h unistd.h)
])
-# xalloc.m4 serial 2
+# xalloc.m4 serial 3
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
# Prerequisites of lib/xmalloc.c.
AC_DEFUN([gl_PREREQ_XMALLOC], [
- AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([jm_FUNC_MALLOC])
AC_REQUIRE([jm_FUNC_REALLOC])
])
-# xstrtod.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# xstrtod.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
# Prerequisites of lib/xstrtod.c.
AC_DEFUN([gl_XSTRTOD],
[
- AC_REQUIRE([AC_HEADER_STDC])
+ :
])
-# xstrtol.m4 serial 2
+# xstrtol.m4 serial 3
dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
[
AC_REQUIRE([gl_PREREQ_XSTRTOL_H])
AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(string.h)
AC_CHECK_FUNCS_ONCE(isascii)
- AC_CHECK_DECLS_ONCE(strtol strtoul)
AC_CHECK_DECLS([strtoimax, strtoumax])
])