diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-05-09 12:43:32 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-05-09 12:43:32 +0000 |
commit | f89d29e3178737e30364d353f613ff6a013be551 (patch) | |
tree | ab777bc5f82f5ae5e9e116bb732a98257796f941 /navit/support | |
parent | 3ca91b79f934417ab29f6dd77e40cd89d3b80832 (diff) | |
download | navit-f89d29e3178737e30364d353f613ff6a013be551.tar.gz |
Fix:support_libc:MSVC fixes
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4485 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/support')
-rw-r--r-- | navit/support/libc/libc.h | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/navit/support/libc/libc.h b/navit/support/libc/libc.h index 66030b01d..4125fa735 100644 --- a/navit/support/libc/libc.h +++ b/navit/support/libc/libc.h @@ -1,9 +1,6 @@ #ifndef _SUPPORT_LIBC_H #define _SUPPORT_LIBC_H 1 -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif void *popen(const char *command, const char *type); @@ -21,4 +18,34 @@ struct lconv *localeconv(void); int signal(int signum, void *handler); +#ifdef _MSC_VER + +#define GetWindowLongPtr GetWindowLong +#define SetWindowLongPtr SetWindowLong + +#define DWLP_MSGRESULT 0 +#define DWLP_DLGPROC DWLP_MSGRESULT + sizeof(LRESULT) +#define DWLP_USER DWLP_DLGPROC + sizeof(DLGPROC) + +struct tm *localtime (const time_t *t); + +size_t strftime (char *s, size_t maxsize, const char *format, const struct tm *tp); + +#define mkdir _mkdir +#define open _open +#define close _close +#define read _read +#define write _write +#define lseek _lseek +#define vsnprintf _vsnprintf + +#else + +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif + +#endif + + #endif |