aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/err.h6
-rw-r--r--misc/fstab.c1
-rw-r--r--misc/getttyent.c5
-rw-r--r--misc/regexp.h7
-rw-r--r--misc/sys/cdefs.h68
-rw-r--r--misc/sys/file.h18
-rw-r--r--misc/syslog.c3
-rw-r--r--misc/tsearch.c2
8 files changed, 59 insertions, 51 deletions
diff --git a/misc/err.h b/misc/err.h
index fa971ca..643e96f 100644
--- a/misc/err.h
+++ b/misc/err.h
@@ -1,5 +1,5 @@
-/* err.h -- 4.4BSD utility functions for error messages.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+/* 4.4BSD utility functions for error messages.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@
#define __need___va_list
#include <stdarg.h>
#ifndef __GNUC_VA_LIST
-#define __gnuc_va_list __ptr_t
+# define __gnuc_va_list __ptr_t
#endif
__BEGIN_DECLS
diff --git a/misc/fstab.c b/misc/fstab.c
index 7f68cb1..8b87a1f 100644
--- a/misc/fstab.c
+++ b/misc/fstab.c
@@ -47,6 +47,7 @@ setfsent (void)
}
static struct fstab *
+internal_function
mnt2fs (struct mntent *m)
{
static struct fstab f;
diff --git a/misc/getttyent.c b/misc/getttyent.c
index 777108f..6743ac5 100644
--- a/misc/getttyent.c
+++ b/misc/getttyent.c
@@ -57,7 +57,8 @@ getttynam(tty)
return (t);
}
-static char *skip __P((char *)), *value __P((char *));
+static char *skip __P((char *)) internal_function;
+static char *value __P((char *)) internal_function;
struct ttyent *
getttyent()
@@ -133,6 +134,7 @@ getttyent()
* the next field.
*/
static char *
+internal_function
skip(p)
register char *p;
{
@@ -167,6 +169,7 @@ skip(p)
}
static char *
+internal_function
value(p)
register char *p;
{
diff --git a/misc/regexp.h b/misc/regexp.h
index 04da70a..3840013 100644
--- a/misc/regexp.h
+++ b/misc/regexp.h
@@ -28,6 +28,7 @@
included only for compatibility reasons. Use the POSIX definition
in <regex.h> for portable applications and a reasonable interface. */
+#include <features.h>
#include <alloca.h>
#include <regex.h>
#include <stdlib.h>
@@ -110,13 +111,13 @@ compile (char *__instring, char *__expbuf, __const char *__endbuf, int __eof)
of type `regex_t'. Then check for minimum size of the buffer for
the compiled regular expression. */
regex_t *__expr_ptr;
-#if defined __GNUC__ && __GNUC__ >= 2
+# if defined __GNUC__ && __GNUC__ >= 2
const size_t __req = __alignof__ (regex_t *);
-#else
+# else
/* How shall we find out? We simply guess it and can change it is
this really proofs to be wrong. */
const size_t __req = 8;
-#endif
+# endif
__expbuf += __req;
__expbuf -= (__expbuf - ((char *) 0)) % __req;
if (__endbuf < __expbuf + sizeof (regex_t))
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 602779e..5f40a0a 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -26,61 +26,61 @@
#ifdef __GNUC__
-#define __P(args) args /* GCC can always grok prototypes. */
-#define __DOTS , ...
+# define __P(args) args /* GCC can always grok prototypes. */
+# define __DOTS , ...
#else /* Not GCC. */
-#define __inline /* No inline functions. */
+# define __inline /* No inline functions. */
-#if (defined (__STDC__) && __STDC__) || defined (__cplusplus)
+# if (defined __STDC__ && __STDC__) || defined __cplusplus
-#define __P(args) args
-#define __const const
-#define __signed signed
-#define __volatile volatile
-#define __DOTS , ...
+# define __P(args) args
+# define __const const
+# define __signed signed
+# define __volatile volatile
+# define __DOTS , ...
-#else /* Not ANSI C or C++. */
+# else /* Not ANSI C or C++. */
-#define __P(args) () /* No prototypes. */
-#define __const /* No ANSI C keywords. */
-#define __signed
-#define __volatile
-#define __DOTS
+# define __P(args) () /* No prototypes. */
+# define __const /* No ANSI C keywords. */
+# define __signed
+# define __volatile
+# define __DOTS
-#endif /* ANSI C or C++. */
+# endif /* ANSI C or C++. */
#endif /* GCC. */
/* For these things, GCC behaves the ANSI way normally,
and the non-ANSI way under -traditional. */
-#if defined (__STDC__) && __STDC__
+#if defined __STDC__ && __STDC__
-#define __CONCAT(x,y) x ## y
-#define __STRING(x) #x
+# define __CONCAT(x,y) x ## y
+# define __STRING(x) #x
/* This is not a typedef so `const __ptr_t' does the right thing. */
-#define __ptr_t void *
-#define __long_double_t long double
+# define __ptr_t void *
+# define __long_double_t long double
#else
-#define __CONCAT(x,y) x/**/y
-#define __STRING(x) "x"
+# define __CONCAT(x,y) x/**/y
+# define __STRING(x) "x"
-#define __ptr_t char *
-#define __long_double_t long double
+# define __ptr_t char *
+# define __long_double_t long double
/* The BSD header files use the ANSI keywords unmodified (this means that
old programs may lose if they use the new keywords as identifiers), but
those names are not available under -traditional. We define them to
their __ versions, which are taken care of above. */
#ifdef __USE_BSD
-#define const __const
-#define signed __signed
-#define volatile __volatile
+# define const __const
+# define signed __signed
+# define volatile __volatile
#endif
#endif /* __STDC__ */
@@ -88,18 +88,18 @@
/* C++ needs to know that types and declarations are C, not C++. */
#ifdef __cplusplus
-#define __BEGIN_DECLS extern "C" {
-#define __END_DECLS }
+# define __BEGIN_DECLS extern "C" {
+# define __END_DECLS }
#else
-#define __BEGIN_DECLS
-#define __END_DECLS
+# define __BEGIN_DECLS
+# define __END_DECLS
#endif
/* GCC2 has various useful declarations that can be made with the
`__attribute__' syntax. All of the ways we use this do fine if
they are omitted for compilers that don't understand it. */
-#if !defined (__GNUC__) || __GNUC__ < 2
-#define __attribute__(xyz) /* Ignore. */
+#if !defined __GNUC__ || __GNUC__ < 2
+# define __attribute__(xyz) /* Ignore. */
#endif
diff --git a/misc/sys/file.h b/misc/sys/file.h
index 9f946fb..0228593 100644
--- a/misc/sys/file.h
+++ b/misc/sys/file.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
#include <features.h>
#ifndef _FCNTL_H
-#include <fcntl.h>
+# include <fcntl.h>
#endif
__BEGIN_DECLS
@@ -31,19 +31,19 @@ __BEGIN_DECLS
/* Alternate names for values for the WHENCE argument to `lseek'.
These are the same as SEEK_SET, SEEK_CUR, and SEEK_END, respectively. */
#ifndef L_SET
-#define L_SET 0 /* Seek from beginning of file. */
-#define L_INCR 1 /* Seek from current position. */
-#define L_XTND 2 /* Seek from end of file. */
+# define L_SET 0 /* Seek from beginning of file. */
+# define L_INCR 1 /* Seek from current position. */
+# define L_XTND 2 /* Seek from end of file. */
#endif
/* Operations for the `flock' call. */
-#define LOCK_SH 1 /* Shared lock. */
-#define LOCK_EX 2 /* Exclusive lock. */
-#define LOCK_UN 8 /* Unlock. */
+#define LOCK_SH 1 /* Shared lock. */
+#define LOCK_EX 2 /* Exclusive lock. */
+#define LOCK_UN 8 /* Unlock. */
/* Can be OR'd in to one of the above. */
-#define LOCK_NB 4 /* Don't block when locking. */
+#define LOCK_NB 4 /* Don't block when locking. */
/* Apply or remove an advisory lock, according to OPERATION,
diff --git a/misc/syslog.c b/misc/syslog.c
index acb1b69..7aa29da 100644
--- a/misc/syslog.c
+++ b/misc/syslog.c
@@ -70,7 +70,7 @@ extern char *__progname; /* Program name, from crt0. */
/* Define the lock. */
__libc_lock_define_initialized (static, syslog_lock)
-static void openlog_internal(const char *, int, int);
+static void openlog_internal(const char *, int, int) internal_function;
static void closelog_internal(void);
static void sigpipe_handler (int);
#ifdef _LIBC_REENTRANT
@@ -230,6 +230,7 @@ vsyslog(pri, fmt, ap)
static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */
static void
+internal_function
openlog_internal(const char *ident, int logstat, int logfac)
{
if (ident != NULL)
diff --git a/misc/tsearch.c b/misc/tsearch.c
index e372a9e..c5af3ec 100644
--- a/misc/tsearch.c
+++ b/misc/tsearch.c
@@ -593,6 +593,7 @@ weak_alias (__tdelete, tdelete)
ROOT is the root of the tree to be walked, ACTION the function to be
called at each node. LEVEL is the level of ROOT in the whole tree. */
static void
+internal_function
trecurse (const void *vroot, __action_fn_t action, int level)
{
node root = (node ) vroot;
@@ -632,6 +633,7 @@ weak_alias (__twalk, twalk)
/* The standardized functions miss an important functionality: the
tree cannot be removed easily. We provide a function to do this. */
static void
+internal_function
tdestroy_recurse (node root, __free_fn_t freefct)
{
if (root->left != NULL)