diff options
author | Mark Murray <markm@FreeBSD.org> | 1999-01-14 19:35:19 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 1999-01-14 19:35:19 +0000 |
commit | d8b5c7ed06fe94e01ce1e61786c3e072de0c3e89 (patch) | |
tree | 570e5cf5730d6009252842b5ff3e1405c775afa0 /contrib/texinfo/lib/system.h | |
parent | 253c2b00b74a914f105a971446b873fc1f38919a (diff) |
Upgrade texinfo to the latest-and-greatest.
This has big improvements to the .info file utility support and
much recent OSS requires its features.
Notes
Notes:
svn path=/vendor/texinfo/dist/; revision=42660
Diffstat (limited to 'contrib/texinfo/lib/system.h')
-rw-r--r-- | contrib/texinfo/lib/system.h | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/contrib/texinfo/lib/system.h b/contrib/texinfo/lib/system.h new file mode 100644 index 000000000000..109e3933cb37 --- /dev/null +++ b/contrib/texinfo/lib/system.h @@ -0,0 +1,102 @@ +/* system.h: System-dependent declarations. Include this first. + $Id: system.h,v 1.5 1997/07/31 20:34:36 karl Exp $ + + Copyright (C) 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +#ifndef TEXINFO_SYSTEM_H +#define TEXINFO_SYSTEM_H + +#define _GNU_SOURCE + +#include <config.h> + +/* <unistd.h> should be included before any preprocessor test + of _POSIX_VERSION. */ +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif /* HAVE_UNISTD_H */ + +#include <stdio.h> +#include <sys/types.h> +#include <ctype.h> + +#ifdef HAVE_LOCALE_H +#include <locale.h> +#endif +#include <libintl.h> + +/* Don't use bcopy! Use memmove if source and destination may overlap, + memcpy otherwise. */ +#ifdef HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#else +# include <strings.h> +char *memchr (); +#endif + +#ifdef STDC_HEADERS +#define getopt system_getopt +#include <stdlib.h> +#undef getopt +#else +extern char *getenv (); +#endif + +#ifndef HAVE_STRERROR +extern char *strerror (); +#endif + +#include <errno.h> +#ifndef errno +extern int errno; +#endif +#ifdef VMS +#include <perror.h> +#endif + +#include <sys/stat.h> + +#ifdef HAVE_SYS_FILE_H +#include <sys/file.h> +#endif /* HAVE_SYS_FILE_H */ + +#ifndef O_RDONLY +/* Since <fcntl.h> is POSIX, prefer that to <sys/fcntl.h>. + This also avoids some useless warnings on (at least) Linux. */ +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#else /* not HAVE_FCNTL_H */ +#ifdef HAVE_SYS_FCNTL_H +#include <sys/fcntl.h> +#endif /* not HAVE_SYS_FCNTL_H */ +#endif /* not HAVE_FCNTL_H */ +#endif /* not O_RDONLY */ + +#ifdef HAVE_PWD_H +#include <pwd.h> +#endif +/* Some systems don't declare this function in pwd.h. */ +struct passwd *getpwnam (); + +/* Our library routines not included in any system library. */ +extern void *xmalloc (), *xrealloc (); +extern char *xstrdup (); + +#endif /* TEXINFO_SYSTEM_H */ |