Changeset 988 for vendor/current/lib/replace/replace.h
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/lib/replace/replace.h
r860 r988 42 42 #include <errno.h> 43 43 44 #ifndef HAVE_DECL_EWOULDBLOCK 45 #define EWOULDBLOCK EAGAIN 46 #endif 47 44 48 #if defined(_MSC_VER) || defined(__MINGW32__) 45 49 #include "win32_replace.h" … … 47 51 48 52 49 #ifdef HAVE_STDINT_H 53 #ifdef HAVE_INTTYPES_H 54 #define __STDC_FORMAT_MACROS 55 #include <inttypes.h> 56 #elif HAVE_STDINT_H 50 57 #include <stdint.h> 51 58 /* force off HAVE_INTTYPES_H so that roken doesn't try to include both, 52 59 which causes a warning storm on irix */ 53 60 #undef HAVE_INTTYPES_H 54 #elif HAVE_INTTYPES_H 55 #define __STDC_FORMAT_MACROS 56 #include <inttypes.h> 61 #endif 62 63 #ifdef HAVE_MALLOC_H 64 #include <malloc.h> 57 65 #endif 58 66 59 67 #ifndef __PRI64_PREFIX 60 # if __WORDSIZE == 64 68 # if __WORDSIZE == 64 && ! defined __APPLE__ 61 69 # define __PRI64_PREFIX "l" 62 70 # else … … 105 113 #endif 106 114 115 #ifndef SCNd8 116 # define SCNd8 "hhd" 117 #endif 118 #ifndef SCNd16 119 # define SCNd16 "hd" 120 #endif 121 #ifndef SCNd32 122 # define SCNd32 "d" 123 #endif 124 #ifndef SCNd64 125 # define SCNd64 __PRI64_PREFIX "d" 126 #endif 127 128 #ifndef SCNi8 129 # define SCNi8 "hhi" 130 #endif 131 #ifndef SCNi16 132 # define SCNi16 "hi" 133 #endif 134 #ifndef SCNi32 135 # define SCNi32 "i" 136 #endif 137 #ifndef SCNi64 138 # define SCNi64 __PRI64_PREFIX "i" 139 #endif 140 141 #ifndef SCNu8 142 # define SCNu8 "hhu" 143 #endif 144 #ifndef SCNu16 145 # define SCNu16 "hu" 146 #endif 147 #ifndef SCNu32 148 # define SCNu32 "u" 149 #endif 150 #ifndef SCNu64 151 # define SCNu64 __PRI64_PREFIX "u" 152 #endif 153 154 #ifdef HAVE_BSD_STRING_H 155 #include <bsd/string.h> 156 #endif 157 158 #ifdef HAVE_BSD_UNISTD_H 159 #include <bsd/unistd.h> 160 #endif 161 107 162 #ifdef HAVE_STRING_H 108 163 #include <string.h> … … 115 170 #ifdef HAVE_SYS_TYPES_H 116 171 #include <sys/types.h> 172 #endif 173 174 #ifdef HAVE_SETPROCTITLE_H 175 #include <setproctitle.h> 117 176 #endif 118 177 … … 154 213 #endif 155 214 215 #ifndef HAVE_MEMALIGN 216 #define memalign rep_memalign 217 void *rep_memalign(size_t boundary, size_t size); 218 #endif 219 156 220 #ifndef HAVE_MKTIME 157 221 #define mktime rep_mktime … … 284 348 #define strcasestr rep_strcasestr 285 349 char *rep_strcasestr(const char *haystack, const char *needle); 350 #endif 351 352 #ifndef HAVE_STRSEP 353 #define strsep rep_strsep 354 char *rep_strsep(char **pps, const char *delim); 286 355 #endif 287 356 … … 453 522 #endif 454 523 455 #if def REPLACE_STRPTIME524 #ifndef HAVE_WORKING_STRPTIME 456 525 #define strptime rep_strptime 457 526 struct tm; … … 550 619 #endif 551 620 552 #if !defined(HAVE_STRERROR_R) || !defined(STRERROR_R_PROTO_COMPATIBLE) 553 #undef strerror_r 621 #ifndef HAVE_STRERROR_R 554 622 #define strerror_r rep_strerror_r 555 623 int rep_strerror_r(int errnum, char *buf, size_t buflen); … … 586 654 #ifndef UINT64_MAX 587 655 #define UINT64_MAX ((uint64_t)-1) 656 #endif 657 658 #ifndef INT64_MAX 659 #define INT64_MAX 9223372036854775807LL 588 660 #endif 589 661 … … 821 893 #endif 822 894 823 #if !defined(getpass) 824 #ifdef REPLACE_GETPASS 825 #if defined(REPLACE_GETPASS_BY_GETPASSPHRASE) 826 #define getpass(prompt) getpassphrase(prompt) 827 #else 828 #define getpass(prompt) rep_getpass(prompt) 829 char *rep_getpass(const char *prompt); 830 #endif 831 #endif 895 #ifndef HAVE_GETPEEREID 896 #define getpeereid rep_getpeereid 897 int rep_getpeereid(int s, uid_t *uid, gid_t *gid); 898 #endif 899 900 #ifndef HAVE_USLEEP 901 #define usleep rep_usleep 902 typedef long useconds_t; 903 int usleep(useconds_t); 904 #endif 905 906 #ifndef HAVE_SETPROCTITLE 907 #define setproctitle rep_setproctitle 908 void rep_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); 909 #endif 910 911 bool nss_wrapper_enabled(void); 912 bool nss_wrapper_hosts_enabled(void); 913 bool socket_wrapper_enabled(void); 914 bool uid_wrapper_enabled(void); 915 916 /* Needed for Solaris atomic_add_XX functions. */ 917 #if defined(HAVE_SYS_ATOMIC_H) 918 #include <sys/atomic.h> 832 919 #endif 833 920
Note:
See TracChangeset
for help on using the changeset viewer.