2017-01-10 16:31:05 +01:00
|
|
|
#pragma once
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2017-03-25 18:36:27 +01:00
|
|
|
#ifndef _LP64
|
2017-03-25 18:35:00 +01:00
|
|
|
#define _LP64 0 /* fix a warning in pdcurses 3.4 */
|
2017-03-25 18:36:27 +01:00
|
|
|
#endif
|
2017-03-25 18:35:00 +01:00
|
|
|
|
2017-01-10 18:07:36 +01:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#ifndef __STDC__
|
|
|
|
#define __STDC__ 1 // equivalent to /Za
|
|
|
|
#endif
|
|
|
|
#define NO_MKDIR
|
2017-05-21 13:09:54 +02:00
|
|
|
#if _MSC_VER >= 1900
|
2017-01-10 18:07:36 +01:00
|
|
|
#pragma warning(disable: 4710 4820)
|
|
|
|
#pragma warning(disable: 4100) // unreferenced formal parameter
|
|
|
|
#pragma warning(disable: 4456) // declaration hides previous
|
|
|
|
#pragma warning(disable: 4457) // declaration hides function parameter
|
|
|
|
#pragma warning(disable: 4459) // declaration hides global
|
2017-05-21 13:09:54 +02:00
|
|
|
#endif
|
2017-02-18 21:15:14 +01:00
|
|
|
#else /* assume gcc */
|
|
|
|
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
|
|
|
|
# define va_copy(a,b) __va_copy(a,b)
|
|
|
|
#endif
|
|
|
|
|
2017-01-10 18:07:36 +01:00
|
|
|
#endif
|
2017-01-10 18:05:48 +01:00
|
|
|
|
2017-12-11 08:53:10 +01:00
|
|
|
/* #define _POSIX_C_SOURCE 200809L
|
|
|
|
*/
|
2017-01-10 16:31:05 +01:00
|
|
|
#ifndef MAX_PATH
|
|
|
|
# define MAX_PATH 4096
|
2014-03-15 19:29:11 +01:00
|
|
|
#endif
|
|
|
|
|
2017-01-10 16:31:05 +01:00
|
|
|
#define UNUSED_ARG(a) (void)(a)
|
2014-03-15 19:29:11 +01:00
|
|
|
|
2017-01-10 16:31:05 +01:00
|
|
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
|
|
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
2016-11-25 20:15:11 +01:00
|
|
|
|
2017-01-10 18:05:48 +01:00
|
|
|
#define TOLUA_CAST (char*)
|
2017-01-10 18:07:36 +01:00
|
|
|
|
|
|
|
#ifdef NO_MKDIR
|
|
|
|
int mkdir(const char *pathname, int mode);
|
|
|
|
#endif
|
|
|
|
|
2017-05-06 09:44:06 +02:00
|
|
|
/* do not use M_PI, use one of these instead: */
|
|
|
|
#define PI_F 3.1415926535897932384626433832795F
|
|
|
|
#define PI_D 3.1415926535897932384626433832795
|
|
|
|
#define PI_L 3.1415926535897932384626433832795L
|