src/platform_windows.h
author vb
Sun, 15 Mar 2015 10:14:43 +0100
changeset 113 4bee48270834
parent 89 aef5a4bc78f3
child 125 5119178815d8
permissions -rw-r--r--
...
     1 #pragma once
     2 
     3 // Windows platform specifica
     4 
     5 #pragma warning(disable : 4996)
     6 
     7 #ifdef __cplusplus
     8 extern "C" {
     9 #endif
    10 
    11 #define RTLD_LAZY 1
    12 
    13 void *dlopen(const char *filename, int flag);
    14 int dlclose(void *handle);
    15 void *dlsym(void *handle, const char *symbol);
    16 
    17 #ifndef strdup
    18 #define strdup(A) _strdup((A))
    19 #endif
    20 #ifndef snprintf
    21 #define snprintf(...) _snprintf(__VA_ARGS__)
    22 #endif
    23 #ifndef strtok_r
    24 #define strtok_r(A, B, C) strtok_s((A), (B), (C))
    25 #endif
    26 #ifndef strncasecmp
    27 #define strncasecmp(A, B, C) _strnicmp((A), (B), (C))
    28 #endif
    29 #ifndef gmtime_r
    30 #define gmtime_r(A, B) gmtime_s((B), (A))
    31 #endif
    32 
    33 char *strndup(const char *s1, size_t n);
    34 
    35 const char *windoze_local_db(void);
    36 const char *windoze_system_db(void);
    37 const char *gpg_conf(void);
    38 
    39 long random(void);
    40 
    41 #ifdef __cplusplus
    42 }
    43 #endif