Changeset 96013 in vbox for trunk/include/iprt/nocrt
- Timestamp:
- Aug 3, 2022 9:56:01 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152807
- Location:
- trunk/include/iprt/nocrt
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nocrt/ctype.h
r95975 r96013 45 45 #define islower(a_ch) RT_C_IS_LOWER(a_ch) 46 46 47 #define tolower(a_ch) RT_C_TO_LOWER(a_ch) 48 #define toupper(a_ch) RT_C_TO_UPPER(a_ch) 49 47 50 #endif /* !IPRT_INCLUDED_nocrt_ctype_h */ 48 51 -
trunk/include/iprt/nocrt/fcntl.h
r95975 r96013 30 30 #endif 31 31 32 #include <iprt/nocrt/time.h> /* to establish the timespec and timeval types before iprt/file.h includes iprt/time.h */ 32 33 #include <iprt/file.h> 33 34 -
trunk/include/iprt/nocrt/io.h
r95976 r96013 30 30 #endif 31 31 32 #include <fcntl.h> 33 #include <sys/stat.h> 32 #include <iprt/nocrt/fcntl.h> 33 #include <iprt/nocrt/sys/stat.h> 34 #include <iprt/nocrt/unistd.h> 34 35 35 36 -
trunk/include/iprt/nocrt/math.h
r95975 r96013 87 87 #endif 88 88 89 #if 1 /* __ISO_C_VISIBLE >= 1999*/90 #define FP_ILOGB0 (-__INT_MAX)91 #define FP_ILOGBNAN __INT_MAX92 93 #ifdef __MATH_BUILTIN_CONSTANTS94 #define HUGE_VALF __builtin_huge_valf()95 #define HUGE_VALL __builtin_huge_vall()96 #define INFINITY __builtin_inf()97 #define NAN __builtin_nan("")98 #else99 #define HUGE_VALF (float)HUGE_VAL100 #define HUGE_VALL (long double)HUGE_VAL101 #define INFINITY HUGE_VALF102 #define NAN (__nan.__uf)103 #endif /* __MATH_BUILTIN_CONSTANTS */104 105 #ifndef IPRT_NO_CRT106 #define MATH_ERRNO 1107 #endif108 #define MATH_ERREXCEPT 2109 #define math_errhandling MATH_ERREXCEPT110 111 /* XXX We need a <machine/math.h>. */112 #if defined(__ia64__) || defined(__sparc64__)113 #define FP_FAST_FMA114 #endif115 #ifdef __ia64__116 #define FP_FAST_FMAL117 #endif118 #define FP_FAST_FMAF119 120 /* Symbolic constants to classify floating point numbers. */121 #define FP_INFINITE 0x01122 #define FP_NAN 0x02123 #define FP_NORMAL 0x04124 #define FP_SUBNORMAL 0x08125 #define FP_ZERO 0x10126 #define fpclassify(x) \127 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__fpclassifyf)(x) \128 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__fpclassifyd)(x) \129 : RT_NOCRT(__fpclassifyl)(x))130 131 #define isfinite(x) \132 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isfinitef)(x) \133 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__isfinite)(x) \134 : RT_NOCRT(__isfinitel)(x))135 #define isinf(x) \136 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isinff)(x) \137 : (sizeof (x) == sizeof (double)) ? isinf(x) \138 : RT_NOCRT(__isinfl)(x))139 #define isnan(x) \140 ((sizeof (x) == sizeof (float)) ? isnanf(x) \141 : (sizeof (x) == sizeof (double)) ? isnan(x) \142 : RT_NOCRT(__isnanl)(x))143 #define isnormal(x) \144 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isnormalf)(x) \145 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__isnormal)(x) \146 : RT_NOCRT(__isnormall)(x))147 148 #ifdef __MATH_BUILTIN_RELOPS149 #define isgreater(x, y) __builtin_isgreater((x), (y))150 #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y))151 #define isless(x, y) __builtin_isless((x), (y))152 #define islessequal(x, y) __builtin_islessequal((x), (y))153 #define islessgreater(x, y) __builtin_islessgreater((x), (y))154 #define isunordered(x, y) __builtin_isunordered((x), (y))155 #else156 #define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y))157 #define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y))158 #define isless(x, y) (!isunordered((x), (y)) && (x) < (y))159 #define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y))160 #define islessgreater(x, y) (!isunordered((x), (y)) && \161 ((x) > (y) || (y) > (x)))162 #define isunordered(x, y) (isnan(x) || isnan(y))163 #endif /* __MATH_BUILTIN_RELOPS */164 165 #define signbit(x) \166 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__signbitf)(x) \167 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__signbit)(x) \168 : RT_NOCRT(__signbitl)(x))169 170 typedef double double_t;171 typedef float float_t;172 #endif /* __ISO_C_VISIBLE >= 1999 */173 174 89 /* 175 90 * XOPEN/SVID … … 269 184 double RT_NOCRT(fma)(double, double, double); 270 185 double RT_NOCRT(hypot)(double, double); 271 int RT_NOCRT(ilogb)(double) __pure2;272 /*int isinf(double) __pure2;*/ 273 /*int isnan(double) __pure2;*/ 186 int RT_NOCRT(ilogb)(double) __pure2; 187 int RT_NOCRT(isinf)(double) __pure2; 188 int RT_NOCRT(isnan)(double) __pure2; 274 189 double RT_NOCRT(lgamma)(double); 275 190 long long RT_NOCRT(llrint)(double); … … 557 472 long double RT_NOCRT(gammal)(long double); 558 473 #endif 474 475 559 476 RT_C_DECLS_END 560 477 478 479 /* bird 2022-08-03: moved this block down so we can prototype isnan & isinf without runnning into the macro forms. */ 480 #if 1 /* __ISO_C_VISIBLE >= 1999*/ 481 #define FP_ILOGB0 (-__INT_MAX) 482 #define FP_ILOGBNAN __INT_MAX 483 484 #ifdef __MATH_BUILTIN_CONSTANTS 485 #define HUGE_VALF __builtin_huge_valf() 486 #define HUGE_VALL __builtin_huge_vall() 487 #define INFINITY __builtin_inf() 488 #define NAN __builtin_nan("") 489 #else 490 #define HUGE_VALF (float)HUGE_VAL 491 #define HUGE_VALL (long double)HUGE_VAL 492 #define INFINITY HUGE_VALF 493 #define NAN (__nan.__uf) 494 #endif /* __MATH_BUILTIN_CONSTANTS */ 495 496 #ifndef IPRT_NO_CRT 497 #define MATH_ERRNO 1 498 #endif 499 #define MATH_ERREXCEPT 2 500 #define math_errhandling MATH_ERREXCEPT 501 502 /* XXX We need a <machine/math.h>. */ 503 #if defined(__ia64__) || defined(__sparc64__) 504 #define FP_FAST_FMA 505 #endif 506 #ifdef __ia64__ 507 #define FP_FAST_FMAL 508 #endif 509 #define FP_FAST_FMAF 510 511 /* Symbolic constants to classify floating point numbers. */ 512 #define FP_INFINITE 0x01 513 #define FP_NAN 0x02 514 #define FP_NORMAL 0x04 515 #define FP_SUBNORMAL 0x08 516 #define FP_ZERO 0x10 517 #define fpclassify(x) \ 518 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__fpclassifyf)(x) \ 519 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__fpclassifyd)(x) \ 520 : RT_NOCRT(__fpclassifyl)(x)) 521 522 #define isfinite(x) \ 523 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isfinitef)(x) \ 524 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__isfinite)(x) \ 525 : RT_NOCRT(__isfinitel)(x)) 526 #define isinf(x) \ 527 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isinff)(x) \ 528 : (sizeof (x) == sizeof (double)) ? isinf(x) \ 529 : RT_NOCRT(__isinfl)(x)) 530 #define isnan(x) \ 531 ((sizeof (x) == sizeof (float)) ? isnanf(x) \ 532 : (sizeof (x) == sizeof (double)) ? isnan(x) \ 533 : RT_NOCRT(__isnanl)(x)) 534 #define isnormal(x) \ 535 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__isnormalf)(x) \ 536 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__isnormal)(x) \ 537 : RT_NOCRT(__isnormall)(x)) 538 539 #ifdef __MATH_BUILTIN_RELOPS 540 #define isgreater(x, y) __builtin_isgreater((x), (y)) 541 #define isgreaterequal(x, y) __builtin_isgreaterequal((x), (y)) 542 #define isless(x, y) __builtin_isless((x), (y)) 543 #define islessequal(x, y) __builtin_islessequal((x), (y)) 544 #define islessgreater(x, y) __builtin_islessgreater((x), (y)) 545 #define isunordered(x, y) __builtin_isunordered((x), (y)) 546 #else 547 #define isgreater(x, y) (!isunordered((x), (y)) && (x) > (y)) 548 #define isgreaterequal(x, y) (!isunordered((x), (y)) && (x) >= (y)) 549 #define isless(x, y) (!isunordered((x), (y)) && (x) < (y)) 550 #define islessequal(x, y) (!isunordered((x), (y)) && (x) <= (y)) 551 #define islessgreater(x, y) (!isunordered((x), (y)) && \ 552 ((x) > (y) || (y) > (x))) 553 #define isunordered(x, y) (isnan(x) || isnan(y)) 554 #endif /* __MATH_BUILTIN_RELOPS */ 555 556 #define signbit(x) \ 557 ((sizeof (x) == sizeof (float)) ? RT_NOCRT(__signbitf)(x) \ 558 : (sizeof (x) == sizeof (double)) ? RT_NOCRT(__signbit)(x) \ 559 : RT_NOCRT(__signbitl)(x)) 560 561 typedef double double_t; 562 typedef float float_t; 563 #endif /* __ISO_C_VISIBLE >= 1999 */ 561 564 562 565 … … 660 663 # define drem RT_NOCRT(drem) 661 664 # define finite RT_NOCRT(finite) 665 # define isinf RT_NOCRT(isinf) 666 # define isnan RT_NOCRT(isnan) 662 667 # define isnanf RT_NOCRT(isnanf) 663 668 # define gamma_r RT_NOCRT(gamma_r) -
trunk/include/iprt/nocrt/stdio.h
r95985 r96013 31 31 32 32 #include <iprt/stream.h> 33 #include <iprt/nocrt/sys/types.h> /* errno_t, off_t */ 33 34 34 35 typedef RTFOFF fpos_t; 36 35 37 36 38 #ifdef IPRT_NO_CRT_FOR_3RD_PARTY … … 39 41 * check each printf and fprintf call as IPRT isn't 100% compatible... 40 42 */ 43 RT_C_DECLS_BEGIN 44 41 45 typedef struct RTSTREAM FILE; 42 46 # define stdin g_pStdIn … … 55 59 FILE *RT_NOCRT(fopen)(const char *pszFilename, const char *pszMode); 56 60 FILE *RT_NOCRT(fdopen)(int fd, const char *pszMode); 61 FILE *RT_NOCRT(tmpfile)(void); 62 errno_t RT_NOCRT(tmpfile_s)(FILE **ppFile); 63 int RT_NOCRT(fileno)(FILE *pFile); 57 64 int RT_NOCRT(fclose)(FILE *pFile); 58 65 int RT_NOCRT(fflush)(FILE *pFile); 59 66 int RT_NOCRT(setvbuf)(FILE *pFile, char *pchBuf, int iBufferingType, size_t cbBuf); 67 int RT_NOCRT(fseek)(FILE *pFile, long, int); 68 int RT_NOCRT(fseeko)(FILE *pFile, off_t, int); 69 long RT_NOCRT(ftell)(FILE *pFile); 70 off_t RT_NOCRT(ftello)(FILE *pFile); 60 71 size_t RT_NOCRT(fwrite)(void const *pvBuf, size_t cbItem, size_t cItems, FILE *pFile); 72 int RT_NOCRT(fputs)(const char *psz, FILE *pFile); 73 int RT_NOCRT(puts)(const char *psz); 74 int RT_NOCRT(fputc)(int, FILE *pFile); 61 75 size_t RT_NOCRT(fread)(void *pvBuf, size_t cbItem, size_t cItems, FILE *pFile); 62 76 int RT_NOCRT(fgetc)(FILE *pFile); … … 64 78 int RT_NOCRT(ferror)(FILE *pFile); 65 79 void RT_NOCRT(clearerr)(FILE *pFile); 80 int RT_NOCRT(remove)(const char *pszFilename); 81 int RT_NOCRT(sscanf)(const char *pszString, const char *pszFormat, ...); 82 66 83 # ifndef RT_NOCRT_EOF /* also in string */ 67 84 # define RT_NOCRT_EOF (-1) … … 81 98 FILE *RT_NOCRT(_fopen)(const char *pszFilename, const char *pszMode); 82 99 FILE *RT_NOCRT(_fdopen)(int fd, const char *pszMode); 100 FILE *RT_NOCRT(_tmpfile)(void); 101 errno_t RT_NOCRT(_tmpfile_s)(FILE **ppFile); 102 int RT_NOCRT(_fileno)(FILE *pFile); 83 103 int RT_NOCRT(_fclose)(FILE *pFile); 84 104 int RT_NOCRT(_fflush)(FILE *pFile); 85 105 int RT_NOCRT(_setvbuf)(FILE *pFile, char *pchBuf, int iBufferingType, size_t cbBuf); 106 int RT_NOCRT(_fseek)(FILE *pFile, long, int); 107 int RT_NOCRT(_fseeko)(FILE *pFile, off_t, int); 108 long RT_NOCRT(_ftell)(FILE *pFile); 109 off_t RT_NOCRT(_ftello)(FILE *pFile); 110 size_t RT_NOCRT(_fwrite)(void const *pvBuf, size_t cbItem, size_t cItems, FILE *pFile); 111 int RT_NOCRT(_fputs)(const char *psz, FILE *pFile); 112 int RT_NOCRT(_fputc)(int, FILE *pFile); 86 113 size_t RT_NOCRT(_fread)(void *pvBuf, size_t cbItem, size_t cItems, FILE *pFile); 87 size_t RT_NOCRT(_fwrite)(void const *pvBuf, size_t cbItem, size_t cItems, FILE *pFile);88 114 int RT_NOCRT(_fgetc)(FILE *pFile); 89 115 int RT_NOCRT(_getc)(FILE *pFile); 90 116 int RT_NOCRT(_ferror)(FILE *pFile); 91 117 void RT_NOCRT(_clearerr)(FILE *pFile); 118 int RT_NOCRT(_remove)(const char *pszFilename); 119 int RT_NOCRT(_sscanf)(const char *pszString, const char *pszFormat, ...); 92 120 93 121 # define _IONBF (1) /**< No buffering. */ … … 97 125 /* Aliases: */ 98 126 # if !defined(RT_WITHOUT_NOCRT_WRAPPERS) && !defined(RT_WITHOUT_NOCRT_WRAPPER_ALIASES) 99 # define snprintf RT_NOCRT(snprintf)100 # define vsnprintf RT_NOCRT(vsnprintf)101 # define scprintf RT_NOCRT(scprintf)102 # define vscprintf RT_NOCRT(vscprintf)127 # define snprintf RT_NOCRT(snprintf) 128 # define vsnprintf RT_NOCRT(vsnprintf) 129 # define scprintf RT_NOCRT(scprintf) 130 # define vscprintf RT_NOCRT(vscprintf) 103 131 104 # define fopen RT_NOCRT(fopen) 105 # define fdopen RT_NOCRT(fdopen) 106 # define fclose RT_NOCRT(fclose) 107 # define fflush RT_NOCRT(fflush) 108 # define setvbuf RT_NOCRT(setvbuf) 109 # define fread RT_NOCRT(fread) 110 # define fwrite RT_NOCRT(fwrite) 111 # define fgetc RT_NOCRT(fgetc) 112 # define getc RT_NOCRT(getc) 113 # define ferror RT_NOCRT(ferror) 114 # define clearerr RT_NOCRT(clearerr) 132 # define fopen RT_NOCRT(fopen) 133 # define fdopen RT_NOCRT(fdopen) 134 # define tmpfile RT_NOCRT(tmpfile) 135 # define tmpfile_s RT_NOCRT(tmpfile_s) 136 # define fileno RT_NOCRT(fileno) 137 # define fclose RT_NOCRT(fclose) 138 # define fflush RT_NOCRT(fflush) 139 # define setvbuf RT_NOCRT(setvbuf) 140 # define fseek RT_NOCRT(fseek) 141 # define fseeko RT_NOCRT(fseeko) 142 # define ftell RT_NOCRT(ftell) 143 # define ftello RT_NOCRT(ftello) 144 # define fwrite RT_NOCRT(fwrite) 145 # define fputs RT_NOCRT(fputs) 146 # define fputc RT_NOCRT(fputc) 147 # define fread RT_NOCRT(fread) 148 # define fgetc RT_NOCRT(fgetc) 149 # define getc RT_NOCRT(getc) 150 # define ferror RT_NOCRT(ferror) 151 # define clearerr RT_NOCRT(clearerr) 152 # define remove RT_NOCRT(remove) 153 # define sscanf RT_NOCRT(sscanf) 115 154 116 155 117 156 /* Underscored variants: */ 118 # define _snprintf RT_NOCRT(snprintf)119 # define _vsnprintf RT_NOCRT(vsnprintf)120 # define _scprintf RT_NOCRT(scprintf)121 # define _vscprintf RT_NOCRT(vscprintf)157 # define _snprintf RT_NOCRT(snprintf) 158 # define _vsnprintf RT_NOCRT(vsnprintf) 159 # define _scprintf RT_NOCRT(scprintf) 160 # define _vscprintf RT_NOCRT(vscprintf) 122 161 123 # define _fopen RT_NOCRT(fopen) 124 # define _fdopen RT_NOCRT(fdopen) 125 # define _fclose RT_NOCRT(fclose) 126 # define _flush RT_NOCRT(fflush) 127 # define _setvbuf RT_NOCRT(setvbuf) 128 # define _fread RT_NOCRT(fread) 129 # define _fwrite RT_NOCRT(fwrite) 130 # define _fgetc RT_NOCRT(fgetc) 131 # define _getc RT_NOCRT(getc) 132 # define _ferror RT_NOCRT(ferror) 133 # define _clearerr RT_NOCRT(clearerr) 162 # define _fopen RT_NOCRT(fopen) 163 # define _fdopen RT_NOCRT(fdopen) 164 # define _tmpfile RT_NOCRT(tmpfile) 165 # define _tmpfile_s RT_NOCRT(tmpfile_s) 166 # define _fileno RT_NOCRT(fileno) 167 # define _fclose RT_NOCRT(fclose) 168 # define _flush RT_NOCRT(fflush) 169 # define _setvbuf RT_NOCRT(setvbuf) 170 # define _fseek RT_NOCRT(fseek) 171 # define _fseeko RT_NOCRT(fseeko) 172 # define _ftell RT_NOCRT(ftell) 173 # define _ftello RT_NOCRT(ftello) 174 # define _fwrite RT_NOCRT(fwrite) 175 # define _fputs RT_NOCRT(fputs) 176 # define _fputc RT_NOCRT(fputc) 177 # define _fread RT_NOCRT(fread) 178 # define _fgetc RT_NOCRT(fgetc) 179 # define _getc RT_NOCRT(getc) 180 # define _ferror RT_NOCRT(ferror) 181 # define _clearerr RT_NOCRT(clearerr) 182 # define _remove RT_NOCRT(remove) 183 # define _sscanf RT_NOCRT(_sscanf) 134 184 # endif 185 186 RT_C_DECLS_END 135 187 136 188 #endif -
trunk/include/iprt/nocrt/stdlib.h
r95975 r96013 85 85 } 86 86 87 int RT_NOCRT(abs)(int); 88 long RT_NOCRT(labs)(long); 89 long RT_NOCRT(labs)(long); 90 long long RT_NOCRT(llabs)(long long); 91 int RT_NOCRT(rand)(void); 92 void RT_NOCRT(srand)(unsigned); 93 long RT_NOCRT(strtol)(const char *psz, char **ppszNext, int iBase); 94 long long RT_NOCRT(strtoll)(const char *psz, char **ppszNext, int iBase); 95 unsigned long RT_NOCRT(strtoul)(const char *psz, char **ppszNext, int iBase); 96 unsigned long long RT_NOCRT(strtoull)(const char *psz, char **ppszNext, int iBase); 97 int RT_NOCRT(atoi)(const char *psz); 98 double RT_NOCRT(strtod)(const char *psz, char **ppszNext); 99 double RT_NOCRT(atof)(const char *psz); 87 100 void *RT_NOCRT(bsearch)(const void *pvKey, const void *pvBase, size_t cEntries, size_t cbEntry, 88 101 int (*pfnCompare)(const void *pv1, const void *pv2)); … … 124 137 } 125 138 139 int RT_NOCRT(_abs)(int); 140 long RT_NOCRT(_labs)(long); 141 long RT_NOCRT(_labs)(long); 142 long long RT_NOCRT(_llabs)(long long); 143 int RT_NOCRT(_rand)(void); 144 void RT_NOCRT(_srand)(unsigned); 145 long RT_NOCRT(_strtol)(const char *psz, char **ppszNext, int iBase); 146 long long RT_NOCRT(_strtoll)(const char *psz, char **ppszNext, int iBase); 147 unsigned long RT_NOCRT(_strtoul)(const char *psz, char **ppszNext, int iBase); 148 unsigned long long RT_NOCRT(_strtoull)(const char *psz, char **ppszNext, int iBase); 149 int RT_NOCRT(_atoi)(const char *psz); 150 double RT_NOCRT(_strtod)(const char *psz, char **ppszNext); 151 double RT_NOCRT(_atof)(const char *psz); 126 152 void *RT_NOCRT(_bsearch)(const void *pvKey, const void *pvBase, size_t cEntries, size_t cbEntry, 127 153 int (*pfnCompare)(const void *pv1, const void *pv2)); … … 143 169 */ 144 170 # if !defined(RT_WITHOUT_NOCRT_WRAPPERS) && !defined(RT_WITHOUT_NOCRT_WRAPPER_ALIASES) 145 # define malloc RT_NOCRT(malloc) 146 # define calloc RT_NOCRT(calloc) 147 # define realloc RT_NOCRT(realloc) 148 # define free RT_NOCRT(free) 149 # define getenv RT_NOCRT(getenv) 150 # define bsearch RT_NOCRT(bsearch) 151 # define exit RT_NOCRT(exit) 152 # define abort RT_NOCRT(abort) 153 154 # define _malloc RT_NOCRT(malloc) 155 # define _calloc RT_NOCRT(calloc) 156 # define _realloc RT_NOCRT(realloc) 157 # define _free RT_NOCRT(free) 158 # define _getenv RT_NOCRT(getenv) 159 # define _bsearch RT_NOCRT(bsearch) 160 # define _exit RT_NOCRT(exit) 161 # define _abort RT_NOCRT(abort) 162 # endif 171 # define malloc RT_NOCRT(malloc) 172 # define calloc RT_NOCRT(calloc) 173 # define realloc RT_NOCRT(realloc) 174 # define free RT_NOCRT(free) 175 # define getenv RT_NOCRT(getenv) 176 # define bsearch RT_NOCRT(bsearch) 177 # define exit RT_NOCRT(exit) 178 # define abort RT_NOCRT(abort) 179 # define rand RT_NOCRT(rand) 180 # define srand RT_NOCRT(srand) 181 # define strtol RT_NOCRT(strtol) 182 # define strtoll RT_NOCRT(strtoll) 183 # define strtoul RT_NOCRT(strtoul) 184 # define strtoull RT_NOCRT(strtoull) 185 # define atoi RT_NOCRT(atoi) 186 # define strtod RT_NOCRT(strtod) 187 # define atof RT_NOCRT(atof) 188 189 # define _malloc RT_NOCRT(malloc) 190 # define _calloc RT_NOCRT(calloc) 191 # define _realloc RT_NOCRT(realloc) 192 # define _free RT_NOCRT(free) 193 # define _getenv RT_NOCRT(getenv) 194 # define _bsearch RT_NOCRT(bsearch) 195 # define _exit RT_NOCRT(exit) 196 # define _abort RT_NOCRT(abort) 197 # define _strtol RT_NOCRT(strtol) 198 # define _strtoll RT_NOCRT(strtoll) 199 # define _strtoul RT_NOCRT(strtoul) 200 # define _strtoull RT_NOCRT(strtoull) 201 # define _atoi RT_NOCRT(atoi) 202 # define _strtod RT_NOCRT(strtod) 203 # define _atof RT_NOCRT(atof) 204 # endif 163 205 164 206 #endif /* IPRT_NO_CRT_FOR_3RD_PARTY */ -
trunk/include/iprt/nocrt/string.h
r95985 r96013 77 77 #endif 78 78 size_t RT_NOCRT(strxfrm)(char *pszDst, const char *pszSrc, size_t cch); 79 long RT_NOCRT(strtol)(const char *pszDst, char **ppszNext, int iBase);80 long long RT_NOCRT(strtoll)(const char *pszDst, char **ppszNext, int iBase);81 unsigned long RT_NOCRT(strtoul)(const char *pszDst, char **ppszNext, int iBase);82 unsigned long long RT_NOCRT(strtoull)(const char *pszDst, char **ppszNext, int iBase);83 79 84 80 size_t RT_NOCRT(wcslen)(const wchar_t *pwsz); 85 81 wchar_t *RT_NOCRT(wcscat)(wchar_t *pwszDst, const wchar_t *pwszSrc); 86 wchar_t *RT_NOCRT(wcschr)(const wchar_t *pwsz Dst, wchar_t wc);82 wchar_t *RT_NOCRT(wcschr)(const wchar_t *pwsz, wchar_t wc); 87 83 wchar_t *RT_NOCRT(wcscpy)(wchar_t *pwszDst, const wchar_t *pwszSrc); 88 84 int RT_NOCRT(wcsicmp)(const wchar_t *pwsz1, const wchar_t *pwsz2); … … 128 124 #endif 129 125 size_t RT_NOCRT(_strxfrm)(char *pszDst, const char *pszSrc, size_t cch); 130 long RT_NOCRT(_strtol)(const char *pszDst, char **ppszNext, int iBase);131 long long RT_NOCRT(_strtoll)(const char *pszDst, char **ppszNext, int iBase);132 unsigned long RT_NOCRT(_strtoul)(const char *pszDst, char **ppszNext, int iBase);133 unsigned long long RT_NOCRT(_strtoull)(const char *pszDst, char **ppszNext, int iBase);134 126 135 127 size_t RT_NOCRT(_wcslen)(const wchar_t *pwsz); 136 128 wchar_t *RT_NOCRT(_wcscat)(wchar_t *pwszDst, const wchar_t *pwszSrc); 137 wchar_t *RT_NOCRT(_wcschr)(const wchar_t *pwsz Dst, wchar_t wc);129 wchar_t *RT_NOCRT(_wcschr)(const wchar_t *pwsz, wchar_t wc); 138 130 wchar_t *RT_NOCRT(_wcscpy)(wchar_t *pwszDst, const wchar_t *pwszSrc); 139 131 int RT_NOCRT(_wcsicmp)(const wchar_t *pwsz1, const wchar_t *pwsz2); … … 174 166 # define strtok_s RT_NOCRT(strtok_s) 175 167 # define strxfrm RT_NOCRT(strxfrm) 176 # define strtol RT_NOCRT(strtol)177 # define strtoll RT_NOCRT(strtoll)178 # define strtoul RT_NOCRT(strtoul)179 # define strtoull RT_NOCRT(strtoull)180 168 181 169 # define wcslen RT_NOCRT(wcslen) … … 219 207 # define _strtok_s RT_NOCRT(strtok_s) 220 208 # define _strxfrm RT_NOCRT(strxfrm) 221 # define _strtol RT_NOCRT(strtol)222 # define _strtoll RT_NOCRT(strtoll)223 # define _strtoul RT_NOCRT(strtoul)224 # define _strtoull RT_NOCRT(strtoull)225 209 226 210 # define _wcslen RT_NOCRT(wcslen) -
trunk/include/iprt/nocrt/sys/stat.h
r95976 r96013 30 30 #endif 31 31 32 #include <iprt/nocrt/time.h> /* Establish timespec and timeval before iprt/fs.h includes iprt/time.h. */ 32 33 #include <iprt/fs.h> 33 #include <sys/types.h> 34 #include <time.h> 35 #include <limits.h> 34 #include <iprt/nocrt/sys/types.h> 35 #include <iprt/nocrt/limits.h> 36 36 37 37 #ifdef IPRT_NO_CRT_FOR_3RD_PARTY … … 93 93 int RT_NOCRT(stat)(const char *pszPath, struct RT_NOCRT(stat) *pStat); 94 94 RTFMODE RT_NOCRT(umask)(RTFMODE fMode); 95 int RT_NOCRT(mkdir)(const char *, RTFMODE fMode); 95 96 96 97 int RT_NOCRT(_chmod)(const char *pszPath, RTFMODE fMode); … … 100 101 int RT_NOCRT(_stat)(const char *pszPath, struct RT_NOCRT(stat) *pStat); 101 102 RTFMODE RT_NOCRT(_umask)(RTFMODE fMode); 103 int RT_NOCRT(_mkdir)(const char *, RTFMODE fMode); 102 104 103 105 # if !defined(RT_WITHOUT_NOCRT_WRAPPERS) && !defined(RT_WITHOUT_NOCRT_WRAPPER_ALIASES) … … 108 110 # define stat RT_NOCRT(stat) 109 111 # define umask RT_NOCRT(umask) 112 # define mkdir RT_NOCRT(mkdir) 110 113 111 # define _chmod RT_NOCRT(_chmod) 112 # define _fchmod RT_NOCRT(_fchmod) 113 # define _fstat RT_NOCRT(_fstat) 114 # define _lstat RT_NOCRT(_lstat) 115 # define _stat RT_NOCRT(_stat) 116 # define _umask RT_NOCRT(_umask) 114 # define _chmod RT_NOCRT(chmod) 115 # define _fchmod RT_NOCRT(fchmod) 116 # define _fstat RT_NOCRT(fstat) 117 # define _lstat RT_NOCRT(lstat) 118 # define _stat RT_NOCRT(stat) 119 # define _umask RT_NOCRT(umask) 120 # define _mkdir RT_NOCRT(mkdir) 117 121 # endif 118 122 -
trunk/include/iprt/nocrt/sys/types.h
r95996 r96013 32 32 #include <iprt/types.h> 33 33 34 typedef RTDEV dev_t; 35 typedef RTINODE ino_t; 36 typedef int errno_t; 34 typedef RTDEV dev_t; 35 typedef int errno_t; 36 typedef RTINODE ino_t; 37 typedef RTFOFF off_t; 38 typedef RTPROCESS pid_t; 37 39 38 40 #endif /* !IPRT_INCLUDED_nocrt_sys_types_h */ -
trunk/include/iprt/nocrt/time.h
r95996 r96013 30 30 #endif 31 31 32 #define RTTIME_INCL_TIMESPEC 33 /*#define RTTIME_INCL_TIMEVAL*/ 32 34 #include <iprt/types.h> 33 35 #include <iprt/nocrt/sys/types.h> … … 57 59 RT_C_DECLS_BEGIN 58 60 61 time_t RT_NOCRT(time)(time_t *); 59 62 errno_t RT_NOCRT(localtime_s)(struct tm *, const time_t *); /* The Microsoft version, not the C11 one. */ 60 63 struct tm *RT_NOCRT(localtime_r)(const time_t *, struct tm *); 61 64 65 time_t RT_NOCRT(_time)(time_t *); 62 66 errno_t RT_NOCRT(_localtime_s)(struct tm *, const time_t *); 63 67 struct tm *RT_NOCRT(_localtime_r)(const time_t *, struct tm *); 64 68 65 69 # if !defined(RT_WITHOUT_NOCRT_WRAPPERS) && !defined(RT_WITHOUT_NOCRT_WRAPPER_ALIASES) 70 # define time RT_NOCRT(time) 66 71 # define localtime_s RT_NOCRT(localtime_s) 67 72 # define localtime_r RT_NOCRT(localtime_r) 68 73 74 # define _time RT_NOCRT(time) 69 75 # define _localtime_s RT_NOCRT(localtime_s) 70 76 # define _localtime_r RT_NOCRT(localtime_r) … … 73 79 RT_C_DECLS_END 74 80 81 #ifdef IPRT_INCLUDED_time_h 82 # error nocrt/time.h after time.h 83 #endif 75 84 76 85 #endif /* !IPRT_INCLUDED_nocrt_time_h */
Note:
See TracChangeset
for help on using the changeset viewer.