1 /* switches.h -- conditional compilation features for WIN32 systems */ 2 3 /* CHANGE LOG 4 * -------------------------------------------------------------------- 5 * 28Apr03 dm major reorganization of conditional compilation in Nyquist 6 */ 7 8 #ifdef SWITCHES 9 Error: switches.h included more than once. 10 #endif 11 12 #define __func__ __FUNCTION__ 13 14 #define HAS_STDLIB_H 1 15 #define HAS_SYS_TYPES_H 1 16 #define HAS_SYS_STAT_H 1 17 #undef HAS_STAT_H 18 #undef HAS_MALLOC_H 19 20 /* define one of HAS_GETTIMEOFDAY, HAS_FTIME, */ 21 #undef HAS_GETTIMEOFDAY 22 #undef HAS_FTIME 23 24 #undef READ_LINE 25 26 #undef USE_RANDOM 27 #define USE_RAND 1 28 29 30 /* since there are 2 versions Nyquist for windows: nyquist and nyqwin, 31 we use WINGUI to decide which to compile 32 */ 33 #ifndef WINGUI 34 /* use C library printf as nyquist_printf() */ 35 #define USE_PRINTF 1 36 #endif 37 38 /* define this to be printf, or define your own fn of the form 39 void nyquist_printf(char *format, ...); 40 (for a GUI) 41 */ 42 void nyquist_printf(char *format, ...); 43 44 #define NEED_ULONG 1 45 #define NEED_USHORT 1 46 #define NEED_BYTE 1 47 48 #define NEED_ROUND 1 49 50 #undef NEED_DEFINE_MALLOC 51 52 /* definitions for libsndfile */ 53 54 /* Target processor clips on negative float to int conversion */ 55 /* (true on i386) */ 56 #define CPU_CLIPS_NEGATIVE 1 57 58 /* Target processor clips on positive float to int conversion */ 59 /* (true on i386) */ 60 #define CPU_CLIPS_POSITIVE 1 61 62 /* Target processor is little endian. */ 63 #define CPU_IS_LITTLE_ENDIAN 1 64 /* Target processor is big endian. */ 65 #define CPU_IS_BIG_ENDIAN 0 66 67 /* Set to 1 if S_IRGRP is defined */ 68 #define HAVE_DECL_S_IRGRP 0 69 70 /* Set to 1 if the compiler supports the struct hack. */ 71 #define HAVE_FLEXIBLE_ARRAY 1 72 73 /* Define to 1 if you have the `fsync' function. */ 74 #define HAVE_FSYNC 1 75 76 /* Define to 1 if you have the `gmtime' function. */ 77 #define HAVE_GMTIME 1 78 79 /* Define to 1 if you have the `gmtime_r' function. */ 80 #undef HAVE_GMTIME_R 81 82 /* Define to 1 if you have the <inttypes.h> header file. */ 83 #define HAVE_INTTYPES_H 0 84 85 /* Define if you have C99's lrint function. */ 86 #define HAVE_LRINT 0 87 88 /* Define if you have C99's lrintf function. */ 89 #define HAVE_LRINTF 0 90 91 /* Define to 1 if you have the `snprintf' function. */ 92 // #define snprintf _snprintf -- snprintf is a Standard Library function 93 #define HAVE_SNPRINTF 1 94 95 /* Define to 1 if the system has the type `ssize_t'. */ 96 #define ssize_t SSIZE_T 97 #define HAVE_SSIZE_T 1 98 99 /* Define to 1 if you have the <stdint.h> header file. */ 100 #define HAVE_STDINT_H 1 101 102 /* Define to 1 if you have the <sys/stat.h> header file. */ 103 #define HAVE_SYS_STAT_H 1 104 105 /* Define to 1 if you have the <sys/types.h> header file. */ 106 #define HAVE_SYS_TYPES_H 1 107 108 /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ 109 #define HAVE_SYS_WAIT_H 1 110 111 /* Define to 1 if you have the <unistd.h> header file. */ 112 #define HAVE_UNISTD_H 0 113 114 /* Define to 1 if you have the `vsnprintf' function. */ 115 #define HAVE_VSNPRINTF 1 116 117 /* Set to 1 if compiling for MacOSX */ 118 #define OS_IS_MACOSX 0 119 120 /* Set to 1 if compiling for Win32 */ 121 #define OS_IS_WIN32 1 122 123 /* Define to 1 if you have the ANSI C header files. */ 124 #define STDC_HEADERS 1 125 126 /* Set to 1 to use the native windows API */ 127 #define USE_WINDOWS_API 1 128 129 /* The size of `int64_t', as computed by sizeof. */ 130 /* Omit this if int64_t is not a type */ 131 #undef SIZEOF_INT64_T 132 133 /* The size of long as computed by sizeof. */ 134 #define SIZEOF_LONG 4 135 136 /* Set to long if unknown */ 137 #define SIZEOF_SF_COUNT_T 8 138 139 /* explicitly choose a platform */ 140 #undef UNIX 141 142 #ifndef WINDOWS 143 #define WINDOWS 1 144 #endif 145 146 #ifndef WIN32 147 #define WIN32 1 148 #endif 149 150 #ifndef MICROSOFT 151 #define MICROSOFT 1 152 #endif 153 154 #ifndef DOS 155 #define DOS 1 156 #endif 157 158 #undef MACINTOSH 159 160 // Under Windows, we do not want synchronous input because then we do not 161 // get the break character (^G) while XLISP is busy. Actually, there is a 162 // way to send a message to the process, but the Java IDE cannot send 163 // Windows messages, so we have to check for console character input 164 // using the _kbhit function. 165 //#define BUFFERED_SYNCHRONOUS_INPUT 1 166 #define SPACE_FOR_PLAY 10000 167 #define MAX_CHANNELS 16 168 169 /* this will enable code to read midi files, etc. */ 170 #define CMTSTUFF 1 171 172 /* NYQUIST tells some CMT code that we're really in 173 * XLISP and NYQUIST 174 */ 175 #define NYQUIST 1 176 177 #include "swlogic.h" 178