#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
# include <unistd.h>
#endif
# define _(Text) Text
#endif
-#ifdef HAVE_STDLIB_H
+#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifndef EXIT_FAILURE
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
/* Written by David MacKenzie and Torbjorn Granlund.
Adapted for GNU C library by Roland McGrath. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
/* Nonzero if UID, GID, EUID, and EGID have valid values. */
static int have_ids = 0;
-# ifdef HAVE_GETGROUPS
+# if HAVE_GETGROUPS
int group_member ();
# else
# define group_member(gid) 0
/* Written by Brian L. Matthews, blm@6sceng.UUCP. */
\f
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
/* filemode.c -- make a string describing file modes
- Copyright (C) 1985, 1990, 1993 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1990, 1993, 1998 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
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
\f
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#include <sys/types.h>
#endif
#ifdef STAT_MACROS_BROKEN
-#undef S_ISBLK
-#undef S_ISCHR
-#undef S_ISDIR
-#undef S_ISFIFO
-#undef S_ISLNK
-#undef S_ISMPB
-#undef S_ISMPC
-#undef S_ISNWK
-#undef S_ISREG
-#undef S_ISSOCK
+# undef S_ISBLK
+# undef S_ISCHR
+# undef S_ISDIR
+# undef S_ISFIFO
+# undef S_ISLNK
+# undef S_ISMPB
+# undef S_ISMPC
+# undef S_ISNWK
+# undef S_ISREG
+# undef S_ISSOCK
#endif /* STAT_MACROS_BROKEN. */
#if !defined(S_ISBLK) && defined(S_IFBLK)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
#endif
#if !defined(S_ISCHR) && defined(S_IFCHR)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
#endif
#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
#if !defined(S_ISREG) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
#endif
#if !defined(S_ISFIFO) && defined(S_IFIFO)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
#endif
#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
#endif
#if !defined(S_ISSOCK) && defined(S_IFSOCK)
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
#endif
#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */
-#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
-#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
+# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
+# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
#endif
#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */
-#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
+# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
#endif
void mode_string ();
/* ftruncate emulations that work on some System V's.
This file is in the public domain. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#include <sys/types.h>
}
#else /* not F_CHSIZE */
-#ifdef F_FREESP
+# ifdef F_FREESP
/* By William Kucharski <kucharsk@netcom.com>. */
-#include <sys/stat.h>
-#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
+# include <sys/stat.h>
+# include <errno.h>
+# if HAVE_UNISTD_H
+# include <unistd.h>
+# endif
int
ftruncate (fd, length)
return 0;
}
-#else /* not F_CHSIZE nor F_FREESP */
-#ifdef HAVE_CHSIZE
+# else /* not F_CHSIZE nor F_FREESP */
+# if HAVE_CHSIZE
int
ftruncate (fd, length)
return chsize (fd, length);
}
-#else /* not F_CHSIZE nor F_FREESP nor HAVE_CHSIZE */
+# else /* not F_CHSIZE nor F_FREESP nor HAVE_CHSIZE */
-#include <errno.h>
-#ifndef errno
+# include <errno.h>
+# ifndef errno
extern int errno;
-#endif
+# endif
int
ftruncate (fd, length)
return -1;
}
-#endif /* not HAVE_CHSIZE */
-#endif /* not F_FREESP */
+# endif /* not HAVE_CHSIZE */
+# endif /* not F_FREESP */
#endif /* not F_CHSIZE */
/* group-member.c -- determine whether group id is in calling user's group list
- Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1997, 1998 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
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
# include <stdlib.h>
#endif
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
# include <unistd.h>
#endif
GETGROUPS_T *group;
};
-#ifdef HAVE_GETGROUPS
+#if HAVE_GETGROUPS
static void
free_group_info (struct group_info *g)
/* isdir.c -- determine whether a directory exists
- Copyright (C) 1990 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998 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
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#include <sys/types.h>
#include <sys/stat.h>
#ifdef STAT_MACROS_BROKEN
-#undef S_ISDIR
+# undef S_ISDIR
#endif /* STAT_MACROS_BROKEN. */
#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif
/* If PATH is an existing directory or symbolic link to a directory,
/* Written by Jim Meyering. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
/* mountlist.c -- return a list of mounted filesystems
- Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 1998 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
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
char *xstrdup ();
void error ();
-#ifdef HAVE_SYS_PARAM_H
+#if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
# define MOUNTED_GETMNTTBL
#endif
-#ifdef HAVE_SYS_MNTENT_H
+#if HAVE_SYS_MNTENT_H
/* This is to get MNTOPT_IGNORE on e.g. SVR4. */
# include <sys/mntent.h>
#endif
/* path-concat.c -- concatenate two arbitrary pathnames
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998 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
/* Written by Jim Meyering. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
#endif
#include <stdio.h>
-#ifdef HAVE_STRING_H
+#if HAVE_STRING_H
# include <string.h>
#endif
#include <sys/types.h>
/* save-cwd.c -- Save and restore current working directory.
- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1998 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
/* Written by Jim Meyering <meyering@na-net.ornl.gov>. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include "config.h"
#endif
# include <stdlib.h>
#endif
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
# include <unistd.h>
#endif
-#ifdef HAVE_FCNTL_H
+#if HAVE_FCNTL_H
# include <fcntl.h>
#else
# include <sys/file.h>
if (have_working_fchdir)
{
-#ifdef HAVE_FCHDIR
+#if HAVE_FCHDIR
cwd->desc = open (".", O_RDONLY);
if (cwd->desc < 0)
{
/* savedir.c -- save the list of files in a directory in a string
- Copyright (C) 1990, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1997, 1998 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
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
-#ifdef HAVE_CONFIG_H
+#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
+#if HAVE_UNISTD_H
# include <unistd.h>
#endif
/* strdup.c -- return a newly allocated copy of a string
- Copyright (C) 1990 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998 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
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#ifdef STDC_HEADERS
-#include <string.h>
-#include <stdlib.h>
+# include <string.h>
+# include <stdlib.h>
#else
char *malloc ();
char *strcpy ();
/* userspec.c -- Parse a user and group string.
- Copyright (C) 1989, 1990, 1991, 1992, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1989, 1990, 1991, 1992, 1997, 1998 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
#ifdef __GNUC__
# define alloca __builtin_alloca
#else
-# ifdef HAVE_ALLOCA_H
+# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
/* yesno.c -- read a yes/no response from stdin
- Copyright (C) 1990 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1998 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
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#if HAVE_CONFIG_H
+# include <config.h>
#endif
#include <ctype.h>
-#ifdef HAVE_STDLIB_H
+#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
#include <stdio.h>