Provide stub implementations of several C/C++ standard headers, to make parsing thirdparty sources significantly easier

This commit is contained in:
rdb 2015-10-11 16:55:46 +02:00
parent ba45120eac
commit 51ebc564aa
10 changed files with 68 additions and 2 deletions

View File

@ -0,0 +1,5 @@
This file, and all the other files in this directory, aren't
intended to be compiled--they're just parsed by CPPParser (and
interrogate) in lieu of the actual system headers, to generate the
interrogate database.

View File

@ -0,0 +1,6 @@
#ifndef ASSERT_H
#define ASSERT_H
#define assert(ignore)((void) 0)
#endif

View File

@ -0,0 +1 @@
#include <stdint.h>

View File

@ -0,0 +1,39 @@
#ifndef _LIMITS_H
#define _LIMITS_H
#define CHAR_BIT 8
#define SCHAR_MIN (-128)
#define SCHAR_MAX 127
#define UCHAR_MAX 255
#define CHAR_MIN SCHAR_MIN
#define CHAR_MAX SCHAR_MAX
#define SHRT_MIN (-32768)
#define SHRT_MAX 32767
#define USHRT_MAX 65535
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define UINT_MAX 4294967295U
#ifdef _LP64
#define LONG_MIN -9223372036854775808L
#define LONG_MAX 9223372036854775807L
#define ULONG_MAX 18446744073709551615UL
#else
#define LONG_MIN -2147483648L
#define LONG_MAX 2147483647L
#define ULONG_MAX 4294967295UL
#endif
#define LLONG_MIN -9223372036854775808LL
#define LLONG_MAX -9223372036854775807LL
#define ULLONG_MAX 18446744073709551615ULL
#ifdef _MSC_VER
#define _I64_MIN -9223372036854775808LL
#define _I64_MAX -9223372036854775807LL
#define _UI64_MAX 18446744073709551615ULL
#endif
#endif

View File

@ -0,0 +1,6 @@
#ifndef STDARG_H
#define STDARG_H
typedef struct {} va_list[1];
#endif

View File

@ -0,0 +1,8 @@
#ifndef STDIO_H
#define STDIO_H
#include <stdtypedefs.h>
struct FILE;
#endif

View File

@ -0,0 +1 @@
#include <stdtypedefs.h>

View File

@ -23,8 +23,6 @@ typedef int off_t;
typedef long time_t;
typedef long clock_t;
struct FILE;
namespace std {
}

View File

@ -0,0 +1 @@
#include <stdtypedefs.h>

View File

@ -0,0 +1 @@
#include <stdtypedefs.h>