mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 09:48:01 +08:00
Implement rmdir & sleep func instead macros
PUBLISHED_FROM=62c73e5fb4f70e2b5b8824ce092012508640b173
This commit is contained in:
parent
66b23b11b0
commit
7f20c41dd5
20
mongoose.c
20
mongoose.c
@ -15726,3 +15726,23 @@ const struct mg_iface_vtable mg_default_iface_vtable = MG_PIC32_IFACE_VTABLE;
|
||||
#endif
|
||||
|
||||
#endif /* MG_ENABLE_NET_IF_PIC32 */
|
||||
#ifdef MG_MODULE_LINES
|
||||
#line 1 "common/platforms/windows/windows_direct.c"
|
||||
#endif
|
||||
/*
|
||||
* Copyright (c) 2017 Cesanta Software Limited
|
||||
* All rights reserved
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
int rmdir(const char *dirname) {
|
||||
return _rmdir(dirname);
|
||||
}
|
||||
|
||||
unsigned int sleep(unsigned int seconds) {
|
||||
Sleep(seconds * 1000);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
@ -223,14 +223,12 @@
|
||||
#endif
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#define sleep(x) Sleep((x) *1000)
|
||||
#define to64(x) _atoi64(x)
|
||||
#if !defined(__MINGW32__) && !defined(__MINGW64__)
|
||||
#define popen(x, y) _popen((x), (y))
|
||||
#define pclose(x) _pclose(x)
|
||||
#define fileno _fileno
|
||||
#endif
|
||||
#define rmdir _rmdir
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
#define fseeko(x, y, z) _fseeki64((x), (y), (z))
|
||||
#else
|
||||
@ -321,6 +319,9 @@ typedef struct _stati64 cs_stat_t;
|
||||
#define MG_NET_IF MG_NET_IF_SOCKET
|
||||
#endif
|
||||
|
||||
int rmdir(const char *dirname);
|
||||
unsigned int sleep(unsigned int seconds);
|
||||
|
||||
#endif /* CS_PLATFORM == CS_P_WINDOWS */
|
||||
#endif /* CS_COMMON_PLATFORMS_PLATFORM_WINDOWS_H_ */
|
||||
#ifdef MG_MODULE_LINES
|
||||
|
Loading…
x
Reference in New Issue
Block a user