2011-06-15 08:34:28 -04:00
|
|
|
/************************************************************************
|
|
|
|
* *
|
|
|
|
* Star Traders: A Game of Interstellar Trading *
|
|
|
|
* Copyright (C) 1990-2011, John Zaitseff *
|
|
|
|
* *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
Author: John Zaitseff <J.Zaitseff@zap.org.au>
|
|
|
|
$Id$
|
|
|
|
|
2011-07-19 05:09:59 -04:00
|
|
|
This file, system.h, contains system-specific definitions and #include
|
|
|
|
directives for Star Traders.
|
2011-06-15 08:34:28 -04:00
|
|
|
|
|
|
|
|
|
|
|
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 3 of the License, 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, see http://www.gnu.org/licenses/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef included_SYSTEM_H
|
|
|
|
#define included_SYSTEM_H 1
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* Portability definitions *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* System header files *
|
|
|
|
************************************************************************/
|
|
|
|
|
2011-07-19 08:53:06 -04:00
|
|
|
#define _XOPEN_SOURCE 700 // Use SUSv4 where possible
|
|
|
|
#define _GNU_SOURCE 1 // Use GNU extensions as well
|
|
|
|
|
|
|
|
|
|
|
|
// Headers defined by ISO/IEC 9899:1999 (C99)
|
2011-06-30 06:31:19 -04:00
|
|
|
|
2011-07-10 20:31:19 -04:00
|
|
|
#include <assert.h>
|
|
|
|
|
2011-06-15 08:34:28 -04:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2011-06-30 07:11:36 -04:00
|
|
|
#include <stdbool.h>
|
2011-07-02 00:23:35 -04:00
|
|
|
#include <stdarg.h>
|
2011-07-19 08:53:06 -04:00
|
|
|
#include <locale.h>
|
2011-07-01 19:39:23 -04:00
|
|
|
#include <ctype.h>
|
2011-06-15 08:34:28 -04:00
|
|
|
#include <string.h>
|
2011-07-02 00:23:35 -04:00
|
|
|
#include <errno.h>
|
2011-07-19 08:53:06 -04:00
|
|
|
|
|
|
|
|
|
|
|
// Headers defined by X/Open Single Unix Specification v4
|
|
|
|
|
2011-07-12 22:52:38 -04:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/stat.h>
|
2011-07-19 22:42:10 -04:00
|
|
|
#include <sys/time.h>
|
2011-07-15 03:46:57 -04:00
|
|
|
#include <monetary.h>
|
2011-06-30 06:31:19 -04:00
|
|
|
|
2011-07-19 08:53:06 -04:00
|
|
|
|
|
|
|
// Headers defined by the GNU C Library
|
|
|
|
|
2011-06-30 01:25:30 -04:00
|
|
|
#include <getopt.h>
|
|
|
|
|
2011-07-19 08:53:06 -04:00
|
|
|
|
|
|
|
// X/Open-compatible Curses library
|
|
|
|
|
2011-06-30 06:31:19 -04:00
|
|
|
#if defined(HAVE_NCURSESW) && defined(HAVE_NCURSESW_H)
|
|
|
|
# include <ncursesw/curses.h>
|
|
|
|
#elif defined(HAVE_NCURSES_H)
|
|
|
|
# include <ncurses.h>
|
|
|
|
#elif defined(HAVE_CURSES_H)
|
|
|
|
# include <curses.h>
|
|
|
|
#else
|
2011-07-19 08:53:06 -04:00
|
|
|
# error "X/Open-compatible Curses library required"
|
2011-06-30 06:31:19 -04:00
|
|
|
#endif
|
|
|
|
|
2011-06-30 01:25:30 -04:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* Miscellaneous definitions *
|
|
|
|
************************************************************************/
|
|
|
|
|
2011-06-30 02:09:13 -04:00
|
|
|
// Compiler __attributes__ for less-capable compilers
|
|
|
|
#ifndef HAVE___ATTRIBUTE__
|
|
|
|
# define __attribute__(x)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2011-06-15 08:34:28 -04:00
|
|
|
#endif /* included_SYSTEM_H */
|