source: trunk/essentials/dev-lang/perl/win32/win32.h@ 3368

Last change on this file since 3368 was 3181, checked in by bird, 19 years ago

perl 5.8.8

File size: 15.4 KB
Line 
1/* WIN32.H
2 *
3 * (c) 1995 Microsoft Corporation. All rights reserved.
4 * Developed by hip communications inc., http://info.hip.com/info/
5 *
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.
8 */
9#ifndef _INC_WIN32_PERL5
10#define _INC_WIN32_PERL5
11
12#ifndef _WIN32_WINNT
13# define _WIN32_WINNT 0x0400 /* needed for TryEnterCriticalSection() etc. */
14#endif
15
16#if defined(PERL_IMPLICIT_SYS)
17# define DYNAMIC_ENV_FETCH
18# define HAS_GETENV_LEN
19# define prime_env_iter()
20# define WIN32IO_IS_STDIO /* don't pull in custom stdio layer */
21# define WIN32SCK_IS_STDSCK /* don't pull in custom wsock layer */
22# ifdef PERL_GLOBAL_STRUCT
23# error PERL_GLOBAL_STRUCT cannot be defined with PERL_IMPLICIT_SYS
24# endif
25# define win32_get_privlib PerlEnv_lib_path
26# define win32_get_sitelib PerlEnv_sitelib_path
27# define win32_get_vendorlib PerlEnv_vendorlib_path
28#endif
29
30#ifdef __GNUC__
31# ifndef __int64 /* some versions seem to #define it already */
32# define __int64 long long
33# endif
34# define Win32_Winsock
35#ifdef __cplusplus
36/* Mingw32 gcc -xc++ objects to __attribute((unused)) at least */
37#undef PERL_UNUSED_DECL
38#define PERL_UNUSED_DECL
39#endif
40#endif
41
42
43/* Define DllExport akin to perl's EXT,
44 * If we are in the DLL or mimicing the DLL for Win95 work round
45 * then Export the symbol,
46 * otherwise import it.
47 */
48
49/* now even GCC supports __declspec() */
50
51#if defined(PERLDLL) || defined(WIN95FIX)
52#define DllExport
53/*#define DllExport __declspec(dllexport)*/ /* noises with VC5+sp3 */
54#else
55#define DllExport __declspec(dllimport)
56#endif
57
58#define WIN32_LEAN_AND_MEAN
59#include <windows.h>
60
61#ifdef WIN32_LEAN_AND_MEAN /* C file is NOT a Perl5 original. */
62#define CONTEXT PERL_CONTEXT /* Avoid conflict of CONTEXT defs. */
63#endif /*WIN32_LEAN_AND_MEAN */
64
65#ifndef TLS_OUT_OF_INDEXES
66#define TLS_OUT_OF_INDEXES (DWORD)0xFFFFFFFF
67#endif
68
69#include <dirent.h>
70#include <io.h>
71#include <process.h>
72#include <stdio.h>
73#include <direct.h>
74#include <stdlib.h>
75#include <stddef.h>
76#include <fcntl.h>
77#ifndef EXT
78#include "EXTERN.h"
79#endif
80
81struct tms {
82 long tms_utime;
83 long tms_stime;
84 long tms_cutime;
85 long tms_cstime;
86};
87
88#ifndef SYS_NMLN
89#define SYS_NMLN 257
90#endif
91
92struct utsname {
93 char sysname[SYS_NMLN];
94 char nodename[SYS_NMLN];
95 char release[SYS_NMLN];
96 char version[SYS_NMLN];
97 char machine[SYS_NMLN];
98};
99
100#ifndef START_EXTERN_C
101#undef EXTERN_C
102#ifdef __cplusplus
103# define START_EXTERN_C extern "C" {
104# define END_EXTERN_C }
105# define EXTERN_C extern "C"
106#else
107# define START_EXTERN_C
108# define END_EXTERN_C
109# define EXTERN_C
110#endif
111#endif
112