diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-07-01 15:00:03 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-07-01 15:00:03 +0000 |
commit | 6abfde65573d145325a908417d5301d4766c6af8 (patch) | |
tree | a1ac279536b8830a41dcbde437af0ac054f3050b /src/core/ngx_string.h | |
parent | f5e97c5cbe063246087f11f36fa04c48e8dba10a (diff) | |
download | nginx-6abfde65573d145325a908417d5301d4766c6af8.tar.gz nginx-6abfde65573d145325a908417d5301d4766c6af8.zip |
nginx-0.0.1-2003-07-01-19:00:03 import
Diffstat (limited to 'src/core/ngx_string.h')
-rw-r--r-- | src/core/ngx_string.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h index 036194bde..73ed43a95 100644 --- a/src/core/ngx_string.h +++ b/src/core/ngx_string.h @@ -18,8 +18,6 @@ typedef struct { #if (WIN32) -#define ngx_memzero ZeroMemory - #define ngx_strncasecmp strnicmp #define ngx_strcasecmp stricmp #define ngx_strncmp strncmp @@ -32,8 +30,6 @@ typedef struct { #else -#define ngx_memzero bzero - #define ngx_strncasecmp strncasecmp #define ngx_strcasecmp strcasecmp #define ngx_strncmp strncmp @@ -46,9 +42,19 @@ typedef struct { #endif +/* + * msvc and icc compile memset() to inline "rep stos" + * while ZeroMemory and bzero are calls. + */ +#define ngx_memzero(buf, n) memset(buf, n, 0) + +/* msvc and icc compile memcpy() to inline "rep movs" */ #define ngx_memcpy(dst, src, n) memcpy(dst, src, n) #define ngx_cpymem(dst, src, n) ((char *) memcpy(dst, src, n)) + n +/* msvc and icc compile memcmp() to inline loop */ +#define ngx_memcmp memcmp + char *ngx_cpystrn(char *dst, char *src, size_t n); int ngx_rstrncmp(char *s1, char *s2, size_t n); int ngx_atoi(char *line, size_t n); |