GRU - Generic Reusable Utilities
gru_portable.h
Go to the documentation of this file.
1 
16 #if !defined(_WIN32) && !defined(_WIN64)
17 #define likely(x) __builtin_expect((x), 1)
18 #define unlikely(x) __builtin_expect((x), 0)
19 #define gru_export
20 #define gru_restrict restrict
21 #define gru_attr_unused __attribute__((unused))
22 #else
23 #define likely(x) (x)
24 #define unlikely(x) (x)
25 #define bzero(b, len) (memset((b), '\0', (len)), (void) 0)
26 #define strcasecmp _stricmp
27 #define strncasecmp _strnicmp
28 #define strdup _strdup
29 #define access _access
30 #define fileno _fileno
31 #define strerror_r(errno, buf, len) strerror_s(buf, len, errno)
32 #define gru_export __declspec(dllexport)
33 #define gru_restrict
34 #define gru_attr_unused
35 
36 extern int asprintf(char **strp, const char *fmt, ...);
37 extern int gettimeofday(struct timeval *tp, struct timezone *tzp);
38 #endif
int asprintf(char **strp, const char *fmt,...)
Definition: asprintf.c:20