2012-03-24 18:41:51 +11:00
|
|
|
/* HSTDINC.H (c) Copyright Roger Bowler, 1999-2012 */
|
2005-09-24 16:17:46 +00:00
|
|
|
/* Hercules precompilation-eligible Header Files */
|
2010-05-20 01:54:24 +00:00
|
|
|
/* */
|
|
|
|
|
/* Released under "The Q Public License Version 1" */
|
|
|
|
|
/* (http://www.hercules-390.org/herclic.html) as modifications to */
|
|
|
|
|
/* Hercules. */
|
2005-09-24 16:17:46 +00:00
|
|
|
|
|
|
|
|
/* This file contains #include statements for all of the header */
|
|
|
|
|
/* files which are not dependent on the mainframe architectural */
|
|
|
|
|
/* features selected and thus are eligible for precompilation */
|
|
|
|
|
|
|
|
|
|
#ifndef _HSTDINC_H
|
|
|
|
|
#define _HSTDINC_H
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
|
#include <config.h> // Hercules build configuration options/settings
|
|
|
|
|
#endif
|
HQA = Hercules Build Configurations Quality Assurance Testing
The "HQA" commit introduces a new build feature that provides the ability to override Hercules's default build settings without having to modify any of the Hercules header files themselves. (Note: not all build settings may be overridable yet. This is a work in progress.)
To override Hercules's default build settings, define an environment variable called 'HQA_DIR' pointing to the directory where your optional "hqa.h" overrides header file exists, or, instead of defining an environment variable, simply specify, if Linux, the new "--enable-hqa" configure option, or, if Windows, the new "-hqa" "makefile.bat" option.
Then, within your "hqa.h" override header, either #define the 'HQA_SCENARIO' macro to one of the pre-defined values defined in Hercules's "hqadefs.h" header file, or simply #define your own scenario. The values you #define will then override Hercules's default values.
Additionally, on Windows, you can override virtually any of the compiler settings as well, via a 'HQA.msvc' nmake !include override file that, for example, modifies the $(cflags) variable to add, remove, or change whatever compiler option you wish.
2013-04-12 14:48:06 -07:00
|
|
|
#include "hqainc.h" // User override of build configuration/settings
|
|
|
|
|
#ifdef WIN32
|
|
|
|
|
#include "targetver.h" // Earliest/Oldest Windows platform supported
|
|
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
|
HQA = Hercules Build Configurations Quality Assurance Testing
The "HQA" commit introduces a new build feature that provides the ability to override Hercules's default build settings without having to modify any of the Hercules header files themselves. (Note: not all build settings may be overridable yet. This is a work in progress.)
To override Hercules's default build settings, define an environment variable called 'HQA_DIR' pointing to the directory where your optional "hqa.h" overrides header file exists, or, instead of defining an environment variable, simply specify, if Linux, the new "--enable-hqa" configure option, or, if Windows, the new "-hqa" "makefile.bat" option.
Then, within your "hqa.h" override header, either #define the 'HQA_SCENARIO' macro to one of the pre-defined values defined in Hercules's "hqadefs.h" header file, or simply #define your own scenario. The values you #define will then override Hercules's default values.
Additionally, on Windows, you can override virtually any of the compiler settings as well, via a 'HQA.msvc' nmake !include override file that, for example, modifies the $(cflags) variable to add, remove, or change whatever compiler option you wish.
2013-04-12 14:48:06 -07:00
|
|
|
/*-------------------------------------------------------------------*/
|
|
|
|
|
/* Required and optional SYSTEM headers... */
|
|
|
|
|
/*-------------------------------------------------------------------*/
|
2005-09-24 16:17:46 +00:00
|
|
|
|
|
|
|
|
#define _REENTRANT /* Ensure that reentrant code is generated *JJ */
|
|
|
|
|
#define _THREAD_SAFE /* Some systems use this instead *JJ */
|
|
|
|
|
|
|
|
|
|
#if defined(HAVE_STRSIGNAL) && defined(__GNUC__) && !defined(_GNU_SOURCE)
|
|
|
|
|
#define _GNU_SOURCE /* required by strsignal() *JJ */
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Required headers -- These we ALWAYS need to have... */
|
|
|
|
|
|
2011-09-20 11:41:39 +00:00
|
|
|
#include "ccnowarn.h" /* suppress compiler warning support */
|
|
|
|
|
|
2005-09-24 16:17:46 +00:00
|
|
|
#ifdef _MSVC_
|
2007-01-10 09:32:39 +00:00
|
|
|
#include <winsock2.h> // Windows Sockets 2
|
|
|
|
|
#include <mstcpip.h> // (need struct tcp_keepalive)
|
HQA = Hercules Build Configurations Quality Assurance Testing
The "HQA" commit introduces a new build feature that provides the ability to override Hercules's default build settings without having to modify any of the Hercules header files themselves. (Note: not all build settings may be overridable yet. This is a work in progress.)
To override Hercules's default build settings, define an environment variable called 'HQA_DIR' pointing to the directory where your optional "hqa.h" overrides header file exists, or, instead of defining an environment variable, simply specify, if Linux, the new "--enable-hqa" configure option, or, if Windows, the new "-hqa" "makefile.bat" option.
Then, within your "hqa.h" override header, either #define the 'HQA_SCENARIO' macro to one of the pre-defined values defined in Hercules's "hqadefs.h" header file, or simply #define your own scenario. The values you #define will then override Hercules's default values.
Additionally, on Windows, you can override virtually any of the compiler settings as well, via a 'HQA.msvc' nmake !include override file that, for example, modifies the $(cflags) variable to add, remove, or change whatever compiler option you wish.
2013-04-12 14:48:06 -07:00
|
|
|
#if defined(ENABLE_IPV6)
|
|
|
|
|
#include <ws2tcpip.h> // For IPV6
|
|
|
|
|
#endif
|
|
|
|
|
#include <netioapi.h> // For if_nametoindex
|
2005-11-17 01:48:45 +00:00
|
|
|
#endif
|
HQA = Hercules Build Configurations Quality Assurance Testing
The "HQA" commit introduces a new build feature that provides the ability to override Hercules's default build settings without having to modify any of the Hercules header files themselves. (Note: not all build settings may be overridable yet. This is a work in progress.)
To override Hercules's default build settings, define an environment variable called 'HQA_DIR' pointing to the directory where your optional "hqa.h" overrides header file exists, or, instead of defining an environment variable, simply specify, if Linux, the new "--enable-hqa" configure option, or, if Windows, the new "-hqa" "makefile.bat" option.
Then, within your "hqa.h" override header, either #define the 'HQA_SCENARIO' macro to one of the pre-defined values defined in Hercules's "hqadefs.h" header file, or simply #define your own scenario. The values you #define will then override Hercules's default values.
Additionally, on Windows, you can override virtually any of the compiler settings as well, via a 'HQA.msvc' nmake !include override file that, for example, modifies the $(cflags) variable to add, remove, or change whatever compiler option you wish.
2013-04-12 14:48:06 -07:00
|
|
|
|
2005-11-17 01:48:45 +00:00
|
|
|
#ifdef WIN32
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
#endif
|
HQA = Hercules Build Configurations Quality Assurance Testing
The "HQA" commit introduces a new build feature that provides the ability to override Hercules's default build settings without having to modify any of the Hercules header files themselves. (Note: not all build settings may be overridable yet. This is a work in progress.)
To override Hercules's default build settings, define an environment variable called 'HQA_DIR' pointing to the directory where your optional "hqa.h" overrides header file exists, or, instead of defining an environment variable, simply specify, if Linux, the new "--enable-hqa" configure option, or, if Windows, the new "-hqa" "makefile.bat" option.
Then, within your "hqa.h" override header, either #define the 'HQA_SCENARIO' macro to one of the pre-defined values defined in Hercules's "hqadefs.h" header file, or simply #define your own scenario. The values you #define will then override Hercules's default values.
Additionally, on Windows, you can override virtually any of the compiler settings as well, via a 'HQA.msvc' nmake !include override file that, for example, modifies the $(cflags) variable to add, remove, or change whatever compiler option you wish.
2013-04-12 14:48:06 -07:00
|
|
|
|
2005-11-17 01:48:45 +00:00
|
|
|
#ifdef _MSVC_
|
2014-08-01 17:12:23 -07:00
|
|
|
#include <math.h> // Must come BEFORE <intrin.h> due to
|
|
|
|
|
// MS VC Bug ID 381422
|
2011-07-23 12:18:25 +00:00
|
|
|
#include <xmmintrin.h>
|
2006-03-18 06:11:44 +00:00
|
|
|
#include <tchar.h>
|
2005-09-24 16:17:46 +00:00
|
|
|
#include <wincon.h>
|
|
|
|
|
#include <conio.h>
|
|
|
|
|
#include <io.h>
|
|
|
|
|
#include <lmcons.h>
|
|
|
|
|
#include <tlhelp32.h>
|
|
|
|
|
#include <dbghelp.h>
|
|
|
|
|
#include <crtdbg.h>
|
2014-08-01 17:12:23 -07:00
|
|
|
#include <intrin.h>
|
2010-06-01 01:52:48 +00:00
|
|
|
#else
|
|
|
|
|
#include <libgen.h>
|
2005-09-24 16:17:46 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
#include <setjmp.h>
|
|
|
|
|
#include <ctype.h>
|
|
|
|
|
#include <errno.h>
|
|
|
|
|
#include <fcntl.h>
|
|
|
|
|
#ifndef O_BINARY
|
|
|
|
|
#define O_BINARY 0
|
|
|
|
|
#endif
|
2009-04-27 21:32:48 +00:00
|
|
|
#ifndef O_NONBLOCK
|
|
|
|
|
#define O_NONBLOCK 0
|
|
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
#include <limits.h>
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
#if !defined(_MSVC_)
|
2014-01-03 13:54:14 -08:00
|
|
|
#include <sched.h>
|
2005-09-24 16:17:46 +00:00
|
|
|
#include <sys/time.h>
|
2005-10-15 13:33:39 +00:00
|
|
|
#include <sys/ioctl.h>
|
2011-01-27 23:23:17 +00:00
|
|
|
#include <sys/mman.h>
|
2005-09-24 16:17:46 +00:00
|
|
|
#endif
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
|
|
/* Optional headers -- These we can live without */
|
|
|
|
|
|
2005-12-07 13:42:19 +00:00
|
|
|
/* PROGRAMMING NOTE: On Darwin, <sys/socket.h> must be included before
|
|
|
|
|
<net/if.h>, and on older Darwin systems, before <net/route.h> and
|
|
|
|
|
<netinet/in.h> */
|
|
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
#ifdef HAVE_ARPA_INET_H
|
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
|
#endif
|
2013-12-22 12:07:08 -08:00
|
|
|
#ifdef HAVE_LINUX_IF_TUN_H
|
|
|
|
|
#include <linux/if_tun.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_NET_ROUTE_H
|
|
|
|
|
#include <net/route.h>
|
2005-09-24 16:17:46 +00:00
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_NET_IF_H
|
|
|
|
|
#include <net/if.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
#endif
|
2015-01-19 13:35:29 -08:00
|
|
|
#if defined( HAVE_NETINET_TCP_H )
|
2007-01-10 16:30:48 +00:00
|
|
|
#include <netinet/tcp.h>
|
2015-01-19 13:35:29 -08:00
|
|
|
#elif defined( HAVE_NET_TCP_H )
|
|
|
|
|
#include <net/tcp.h>
|
2007-01-10 16:30:48 +00:00
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
#ifdef HAVE_SYS_IOCTL_H
|
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
|
#endif
|
2006-02-09 02:24:39 +00:00
|
|
|
#ifdef HAVE_SYS_PARAM_H
|
|
|
|
|
#include <sys/param.h>
|
|
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
#ifdef HAVE_SYS_MOUNT_H
|
|
|
|
|
#include <sys/mount.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SYS_MTIO_H
|
|
|
|
|
#include <sys/mtio.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SYS_RESOURCE_H
|
|
|
|
|
#include <sys/resource.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SYS_UN_H
|
|
|
|
|
#include <sys/un.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SYS_UIO_H
|
|
|
|
|
#include <sys/uio.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SYS_UTSNAME_H
|
|
|
|
|
#include <sys/utsname.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SYS_WAIT_H
|
|
|
|
|
#include <sys/wait.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_BYTESWAP_H
|
2006-02-18 12:14:31 +00:00
|
|
|
#ifndef NO_ASM_BYTESWAP
|
2005-09-24 16:17:46 +00:00
|
|
|
#include <byteswap.h>
|
2006-02-18 12:14:31 +00:00
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_BZLIB_H
|
2005-11-17 01:48:45 +00:00
|
|
|
// windows.h #defines 'small' as char and bzlib.h
|
|
|
|
|
// uses it for a variable name so we must #undef.
|
|
|
|
|
#if defined(__CYGWIN__)
|
|
|
|
|
#undef small
|
|
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
#include <bzlib.h>
|
|
|
|
|
/* ISW 20050427 : CCKD_BZIP2/HET_BZIP2 are usually */
|
|
|
|
|
/* controlled by config.h (automagic). If config.h */
|
|
|
|
|
/* is not present however, then define them here. */
|
|
|
|
|
#if !defined(HAVE_CONFIG_H)
|
|
|
|
|
#define CCKD_BZIP2
|
|
|
|
|
#define HET_BZIP2
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_DIRENT_H
|
|
|
|
|
#include <dirent.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef OPTION_DYNAMIC_LOAD
|
|
|
|
|
#ifdef HDL_USE_LIBTOOL
|
|
|
|
|
#include <ltdl.h>
|
|
|
|
|
#else
|
|
|
|
|
#if defined(__MINGW__) || defined(_MSVC_)
|
|
|
|
|
#include "w32dl.h"
|
|
|
|
|
#else
|
|
|
|
|
#include <dlfcn.h>
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_FENV_H
|
|
|
|
|
#include <fenv.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_INTTYPES_H
|
|
|
|
|
#include <inttypes.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_MALLOC_H
|
|
|
|
|
#include <malloc.h>
|
|
|
|
|
#endif
|
2014-08-01 17:12:23 -07:00
|
|
|
#if defined(HAVE_MATH_H) && !defined(_MSVC_)
|
2005-09-24 16:17:46 +00:00
|
|
|
#include <math.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_NETDB_H
|
|
|
|
|
#include <netdb.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_PWD_H
|
|
|
|
|
#include <pwd.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_REGEX_H
|
|
|
|
|
#include <regex.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SIGNAL_H
|
|
|
|
|
#include <signal.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_TIME_H
|
|
|
|
|
#include <time.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_TERMIOS_H
|
|
|
|
|
#include <termios.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_ZLIB_H
|
|
|
|
|
#include <zlib.h>
|
|
|
|
|
#endif
|
2008-02-19 11:49:19 +00:00
|
|
|
#ifdef HAVE_SYS_CAPABILITY_H
|
|
|
|
|
#include <sys/capability.h>
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef HAVE_SYS_PRCTL_H
|
|
|
|
|
#include <sys/prctl.h>
|
|
|
|
|
#endif
|
2005-09-24 16:17:46 +00:00
|
|
|
|
|
|
|
|
// Some Hercules specific files, NOT guest arch dependent
|
|
|
|
|
#if defined(_MSVC_)
|
|
|
|
|
#include "hercwind.h" // Hercules definitions for Windows
|
|
|
|
|
#else
|
|
|
|
|
#include <unistd.h> // Unix standard definitions
|
|
|
|
|
#endif
|
|
|
|
|
|
2009-10-27 20:17:03 +00:00
|
|
|
#ifdef C99_FLEXIBLE_ARRAYS
|
|
|
|
|
#define FLEXIBLE_ARRAY // ("DEVBLK *memdev[];" syntax is supported)
|
|
|
|
|
#else
|
|
|
|
|
#define FLEXIBLE_ARRAY 0 // ("DEVBLK *memdev[0];" must be used instead)
|
|
|
|
|
#endif
|
|
|
|
|
|
2005-09-24 16:17:46 +00:00
|
|
|
#include "hostopts.h" // Must come before htypes.h
|
|
|
|
|
#include "htypes.h" // Hercules-wide data types
|
2011-01-27 23:35:37 +00:00
|
|
|
#include "dbgtrace.h" // Hercules default debugging
|
2005-09-24 16:17:46 +00:00
|
|
|
|
|
|
|
|
#endif // _HSTDINC_H
|