Changeset 205

Show
Ignore:
Timestamp:
08/19/99 18:56:22 (15 years ago)
Author:
piers
Message:

Updated .h files for cplusplus compatibility. Also added ifndef for
#define EAFNOSUPPORT WSAEAFNOSUPPORT
required by inet_pton.c

Location:
common/trunk/src
Files:
10 modified

Legend:

Unmodified
Added
Removed
  • common/trunk/src/config_win32.h

    r197 r205  
    202202 
    203203#define ECONNREFUSED    WSAECONNREFUSED 
    204 #define ENETUNREACH     WSAENETUNREACH 
     204#define ENETUNREACH             WSAENETUNREACH 
    205205#define EHOSTUNREACH    WSAEHOSTUNREACH 
    206 #define EWOULDBLOCK     WSAEWOULDBLOCK 
     206#define EWOULDBLOCK             WSAEWOULDBLOCK 
     207 
     208#ifndef EAFNOSUPPORT 
     209#define EAFNOSUPPORT    WSAEAFNOSUPPORT 
     210#endif 
    207211 
    208212#define M_PI            3.14159265358979323846 
  • common/trunk/src/debug.h

    r3 r205  
    4444 
    4545#define debug_msg       _dprintf("%s:%d ", __FILE__, __LINE__), _dprintf 
     46 
     47#if defined(__cplusplus) 
     48extern "C" { 
     49#endif 
     50 
    4651void     _dprintf(const char *format, ...); 
    4752 
     53#if defined(__cplusplus) 
     54} 
    4855#endif 
     56 
     57#endif 
  • common/trunk/src/inet_ntop.h

    r203 r205  
     1#if defined(__cplusplus) 
     2extern "C" { 
     3#endif 
    14 
    25const char *inet_ntop(int af, const void *src, char *dst, size_t size); 
    36 
     7#if defined(__cplusplus) 
     8} 
     9#endif 
  • common/trunk/src/inet_pton.h

    r203 r205  
     1#if defined(__cplusplus) 
     2extern "C" { 
     3#endif 
    14 
    25int inet_pton(int af, const char *src, void *dst); 
    36 
     7#if defined(__cplusplus) 
     8} 
     9#endif 
  • common/trunk/src/mbus.h

    r169 r205  
    4343struct mbus; 
    4444 
     45#if defined(__cplusplus) 
     46extern "C" { 
     47#endif 
     48 
    4549struct mbus *mbus_init(void  (*cmd_handler)(char *src, char *cmd, char *arg, void *dat),  
    4650                       void  (*err_handler)(int seqnum, int reason)); 
     
    6569int          mbus_waiting_ack(struct mbus *m); 
    6670 
     71#if defined(__cplusplus) 
     72} 
    6773#endif 
     74 
     75#endif 
  • common/trunk/src/mbus_config.h

    r192 r205  
    5252}; 
    5353 
     54#if defined(__cplusplus) 
     55extern "C" { 
     56#endif 
    5457 
    5558char *mbus_new_encrkey(void); 
     
    6063void mbus_get_hashkey(struct mbus_config *m, struct mbus_key *key); 
    6164 
     65#if defined(__cplusplus) 
     66} 
    6267#endif 
     68 
     69#endif 
  • common/trunk/src/memory.h

    r185 r205  
    4545#define xstrdup(x)      _xstrdup(x,__FILE__,__LINE__) 
    4646 
     47#if defined(__cplusplus) 
     48extern "C" { 
     49#endif 
     50 
    4751/* Debug Functions */ 
    4852void     xdoneinit(void); 
     
    6064void     _block_free(void *p, int size, int line); 
    6165 
     66#if defined(__cplusplus) 
     67} 
     68#endif 
     69 
    6270#endif  
  • common/trunk/src/net_udp.h

    r191 r205  
    3939typedef struct _socket_udp socket_udp; 
    4040 
     41#if defined(__cplusplus) 
     42extern "C" { 
     43#endif 
     44 
    4145socket_udp *udp_init(char *addr, u_int16 rx_port, u_int16 tx_port, int ttl); 
    4246void        udp_exit(socket_udp *s); 
     
    4953char       *udp_host_addr(socket_udp *s); 
    5054 
     55#if defined(__cplusplus) 
     56} 
    5157#endif 
    5258 
     59#endif 
     60 
  • common/trunk/src/qfDES.h

    r3 r205  
    1111#define      _qfDES_h_ 
    1212 
     13#if defined(__cplusplus) 
     14extern "C" { 
     15#endif 
     16 
    1317/* what */ 
    1418typedef enum QFDES_what_e {qfDES_encrypt, qfDES_decrypt} QFDES_what; 
     
    2226/* key/IV generation */ 
    2327typedef enum QFDES_generate_e {qfDES_key, qfDES_iv} QFDES_generate; 
     28 
    2429 
    2530/* This does it all */ 
     
    4146/* Padded [m|re]alloc() */ 
    4247unsigned char    qfDES_setPad (unsigned char pad); 
     48 
    4349#define qfDES_padSpace() qfDES_setPad((unsigned char) ' ') 
    4450#define qfDES_padZero() qfDES_setPad((unsigned char) '\0') 
     
    5258 
    5359unsigned char *qfDES_generate (const QFDES_generate what); /* returns a pointer to static memory */ 
     60 
    5461#define qfDES_generateKey() qfDES_generate(qfDES_key) 
    5562#define qfDES_generateIV() qfDES_generate(qfDES_iv) 
     
    5764int qfDES_checkWeakKeys (unsigned char *key); 
    5865 
     66#if defined(__cplusplus) 
     67} 
     68#endif 
     69 
    5970#endif /* !_qfDES_h_ */ 
  • common/trunk/src/util.h

    r75 r205  
    4141#define _UTIL_H 
    4242 
     43#if defined(__cplusplus) 
     44extern "C" { 
     45#endif 
     46 
    4347#define block_alloc(x)  _block_alloc(x,__FILE__,__LINE__) 
    4448#define block_free(x,y) _block_free(x,y,__LINE__) 
     
    5660int overlapping_words(const char *s1, const char *s2, int max_words); 
    5761 
     62#if defined(__cplusplus) 
     63} 
     64#endif 
     65 
    5866#endif