00001 00045 #ifndef __LIB3195_CONFIG_H_INCLUDED__ 00046 #define __LIB3195_CONFIG_H_INCLUDED__ 1 00047 00048 #include <stdio.h> 00049 #include <stdlib.h> 00050 #include <string.h> 00051 00056 #define BEEP_DEFAULT_WINDOWSIZE 4096 00057 00061 #define BEEPFRAMEMAX BEEP_DEFAULT_WINDOWSIZE 00062 00072 #define SOCKETMAXINBUFSIZE BEEP_DEFAULT_WINDOWSIZE 00073 00074 00087 #define STRINGBUF_ALLOC_INCREMENT 1024 00088 00106 #define STRINGBUF_TRIM_ALLOCSIZE 0 00107 00112 #define DEBUGLEVEL 1 00113 00130 #define SECURITY_PEER_ERRREPORT_LEVEL 1 00131 00132 /* ######################################################################### * 00133 * # Feature Select Macros - these macros turn library features on or off. # * 00134 * # The library modules have been choosen with care so that in most cases # * 00135 * # only those code & data actually needed is linked into the program. # * 00136 * # However, there are some instances where code is only needed for spe- # * 00137 * # cific features and if such features are not used can be removed. Such # * 00138 * # fine-tuning can be done with the below macros. We highly suggest to # * 00139 * # change settings only if you EXACTLY know WHAT your are doing AND WHY # * 00140 * # you are doing it - otherwise, you'll most probably end up with linker # * 00141 * # errors at least... # * 00142 * # # * 00143 * # In general, a feature is enabled if it is defined to 1 and disabled # * 00144 * # if it is set to 0. # * 00145 * ######################################################################### */ 00146 00150 #define FEATURE_LISTENER 1 00151 00158 #define FEATURE_COOKED 1 00159 00167 #define FEATURE_MSGAPI 1 00168 00169 /* ######################################################################### * 00170 * # PORTABILITY MACROS FROM HERE ON # * 00171 * ######################################################################### */ 00172 00173 /* As it looks, different compilers have different predefined 00174 * defines for the OS environment. Not really nice :-( 00175 * So we define our own OS defines and use them consistently. 00176 */ 00177 #ifdef WIN32 00178 # define SROS_WIN32 00179 #endif 00180 00181 #ifdef __win32 00182 # define SROS_WIN32 00183 #endif 00184 00185 00186 /* ######################################################################### * 00187 * # Now all environment defines are made, so let's get down to the meat ;)# * 00188 * ######################################################################### */ 00189 00190 #ifndef TRUE 00191 # define TRUE 1 00192 # define FALSE 0 00193 #endif 00194 00195 #ifdef SROS_WIN32 00196 # define SLEEP(x) Sleep(x) 00197 # define SR_SOCKET SOCKET 00198 # define SNPRINTF _snprintf 00199 #else 00200 # define SLEEP(x) sleep(x) 00201 # define SR_SOCKET int 00202 # define INVALID_SOCKET 0 00203 # define SNPRINTF snprintf 00204 #endif 00205 00206 00207 /* ######################################################################### * 00208 * # END PORTABILITY MACROS # * 00209 * ######################################################################### */ 00210 00211 #endif