2013-02-02 03:50:01 +08:00
|
|
|
// Like the compiler, the static analyzer treats some functions differently if
|
|
|
|
// they come from a system header -- for example, it is assumed that system
|
|
|
|
// functions do not arbitrarily free() their parameters, and that some bugs
|
|
|
|
// found in system headers cannot be fixed by the user and should be
|
|
|
|
// suppressed.
|
2012-01-05 07:54:01 +08:00
|
|
|
#pragma clang system_header
|
|
|
|
|
|
|
|
typedef struct _FILE FILE;
|
|
|
|
extern FILE *stdin;
|
2012-03-01 02:42:47 +08:00
|
|
|
extern FILE *stdout;
|
|
|
|
extern FILE *stderr;
|
|
|
|
// Include a variant of standard streams that occur in the pre-processed file.
|
|
|
|
extern FILE *__stdinp;
|
|
|
|
extern FILE *__stdoutp;
|
|
|
|
extern FILE *__stderrp;
|
|
|
|
|
|
|
|
|
|
|
|
int fscanf(FILE *restrict, const char *restrict, ...);
|
2012-01-05 07:54:01 +08:00
|
|
|
|
|
|
|
// Note, on some platforms errno macro gets replaced with a function call.
|
|
|
|
extern int errno;
|
|
|
|
|
2012-09-20 19:03:56 +08:00
|
|
|
typedef __typeof(sizeof(int)) size_t;
|
|
|
|
|
|
|
|
size_t strlen(const char *);
|
2012-02-12 07:46:36 +08:00
|
|
|
|
2012-03-01 02:42:47 +08:00
|
|
|
char *strcpy(char *restrict, const char *restrict);
|
2012-02-12 07:46:36 +08:00
|
|
|
|
2012-02-23 09:05:27 +08:00
|
|
|
typedef unsigned long __darwin_pthread_key_t;
|
|
|
|
typedef __darwin_pthread_key_t pthread_key_t;
|
2012-03-01 02:42:47 +08:00
|
|
|
int pthread_setspecific(pthread_key_t, const void *);
|
|
|
|
|
|
|
|
typedef long long __int64_t;
|
|
|
|
typedef __int64_t __darwin_off_t;
|
|
|
|
typedef __darwin_off_t fpos_t;
|
|
|
|
|
|
|
|
void setbuf(FILE * restrict, char * restrict);
|
|
|
|
int setvbuf(FILE * restrict, char * restrict, int, size_t);
|
|
|
|
|
|
|
|
FILE *funopen(const void *,
|
|
|
|
int (*)(void *, char *, int),
|
|
|
|
int (*)(void *, const char *, int),
|
|
|
|
fpos_t (*)(void *, fpos_t, int),
|
|
|
|
int (*)(void *));
|
|
|
|
|
2012-05-04 07:50:28 +08:00
|
|
|
int sqlite3_bind_text_my(int, const char*, int n, void(*)(void*));
|
2012-05-04 07:50:33 +08:00
|
|
|
|
|
|
|
typedef void (*freeCallback) (void*);
|
|
|
|
typedef struct {
|
|
|
|
int i;
|
|
|
|
freeCallback fc;
|
|
|
|
} StWithCallback;
|
|
|
|
|
|
|
|
int dealocateMemWhenDoneByVal(void*, StWithCallback);
|
|
|
|
int dealocateMemWhenDoneByRef(StWithCallback*, const void*);
|
2012-06-16 08:09:20 +08:00
|
|
|
|
|
|
|
typedef struct CGContext *CGContextRef;
|
|
|
|
CGContextRef CGBitmapContextCreate(void *data/*, size_t width, size_t height,
|
|
|
|
size_t bitsPerComponent, size_t bytesPerRow,
|
|
|
|
CGColorSpaceRef space,
|
|
|
|
CGBitmapInfo bitmapInfo*/);
|
|
|
|
void *CGBitmapContextGetData(CGContextRef context);
|
2012-06-21 07:35:57 +08:00
|
|
|
|
|
|
|
// Include xpc.
|
|
|
|
typedef struct _xpc_connection_s * xpc_connection_t;
|
|
|
|
typedef void (*xpc_finalizer_t)(void *value);
|
|
|
|
void xpc_connection_set_context(xpc_connection_t connection, void *context);
|
|
|
|
void xpc_connection_set_finalizer_f(xpc_connection_t connection, xpc_finalizer_t finalizer);
|
|
|
|
void xpc_connection_resume(xpc_connection_t connection);
|
2013-02-08 07:05:43 +08:00
|
|
|
|
|
|
|
//The following is a fake system header function
|
|
|
|
void fakeSystemHeaderCallInt(int *);
|
|
|
|
|
|
|
|
typedef struct __SomeStruct {
|
|
|
|
char * p;
|
|
|
|
} SomeStruct;
|
|
|
|
void fakeSystemHeaderCall(SomeStruct *);
|