1 /* HERCULES.H (c) Copyright Roger Bowler, 1999-2009 */ 2 /* Hercules Header Files */ 3 4 /* Interpretive Execution - (c) Copyright Jan Jaeger, 1999-2009 */ 5 /* z/Architecture support - (c) Copyright Jan Jaeger, 1999-2009 */ 6 7 #ifdef HAVE_CONFIG_H 8 #include <config.h> // Hercules build configuration options/settings 9 #endif 10 11 /*-------------------------------------------------------------------*/ 12 /* Performance attribute: use registers to pass function parameters */ 13 /* (must be #defined BEFORE "feature,h" since it uses it) */ 14 /*-------------------------------------------------------------------*/ 15 16 #if defined(HAVE_ATTR_REGPARM) 17 #ifdef _MSVC_ 18 #define ATTR_REGPARM(n) __fastcall 19 #else /* GCC presumed */ 20 #define ATTR_REGPARM(n) __attribute__ (( regparm(n) )) 21 #endif 22 #else 23 #define ATTR_REGPARM(n) /* nothing */ 24 #endif 25 26 // ------------------------------------------------------------------- 27 // 28 // PROGRAMMING NOTE 29 // 30 // The "feature.h" header MUST be #included AFTER <config.h> *AND* 31 // BEFORE the _HERCULES_H pre-processor variable gets #defined. This 32 // is to enure that it is ALWAYS #included regardless of whether the 33 // "hercules.h" header has already been #included or not. This is so 34 // the various architecture dependent source modules compile properly 35 // since they #include themselves several times so as to cause them 36 // to be compiled multiple times, each time with a new architecture 37 // mode #defined (e.g. 370/390/900). See the very end of the source 38 // member "general2.c" for a typical example of this very technique. 39 // 40 // ------------------------------------------------------------------- 41 // 42 43 // 44 // Include standard system headers (if not already done) 45 // 46 47 #include "feature.h" // Hercules [manually maintained] features; 48 // auto-includes featall.h and hostopts.h 49 50 // ALWAYS include cpuint.h after feature.h 51 // and also assure it is re-included for 52 // each archs. 53 #include "cpuint.h" 54 55 #ifndef _HERCULES_H // MUST come AFTER "feature.h" is #included 56 #define _HERCULES_H // MUST come AFTER "feature.h" is #included 57 58 #include "hstdinc.h" // Precompilation-eligible header files 59 60 #ifdef _MSVC_ 61 #include "getopt.h" 62 #else 63 #if defined(HAVE_GETOPT_LONG) && !defined(__GETOPT_H__) 64 #include <getopt.h> 65 #endif 66 #endif 67 68 #ifdef OPTION_DYNAMIC_LOAD 69 #ifdef HDL_USE_LIBTOOL 70 #include <ltdl.h> 71 #else 72 #if defined(__MINGW__) || defined(_MSVC_) 73 #include "w32dl.h" 74 #else 75 #include <dlfcn.h> 76 #endif 77 #endif 78 #endif 79 80 81 /////////////////////////////////////////////////////////////////////// 82 // Private Hercules-specific headers..... 83 /////////////////////////////////////////////////////////////////////// 84 85 #include "linklist.h" // (Hercules-wide linked-list macros) 86 #include "hconsts.h" // (Hercules-wide #define constants) 87 #include "hthreads.h" // (Hercules-wide threading macros) 88 #include "hmacros.h" // (Hercules-wide #define macros) 89 90 #if !defined(HAVE_BYTESWAP_H) || defined(NO_ASM_BYTESWAP) 91 #include "hbyteswp.h" // (Hercules equivalent of <byteswap.h>) 92 #endif 93 94 #if !defined(HAVE_MEMRCHR) 95 #include "memrchr.h" 96 #endif 97 98 #if defined(HAVE_ASSERT_H) 99 #include <assert.h> 100 #endif 101 102 #include "hostinfo.h" 103 #include "version.h" 104 105 #include "esa390.h" // (ESA/390 structure definitions) 106 #include "hscutl.h" // (utility functions) 107 #include "w32util.h" // (win32 porting functions) 108 #include "clock.h" // (TOD definitions) 109 110 #include "codepage.h" 111 #include "logger.h" // (logmsg, etc) 112 #include "hdl.h" // (Hercules Dynamic Loader) 113 114 #include "cache.h" 115 116 #include "devtype.h" 117 #include "dasdtab.h" 118 #include "shared.h" 119 #include "hetlib.h" 120 #include "sockdev.h" 121 #include "w32ctca.h" 122 123 #include "service.h" 124 125 #include "hsocket.h" 126 #ifdef _MSVC_ 127 #include "w32mtio.h" // 'mtio.h' needed by hstructs.h 128 #endif // _MSVC_ 129 #include "hstructs.h" // (Hercules-wide structures) 130 #include "hexterns.h" // (Hercules-wide extern function prototypes) 131 132 #endif // _HERCULES_H 133