liblogging: config.h Source File

Main Page | Compound List | File List | Compound Members | File Members | Related Pages

# config.h

Go to the documentation of this file.

    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
    00155 #define FEATURE_UDP 1
    00156
    00160 #define FEATURE_UNIX_DOMAIN_SOCKETS 1
    00161
    00168 #define FEATURE_COOKED 1
    00169
    00177 #define FEATURE_MSGAPI 1
    00178
    00179 /* ######################################################################### *
    00180  * #                 PORTABILITY MACROS FROM HERE ON                       # *
    00181  * ######################################################################### */
    00182
    00183 /* As it looks, different compilers have different predefined
    00184  * defines for the OS environment. Not really nice :-(
    00185  * So we define our own OS defines and use them consistently.
    00186  */
    00187 #ifdef WIN32
    00188 #       define SROS_WIN32
    00189 #endif
    00190
    00191 #ifdef __win32
    00192 #       define SROS_WIN32
    00193 #endif
    00194
    00195 #ifdef SROS_Solaris_
    00196 #   define SROS_Solaris
    00197 #endif
    00198
    00199
    00200 /* ######################################################################### *
    00201  * # Now all environment defines are made, so let's get down to the meat ;)# *
    00202  * ######################################################################### */
    00203
    00204 #ifndef TRUE
    00205 #       define TRUE 1
    00206 #       define FALSE 0
    00207 #endif
    00208
    00209 #ifdef SROS_WIN32
    00210 #       define SLEEP(x) Sleep(x)
    00211 #       define SR_SOCKET        SOCKET
    00212 #       define SNPRINTF         _snprintf
    00213         /* for obvious reasons, we define FEATURE_UNIX_DOMAIN_SOCKETS to 0 under win32... */
    00214 #       undef FEATURE_UNIX_DOMAIN_SOCKETS
    00215 #       define FEATURE_UNIX_DOMAIN_SOCKETS 0
    00216 #else
    00217 #       define SLEEP(x) sleep(x)
    00218 #       define SR_SOCKET        int
    00219 #       define INVALID_SOCKET 0
    00220 #       define SNPRINTF snprintf
    00221 #endif
    00222
    00223
    00224 /* ######################################################################### *
    00225  * #                       END PORTABILITY MACROS                          # *
    00226  * ######################################################################### */
    00227
    00228 #endif