This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove redundant PERL_EXPORT_C and PERL_XS_EXPORT_C macros
[perl5.git] / symbian / symbianish.h
CommitLineData
27da23d5
JH
1/*
2 * symbianish.h
3 *
4 * Copyright (c) Nokia 2004-2005. All rights reserved.
5 * This code is licensed under the same terms as Perl itself.
6 *
7 */
8
9#include "symbian/symbian_port.h"
10
11/*
12 * The following symbols are defined if your operating system supports
13 * functions by that name. All Unixes I know of support them, thus they
14 * are not checked by the configuration script, but are directly defined
15 * here.
16 */
17
18#ifndef PERL_MICRO
19
20/* HAS_IOCTL:
21 * This symbol, if defined, indicates that the ioctl() routine is
22 * available to set I/O characteristics
23 */
24#define HAS_IOCTL / **/
d1dd14d1 25
27da23d5
JH
26/* HAS_UTIME:
27 * This symbol, if defined, indicates that the routine utime() is
28 * available to update the access and modification times of files.
29 */
30/* #define HAS_UTIME / **/
31
32/* HAS_GROUP
33 * This symbol, if defined, indicates that the getgrnam() and
34 * getgrgid() routines are available to get group entries.
35 * The getgrent() has a separate definition, HAS_GETGRENT.
36 */
37#undef HAS_GROUP /**/
38
39/* HAS_PASSWD
40 * This symbol, if defined, indicates that the getpwnam() and
41 * getpwuid() routines are available to get password entries.
42 * The getpwent() has a separate definition, HAS_GETPWENT.
43 */
44#undef HAS_PASSWD /**/
45
46#undef HAS_KILL
47#undef HAS_WAIT
48
49#endif /* !PERL_MICRO */
d1dd14d1 50
27da23d5
JH
51/* USEMYBINMODE
52 * This symbol, if defined, indicates that the program should
53 * use the routine my_binmode(FILE *fp, char iotype) to insure
54 * that a file is in "binary" mode -- that is, that no translation
55 * of bytes occurs on read or write operations.
56 */
57#undef USEMYBINMODE
58
59/* Stat_t:
60 * This symbol holds the type used to declare buffers for information
61 * returned by stat(). It's usually just struct stat. It may be necessary
62 * to include <sys/stat.h> and <sys/types.h> to get any typedef'ed
63 * information.
64 */
65#define Stat_t struct stat
66
67/* USE_STAT_RDEV:
68 * This symbol is defined if this system has a stat structure declaring
69 * st_rdev
70 */
71#define USE_STAT_RDEV /**/
72
73/* ACME_MESS:
d1dd14d1 74 * This symbol, if defined, indicates that error messages should be
27da23d5
JH
75 * should be generated in a format that allows the use of the Acme
76 * GUI/editor's autofind feature.
77 */
78#undef ACME_MESS /**/
79
80/* UNLINK_ALL_VERSIONS:
81 * This symbol, if defined, indicates that the program should arrange
82 * to remove all versions of a file if unlink() is called. This is
83 * probably only relevant for VMS.
84 */
85/* #define UNLINK_ALL_VERSIONS / **/
86
87/* VMS:
88 * This symbol, if defined, indicates that the program is running under
89 * VMS. It is currently automatically set by cpps running under VMS,
90 * and is included here for completeness only.
91 */
92/* #define VMS / **/
93
94/* ALTERNATE_SHEBANG:
95 * This symbol, if defined, contains a "magic" string which may be used
96 * as the first line of a Perl program designed to be executed directly
97 * by name, instead of the standard Unix #!. If ALTERNATE_SHEBANG
98 * begins with a character other then #, then Perl will only treat
99 * it as a command line if it finds the string "perl" in the first
100 * word; otherwise it's treated as the first line of code in the script.
101 * (IOW, Perl won't hand off to another interpreter via an alternate
102 * shebang sequence that might be legal Perl code.)
103 */
104/* #define ALTERNATE_SHEBANG "#!" / **/
105
106#include <signal.h>
107#define ABORT() abort()
108
109/*
110 * fwrite1() should be a routine with the same calling sequence as fwrite(),
111 * but which outputs all of the bytes requested as a single stream (unlike
112 * fwrite() itself, which on some systems outputs several distinct records
113 * if the number_of_items parameter is >1).
114 */
115#define fwrite1 fwrite
116
117#define Stat(fname,bufptr) stat((fname),(bufptr))
118#define Fstat(fd,bufptr) fstat((fd),(bufptr))
119#define Fflush(fp) fflush(fp)
120#define Mkdir(path,mode) mkdir((path),(mode))
121
cbec8ebe
DM
122#ifndef PERL_SYS_TERM_BODY
123#define PERL_SYS_TERM_BODY() HINTS_REFCNT_TERM; OP_REFCNT_TERM; \
124 PERLIO_TERM; MALLOC_TERM; CloseSTDLIB();
27da23d5
JH
125#endif
126
127#define BIT_BUCKET "NUL:"
128
129#define dXSUB_SYS
130
131#define NO_ENVIRON_ARRAY
132
133int kill(pid_t pid, int signo);
134pid_t wait(int *status);
135
136#ifdef PERL_GLOBAL_STRUCT_PRIVATE
137# undef PERL_GET_VARS
138# undef PERL_SET_VARS
139# undef PERL_UNSET_VARS
140# define PERL_GET_VARS() symbian_get_vars()
141# define PERL_SET_VARS(v) symbian_set_vars(v)
142# define PERL_UNSET_VARS(v) symbian_unset_vars()
143#endif /* #ifdef PERL_GLOBAL_STRUCT_PRIVATE */
144
d0d72822 145#define PERL_CALLCONV EXPORT_C /* for proto.h */
27da23d5
JH
146
147#ifndef PERL_CORE
148#define PERL_CORE /* for WINS builds under VC */
149#endif
150
151#ifdef USE_PERLIO
152#define PERL_NEED_APPCTX /* need storing the PerlBase* */
153#define PERLIO_STD_SPECIAL
154#define PERLIO_STD_IN(f, b, n) symbian_read_stdin(f, b, n)
155#define PERLIO_STD_OUT(f, b, n) symbian_write_stdout(f, b, n)
156/* The console (the STD*) streams are seen by Perl in UTF-8. */
157#define PERL_SYMBIAN_CONSOLE_UTF8
158
159#endif
160
161#undef Strerror
162#undef strerror
163#define Strerror(eno) ((eno) < 0 ? symbian_get_error_string(eno) : strerror(eno))
164
165#define PERL_NEED_TIMESBASE
166
167#define times(b) symbian_times(b)
168#define usleep(u) symbian_usleep(u)
169
cbec8ebe 170#define PERL_SYS_INIT_BODY(c, v) symbian_sys_init(c, v)
27da23d5
JH
171
172#ifdef __SERIES60_1X__
173# error "Unfortunately Perl does not work in S60 1.2 (see FAQ-0929)"
174#endif
175
176#ifdef _MSC_VER
177
178/* The Symbian SDK insists on the /W4 flag for Visual C.
179 * The Perl sources are not _that_ clean (Perl builds for Win32 use
180 * the /W3 flag, and gcc builds always use -Wall, so the sources are
181 * quite clean). To avoid a flood of warnings let's shut up most
182 * (for VC 6.0 SP 5). */
183
184#pragma warning(disable: 4054) /* function pointer to data pointer */
185#pragma warning(disable: 4055) /* data pointer to function pointer */
186#pragma warning(disable: 4100) /* unreferenced formal parameter */
187#pragma warning(disable: 4101) /* unreferenced local variable */
188#pragma warning(disable: 4102) /* unreferenced label */
189#pragma warning(disable: 4113) /* prototype difference */
190#pragma warning(disable: 4127) /* conditional expression is constant */
191#pragma warning(disable: 4132) /* const object should be initialized */
192#pragma warning(disable: 4133) /* incompatible types */
193#pragma warning(disable: 4189) /* initialized but not referenced */
194#pragma warning(disable: 4244) /* conversion from ... possible loss ... */
195#pragma warning(disable: 4245) /* signed/unsigned char */
196#pragma warning(disable: 4310) /* cast truncates constant value */
197#pragma warning(disable: 4505) /* function has been removed */
198#pragma warning(disable: 4510) /* default constructor could not ... */
199#pragma warning(disable: 4610) /* struct ... can never be instantiated */
200#pragma warning(disable: 4701) /* used without having been initialized */
201#pragma warning(disable: 4702) /* unreachable code */
202#pragma warning(disable: 4706) /* assignment within conditional */
203#pragma warning(disable: 4761) /* integral size mismatch */
204
205#endif /* _MSC_VER */
206
1215b447
JH
207#ifdef __MWERKS__
208/* No good way of using the CodeWarrior #pragma unused(varname) with Perl
209 * source code (e.g. PERL_UNUSED_DECL doesn't work with the pragma syntax).
210 * Therefore we brutally turn off these particular warnings since there
211 * is a lot of this in Perl code (pTHX, for example). TOther compilers
212 * will have to detect these naughty bits. */
213#pragma warn_unusedarg off
214#pragma warn_unusedvar off
215#pragma warn_emptydecl off
216#endif