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