Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
precommondefs.h
Go to the documentation of this file.
1/***** Start of precommondefs.h *****/
2
3/* This is extracted from pyconfig.h from CPython. It sets the macros
4 that affect the features we get from system include files.
5 It must not #include anything. */
6
7#ifndef __PYPY_PRECOMMONDEFS_H
8#define __PYPY_PRECOMMONDEFS_H
9
10/* Define on Darwin to activate all library features */
11#define _DARWIN_C_SOURCE 1
12/* This must be set to 64 on some systems to enable large file support. */
13#define _FILE_OFFSET_BITS 64
14/* Define on Linux to activate all library features */
15#define _GNU_SOURCE 1
16/* This must be defined on some systems to enable large file support. */
17#define _LARGEFILE_SOURCE 1
18/* Define on NetBSD to activate all library features */
19#define _NETBSD_SOURCE 1
20/* Define to activate features from IEEE Stds 1003.1-2001 */
21#ifndef _POSIX_C_SOURCE
22#define _POSIX_C_SOURCE 200112L
23#endif
24/* Define on FreeBSD to activate all library features */
25#define __BSD_VISIBLE 1
26#define __XSI_VISIBLE 700
27/* Windows: winsock/winsock2 mess */
28#define WIN32_LEAN_AND_MEAN
29#ifdef _WIN64
30typedef __int64 Signed;
31typedef unsigned __int64 Unsigned;
32#define SIGNED_MIN LLONG_MIN
33#else
34typedef long Signed;
35typedef unsigned long Unsigned;
36#define SIGNED_MIN LONG_MIN
37#endif
38
39#if !defined(RPY_ASSERT) && !defined(RPY_LL_ASSERT) && !defined(NDEBUG)
40#define NDEBUG
41#endif
42
43/* All functions and global variables declared anywhere should use
44 one of the following attributes:
45
46 RPY_EXPORTED: the symbol is exported out of libpypy-c.so.
47
48 RPY_EXTERN: the symbol is not exported out of libpypy-c.so, but
49 otherwise works like 'extern' by being available to
50 other C sources.
51
52 static: as usual, this means the symbol is local to this C file.
53
54 Don't use _RPY_HIDDEN directly. For tests involving building a custom
55 .so, translator/tool/cbuild.py overrides RPY_EXTERN so that it becomes
56 equal to RPY_EXPORTED.
57
58 Any function or global variable declared with no attribute at all is
59 a bug; please report or fix it.
60*/
61#ifdef __GNUC__
62#define RPY_EXPORTED extern __attribute__((visibility("default")))
63#define _RPY_HIDDEN __attribute__((visibility("hidden")))
64#else
65#define RPY_EXPORTED extern __declspec(dllexport)
66#define _RPY_HIDDEN /* nothing */
67#endif
68#ifndef RPY_EXTERN
69#define RPY_EXTERN extern
70#endif
71
72#endif /* __PYPY_PRECOMMONDEFS_H */
73
74/***** End of precommondefs.h *****/
unsigned long Unsigned
long Signed