summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-12-21 11:22:51 +0000
committerJim Meyering <jim@meyering.net>1997-12-21 11:22:51 +0000
commit727298f3f5174a6bf60e3d261cf37a6176584a07 (patch)
treee4c235d3a9c450bdf8dabafb811687dcca330be8 /lib
parent27d24b46ad376fc3bcdadaedfaf086d977584e7d (diff)
downloadcoreutils-727298f3f5174a6bf60e3d261cf37a6176584a07.tar.xz
Use PARAMS, not __P.
Diffstat (limited to 'lib')
-rw-r--r--lib/fsusage.h26
-rw-r--r--lib/getline.h8
-rw-r--r--lib/hash.h16
-rw-r--r--lib/human.h14
-rw-r--r--lib/long-options.h13
-rw-r--r--lib/makepath.h25
-rw-r--r--lib/modechange.h45
-rw-r--r--lib/path-concat.h20
-rw-r--r--lib/save-cwd.c2
-rw-r--r--lib/save-cwd.h20
-rw-r--r--lib/savedir.h20
-rw-r--r--lib/strverscmp.h6
-rw-r--r--lib/xalloc.h11
-rw-r--r--lib/xstrtol.h17
14 files changed, 135 insertions, 108 deletions
diff --git a/lib/fsusage.h b/lib/fsusage.h
index d71dc1243..ef90617fc 100644
--- a/lib/fsusage.h
+++ b/lib/fsusage.h
@@ -1,5 +1,5 @@
/* fsusage.h -- declarations for filesystem space usage info
- Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997 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
@@ -16,6 +16,10 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Space usage statistics for a filesystem. Blocks are 512-byte. */
+
+#if !defined FSUSAGE_H_
+# define FSUSAGE_H_
+
struct fs_usage
{
int fsu_blocksize; /* Size of a block. */
@@ -26,13 +30,15 @@ struct fs_usage
uintmax_t fsu_ffree; /* Free file nodes. */
};
-#ifndef __P
-#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
-#define __P(args) args
-#else
-#define __P(args) ()
-#endif /* GCC. */
-#endif /* Not __P. */
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+# endif
+
+int get_fs_usage PARAMS ((const char *path, const char *disk,
+ struct fs_usage *fsp));
-int get_fs_usage __P ((const char *path, const char *disk,
- struct fs_usage *fsp));
+#endif
diff --git a/lib/getline.h b/lib/getline.h
index cc6466d72..8dee0f455 100644
--- a/lib/getline.h
+++ b/lib/getline.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997 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
@@ -20,10 +20,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# include <stdio.h>
# ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
-# define PARAMS(args) args
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
# else
-# define PARAMS(args) ()
+# define PARAMS(Args) ()
# endif
# endif
diff --git a/lib/hash.h b/lib/hash.h
index ddf4add25..1dbce5c2c 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -5,14 +5,6 @@
# include <config.h>
# endif
-# ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-# endif
-
# include <stdio.h>
# include <assert.h>
@@ -28,6 +20,14 @@ void free ();
char *malloc ();
# endif
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+# endif
+
# define USE_OBSTACK
# ifdef USE_OBSTACK
# include "obstack.h"
diff --git a/lib/human.h b/lib/human.h
index b91958bec..66bedcce9 100644
--- a/lib/human.h
+++ b/lib/human.h
@@ -7,14 +7,14 @@
# define LONGEST_HUMAN_READABLE ((sizeof (uintmax_t) + sizeof (int)) \
* CHAR_BIT / 3)
-# ifndef __P
-# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
-# define __P(args) args
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
# else
-# define __P(args) ()
-# endif /* GCC. */
-# endif /* Not __P. */
+# define PARAMS(Args) ()
+# endif
+# endif
-char *human_readable __P ((uintmax_t, char *, int, int, int));
+char *human_readable PARAMS ((uintmax_t, char *, int, int, int));
#endif /* HUMAN_H_ */
diff --git a/lib/long-options.h b/lib/long-options.h
index 4cb069376..219b00f49 100644
--- a/lib/long-options.h
+++ b/lib/long-options.h
@@ -1,5 +1,5 @@
/* long-options.h -- declaration for --help- and --version-handling function.
- Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1994, 1997 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
@@ -17,11 +17,12 @@
/* Written by Jim Meyering. */
-#undef PARAMS
-#if defined (__STDC__) && __STDC__
-# define PARAMS(Args) Args
-#else
-# define PARAMS(Args) ()
+#ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
#endif
void
diff --git a/lib/makepath.h b/lib/makepath.h
index e62f54433..f7c5b6026 100644
--- a/lib/makepath.h
+++ b/lib/makepath.h
@@ -1,15 +1,16 @@
-# undef __P
-#if __STDC__
-# define __P(Args) Args
-#else
-# define __P(Args) ()
+#ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
#endif
int
-make_path __P ((const char *_argpath,
- int _mode,
- int _parent_mode,
- uid_t _owner,
- gid_t _group,
- int _preserve_existing,
- const char *_verbose_fmt_string));
+make_path PARAMS ((const char *_argpath,
+ int _mode,
+ int _parent_mode,
+ uid_t _owner,
+ gid_t _group,
+ int _preserve_existing,
+ const char *_verbose_fmt_string));
diff --git a/lib/modechange.h b/lib/modechange.h
index dc3b7854d..c10ab91b0 100644
--- a/lib/modechange.h
+++ b/lib/modechange.h
@@ -17,14 +17,17 @@
/* Masks for the `flags' field in a `struct mode_change'. */
+#if ! defined MODECHANGE_H_
+# define MODECHANGE_H_
+
/* Affect the execute bits only if at least one execute bit is set already,
or if the file is a directory. */
-#define MODE_X_IF_ANY_X 01
+# define MODE_X_IF_ANY_X 01
/* If set, copy some existing permissions for u, g, or o onto the other two.
Which of u, g, or o is copied is determined by which bits are set in the
`value' field. */
-#define MODE_COPY_EXISTING 02
+# define MODE_COPY_EXISTING 02
struct mode_change
{
@@ -36,25 +39,27 @@ struct mode_change
};
/* Masks for mode_compile argument. */
-#define MODE_MASK_EQUALS 1
-#define MODE_MASK_PLUS 2
-#define MODE_MASK_MINUS 4
-#define MODE_MASK_ALL (MODE_MASK_EQUALS | MODE_MASK_PLUS | MODE_MASK_MINUS)
+# define MODE_MASK_EQUALS 1
+# define MODE_MASK_PLUS 2
+# define MODE_MASK_MINUS 4
+# define MODE_MASK_ALL (MODE_MASK_EQUALS | MODE_MASK_PLUS | MODE_MASK_MINUS)
/* Error return values for mode_compile. */
-#define MODE_INVALID (struct mode_change *) 0
-#define MODE_MEMORY_EXHAUSTED (struct mode_change *) 1
-#define MODE_BAD_REFERENCE (struct mode_change *) 2
-
-#ifndef __P
-# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
-# define __P(Args) Args
-# else
-# define __P(Args) ()
+# define MODE_INVALID (struct mode_change *) 0
+# define MODE_MEMORY_EXHAUSTED (struct mode_change *) 1
+# define MODE_BAD_REFERENCE (struct mode_change *) 2
+
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
# endif
-#endif
-struct mode_change *mode_compile __P ((const char *, unsigned));
-struct mode_change *mode_create_from_ref __P ((const char *));
-unsigned short mode_adjust __P ((unsigned, const struct mode_change *));
-void mode_free __P ((struct mode_change *));
+struct mode_change *mode_compile PARAMS ((const char *, unsigned));
+struct mode_change *mode_create_from_ref PARAMS ((const char *));
+unsigned short mode_adjust PARAMS ((unsigned, const struct mode_change *));
+void mode_free PARAMS ((struct mode_change *));
+
+#endif
diff --git a/lib/path-concat.h b/lib/path-concat.h
index 92c0a1180..8e2c22883 100644
--- a/lib/path-concat.h
+++ b/lib/path-concat.h
@@ -1,9 +1,15 @@
-#if __STDC__
-# undef __P
-# define __P(args) args
-#else
-# define __P(args) ()
-#endif
+#if ! defined PATH_CONCAT_H_
+# define PATH_CONCAT_H_
+
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+# endif
char *
-path_concat __P ((const char *dir, const char *base, char **base_in_result));
+path_concat PARAMS ((const char *dir, const char *base, char **base_in_result));
+
+#endif
diff --git a/lib/save-cwd.c b/lib/save-cwd.c
index 292bb6809..31b46ce48 100644
--- a/lib/save-cwd.c
+++ b/lib/save-cwd.c
@@ -45,7 +45,7 @@ extern int errno;
#include "save-cwd.h"
#include "error.h"
-char *xgetcwd __P((void));
+char *xgetcwd PARAMS ((void));
/* Record the location of the current working directory in CWD so that
the program may change to other directories and later use restore_cwd
diff --git a/lib/save-cwd.h b/lib/save-cwd.h
index fbd3994f9..27b2cef80 100644
--- a/lib/save-cwd.h
+++ b/lib/save-cwd.h
@@ -7,17 +7,17 @@ struct saved_cwd
char *name;
};
-# ifndef __P
-# if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
-# define __P(args) args
+# ifndef PARAMS
+# if __STDC__
+# define PARAMS(Args) Args
# else
-# define __P(args) ()
-# endif /* GCC. */
-# endif /* Not __P. */
+# define PARAMS(Args) ()
+# endif
+# endif
-int save_cwd __P((struct saved_cwd *cwd));
-int restore_cwd __P((const struct saved_cwd *cwd, const char *dest,
- const char *from));
-void free_cwd __P((struct saved_cwd *cwd));
+int save_cwd PARAMS ((struct saved_cwd *cwd));
+int restore_cwd PARAMS ((const struct saved_cwd *cwd, const char *dest,
+ const char *from));
+void free_cwd PARAMS ((struct saved_cwd *cwd));
#endif /* SAVE_CWD_H */
diff --git a/lib/savedir.h b/lib/savedir.h
index 0513974d7..033e56752 100644
--- a/lib/savedir.h
+++ b/lib/savedir.h
@@ -1,9 +1,15 @@
-#undef __P
-#if defined (__STDC__) && __STDC__
-# define __P(x) x
-#else
-# define __P(x) ()
-#endif
+#if !defined SAVEDIR_H_
+# define SAVEDIR_H_
+
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+# endif
char *
-savedir __P((const char *dir, unsigned int name_size));
+savedir PARAMS ((const char *dir, unsigned int name_size));
+
+#endif
diff --git a/lib/strverscmp.h b/lib/strverscmp.h
index 02af6cb6f..bb1ea1b0a 100644
--- a/lib/strverscmp.h
+++ b/lib/strverscmp.h
@@ -8,10 +8,10 @@
# endif
# ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
-# define PARAMS(args) args
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
# else
-# define PARAMS(args) ()
+# define PARAMS(Args) ()
# endif
# endif
diff --git a/lib/xalloc.h b/lib/xalloc.h
index a66226dd3..3f8d77925 100644
--- a/lib/xalloc.h
+++ b/lib/xalloc.h
@@ -1,8 +1,9 @@
-#undef PARAMS
-#if defined (__STDC__) && __STDC__
-# define PARAMS(Args) Args
-#else
-# define PARAMS(Args) ()
+#ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
#endif
/* Exit value when the requested amount of memory is not available.
diff --git a/lib/xstrtol.h b/lib/xstrtol.h
index 5f351a7ba..3c16c7e01 100644
--- a/lib/xstrtol.h
+++ b/lib/xstrtol.h
@@ -13,26 +13,27 @@
# define __ZLONG_MAX LONG_MAX
# endif
-# undef PARAMS
-# if defined (__STDC__) && __STDC__
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
+# ifndef PARAMS
+# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
# endif
-#ifndef _STRTOL_ERROR
+# ifndef _STRTOL_ERROR
enum strtol_error
{
LONGINT_OK, LONGINT_INVALID, LONGINT_INVALID_SUFFIX_CHAR, LONGINT_OVERFLOW
};
typedef enum strtol_error strtol_error;
-#endif
+# endif
strtol_error
__xstrtol PARAMS ((const char *s, char **ptr, int base,
__unsigned long int *val, const char *valid_suffixes));
-#undef _STRTOL_ERROR
+# undef _STRTOL_ERROR
# define _STRTOL_ERROR(Exit_code, Str, Argument_type_string, Err) \
do \
{ \