|
Packit |
67cb25 |
/* system.h: System-dependent declarations. Include this first.
|
|
Packit |
67cb25 |
$Id$
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
Copyright (C) 1997 Free Software Foundation, Inc.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
This program is free software; you can redistribute it and/or modify
|
|
Packit |
67cb25 |
it under the terms of the GNU General Public License as published by
|
|
Packit |
67cb25 |
the Free Software Foundation; either version 3, or (at your option)
|
|
Packit |
67cb25 |
any later version.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
This program is distributed in the hope that it will be useful,
|
|
Packit |
67cb25 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
67cb25 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
Packit |
67cb25 |
GNU General Public License for more details.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
You should have received a copy of the GNU General Public License
|
|
Packit |
67cb25 |
along with this program; if not, write to the Free Software Foundation,
|
|
Packit |
67cb25 |
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#ifndef TEXINFO_SYSTEM_H
|
|
Packit |
67cb25 |
#define TEXINFO_SYSTEM_H
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#define _GNU_SOURCE
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#include <config.h>
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
/* <unistd.h> should be included before any preprocessor test
|
|
Packit |
67cb25 |
of _POSIX_VERSION. */
|
|
Packit |
67cb25 |
#if HAVE_UNISTD_H
|
|
Packit |
67cb25 |
#include <unistd.h>
|
|
Packit |
67cb25 |
#endif /* HAVE_UNISTD_H */
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#include <stdio.h>
|
|
Packit |
67cb25 |
#include <sys/types.h>
|
|
Packit |
67cb25 |
#include <ctype.h>
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#if HAVE_LOCALE_H
|
|
Packit |
67cb25 |
#include <locale.h>
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
#include <libintl.h>
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
/* Don't use bcopy! Use memmove if source and destination may overlap,
|
|
Packit |
67cb25 |
memcpy otherwise. */
|
|
Packit |
67cb25 |
#if HAVE_STRING_H
|
|
Packit |
67cb25 |
# if !STDC_HEADERS && HAVE_MEMORY_H
|
|
Packit |
67cb25 |
# include <memory.h>
|
|
Packit |
67cb25 |
# endif
|
|
Packit |
67cb25 |
# include <string.h>
|
|
Packit |
67cb25 |
#else
|
|
Packit |
67cb25 |
# include <strings.h>
|
|
Packit |
67cb25 |
char *memchr ();
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#ifdef STDC_HEADERS
|
|
Packit |
67cb25 |
#define getopt system_getopt
|
|
Packit |
67cb25 |
#include <stdlib.h>
|
|
Packit |
67cb25 |
#undef getopt
|
|
Packit |
67cb25 |
#else
|
|
Packit |
67cb25 |
extern char *getenv ();
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#ifndef HAVE_STRERROR
|
|
Packit |
67cb25 |
extern char *strerror ();
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#include <errno.h>
|
|
Packit |
67cb25 |
#ifndef errno
|
|
Packit |
67cb25 |
extern int errno;
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
#ifdef VMS
|
|
Packit |
67cb25 |
#include <perror.h>
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#include <sys/stat.h>
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#if HAVE_SYS_FILE_H
|
|
Packit |
67cb25 |
#include <sys/file.h>
|
|
Packit |
67cb25 |
#endif /* HAVE_SYS_FILE_H */
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#ifndef O_RDONLY
|
|
Packit |
67cb25 |
/* Since <fcntl.h> is POSIX, prefer that to <sys/fcntl.h>.
|
|
Packit |
67cb25 |
This also avoids some useless warnings on (at least) Linux. */
|
|
Packit |
67cb25 |
#if HAVE_FCNTL_H
|
|
Packit |
67cb25 |
#include <fcntl.h>
|
|
Packit |
67cb25 |
#else /* not HAVE_FCNTL_H */
|
|
Packit |
67cb25 |
#if HAVE_SYS_FCNTL_H
|
|
Packit |
67cb25 |
#include <sys/fcntl.h>
|
|
Packit |
67cb25 |
#endif /* not HAVE_SYS_FCNTL_H */
|
|
Packit |
67cb25 |
#endif /* not HAVE_FCNTL_H */
|
|
Packit |
67cb25 |
#endif /* not O_RDONLY */
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#if HAVE_PWD_H
|
|
Packit |
67cb25 |
#include <pwd.h>
|
|
Packit |
67cb25 |
#endif
|
|
Packit |
67cb25 |
/* Some systems don't declare this function in pwd.h. */
|
|
Packit |
67cb25 |
struct passwd *getpwnam ();
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
/* Our library routines not included in any system library. */
|
|
Packit |
67cb25 |
extern void *xmalloc (), *xrealloc ();
|
|
Packit |
67cb25 |
extern char *xstrdup ();
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
#endif /* TEXINFO_SYSTEM_H */
|