Move WIN32 equivalent function defines to w32/w32misc.h from misc.h.
Move Microsoft C compiler warning to w32/w32misc.h from misc.h.
This commit is contained in:
parent
287aa9d162
commit
c7f940a84e
2 changed files with 12 additions and 14 deletions
|
@ -39,21 +39,7 @@
|
||||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#ifndef __GNUC__
|
|
||||||
|
|
||||||
/* integral mismatch, due to misuse of sector short */
|
|
||||||
#pragma warning (disable : 4761 )
|
|
||||||
|
|
||||||
#define strncasecmp(s1, s2, s3) _strnicmp((s1), (s2), (s3))
|
|
||||||
|
|
||||||
#define vsnprintf _vsnprintf
|
|
||||||
#define snprintf _snprintf
|
|
||||||
|
|
||||||
#endif /* !__GNUC__ */
|
|
||||||
|
|
||||||
#include "w32misc.h"
|
#include "w32misc.h"
|
||||||
#define random rand
|
|
||||||
#define srandom srand
|
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
#ifndef S_IRWUG
|
#ifndef S_IRWUG
|
||||||
|
|
|
@ -35,6 +35,18 @@
|
||||||
#ifndef W32MISC_H
|
#ifndef W32MISC_H
|
||||||
#define W32MISC_H
|
#define W32MISC_H
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
|
/* integral mismatch, due to misuse of sector short */
|
||||||
|
#pragma warning (disable : 4761 )
|
||||||
|
|
||||||
|
#define strncasecmp(s1, s2, s3) _strnicmp((s1), (s2), (s3))
|
||||||
|
#endif /* !__GNUC__ */
|
||||||
|
|
||||||
|
#define vsnprintf _vsnprintf
|
||||||
|
#define snprintf _snprintf
|
||||||
|
#define random rand
|
||||||
|
#define srandom srand
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* strptime.c
|
* strptime.c
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue