This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make setting ${^ENCODING} to a defined value fatal
[perl5.git] / EXTERN.h
CommitLineData
a0d0e21e 1/* EXTERN.h
a687059c 2 *
4bb101f2
JH
3 * Copyright (C) 1991, 1992, 1993, 1995, 1996, 1997, 1998, 1999,
4 * 2000, 2001, by Larry Wall and others
a687059c 5 *
132b68a5
LW
6 * You may distribute under the terms of either the GNU General Public
7 * License or the Artistic License, as specified in the README file.
8d063cd8 8 *
8d063cd8
LW
9 */
10
4633a7c4
LW
11/*
12 * EXT designates a global var which is defined in perl.h
13 * dEXT designates a global var which is defined in another
14 * file, so we can't count on finding it in perl.h
15 * (this practice should be avoided).
16 */
8d063cd8 17#undef EXT
4633a7c4 18#undef dEXT
36477c24 19#undef EXTCONST
20#undef dEXTCONST
400638aa 21
27da23d5 22# if (defined(WIN32) || defined(__SYMBIAN32__)) && !defined(PERL_STATIC_SYMS)
def6ed22 23 /* miniperl should not export anything */
a19baa61
DD
24# if defined(PERL_IS_MINIPERL) && !defined(UNDER_CE) && defined(_MSC_VER)
25# define EXT extern
54310121 26# define dEXT
a19baa61 27# define EXTCONST extern const
54310121 28# define dEXTCONST const
29# else
a19baa61 30# if defined(PERLDLL) || defined(__SYMBIAN32__)
1545a179 31# define EXT EXTERN_C __declspec(dllexport)
a19baa61 32# define dEXT
1545a179 33# define EXTCONST EXTERN_C __declspec(dllexport) const
a19baa61
DD
34# define dEXTCONST const
35# else
1545a179 36# define EXT EXTERN_C __declspec(dllimport)
a19baa61 37# define dEXT
1545a179 38# define EXTCONST EXTERN_C __declspec(dllimport) const
def6ed22
SH
39# define dEXTCONST const
40# endif
54310121 41# endif
42# else
d308986b 43# if defined(__CYGWIN__) && defined(USEIMPORTLIB)
8736538c
AS
44# define EXT extern __declspec(dllimport)
45# define dEXT
46# define EXTCONST extern __declspec(dllimport) const
47# define dEXTCONST const
48# else
49# define EXT extern
50# define dEXT
51# define EXTCONST extern const
52# define dEXTCONST const
53# endif
54310121 54# endif
8d063cd8
LW
55
56#undef INIT
57#define INIT(x)
58
59#undef DOINIT