mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
Mainly just added some small #ifdef sections for a little portability.
svn path=/trunk/; revision=3778
This commit is contained in:
parent
db2294a694
commit
e80942cd98
12 changed files with 110 additions and 14 deletions
|
@ -932,7 +932,11 @@ LockResource(
|
|||
);
|
||||
|
||||
int
|
||||
#ifdef __GNUC__
|
||||
STDCALL
|
||||
#else
|
||||
__stdcall
|
||||
#endif
|
||||
WinMain(
|
||||
HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
|
|
|
@ -135,9 +135,11 @@ typedef struct _NPFS_WAIT_PIPE
|
|||
LARGE_INTEGER Timeout;
|
||||
} NPFS_WAIT_PIPE, *PNPFS_WAIT_PIPE;
|
||||
|
||||
#ifdef __GNUC__ // robd
|
||||
typedef struct _NPFS_LISTEN
|
||||
{
|
||||
} NPFS_LISTEN, *PNPFS_LISTEN;
|
||||
#endif
|
||||
|
||||
typedef struct _NPFS_SET_STATE
|
||||
{
|
||||
|
|
|
@ -97,7 +97,7 @@ typedef struct _PEB_LDR_DATA
|
|||
LIST_ENTRY InInitializationOrderModuleList;
|
||||
} PEB_LDR_DATA, *PPEB_LDR_DATA;
|
||||
|
||||
typedef VOID STDCALL (*PPEBLOCKROUTINE)(PVOID);
|
||||
typedef VOID STDCALL_FUNC (*PPEBLOCKROUTINE)(PVOID);
|
||||
|
||||
typedef struct _PEB
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _NTOS_H
|
||||
#define _NTOS_H
|
||||
/* $Id: ntos.h,v 1.7 2002/11/14 18:21:02 chorns Exp $ */
|
||||
/* $Id: ntos.h,v 1.8 2002/11/24 18:24:51 robd Exp $ */
|
||||
|
||||
#if defined(NTOS_MODE_USER)
|
||||
// include windows.h before ntddk.h to get user mode prototype for InterlockedXxx functions
|
||||
|
@ -47,6 +47,7 @@
|
|||
#include "kernel32/error.h"
|
||||
#else // Assume kernel mode
|
||||
#include <ddk/ntddk.h>
|
||||
//#include "ntos/types.h" // robd
|
||||
#include <ddk/ntifs.h>
|
||||
#include "ntos/types.h"
|
||||
#include "ntos/cdrom.h"
|
||||
|
|
|
@ -25,11 +25,19 @@ struct _EXCEPTION_REGISTRATION;
|
|||
* The type of function that is expected as an exception handler to be
|
||||
* installed with _try1.
|
||||
*/
|
||||
typedef EXCEPTION_DISPOSITION CDECL (*PEXCEPTION_HANDLER)(
|
||||
#ifdef __GNUC__
|
||||
typedef EXCEPTION_DISPOSITION (CDECL *PEXCEPTION_HANDLER)(
|
||||
struct _EXCEPTION_RECORD* ExceptionRecord,
|
||||
struct _EXCEPTION_REGISTRATION* ExceptionRegistration,
|
||||
PCONTEXT Context,
|
||||
PVOID DispatcherContext);
|
||||
#else
|
||||
typedef EXCEPTION_DISPOSITION (CDECL *PEXCEPTION_HANDLER)(
|
||||
struct _EXCEPTION_RECORD* ExceptionRecord,
|
||||
struct _EXCEPTION_REGISTRATION* ExceptionRegistration,
|
||||
PCONTEXT Context,
|
||||
PVOID DispatcherContext);
|
||||
#endif /*__GNUC__*/
|
||||
|
||||
#ifndef __USE_W32API
|
||||
|
||||
|
@ -108,8 +116,13 @@ typedef PEXCEPTION_REGISTRATION PEXCEPTION_REGISTRATION_RECORD;
|
|||
#endif /* _GNU_H_WINDOWS32_DEFINES */
|
||||
|
||||
// Functions of the following prototype return one of the above constants
|
||||
#ifdef __GNUC__
|
||||
typedef DWORD CDECL (*PSCOPE_EXCEPTION_FILTER)(VOID);
|
||||
typedef VOID CDECL (*PSCOPE_EXCEPTION_HANDLER)(VOID);
|
||||
#else
|
||||
typedef DWORD (CDECL *PSCOPE_EXCEPTION_FILTER)(VOID);
|
||||
typedef VOID (CDECL *PSCOPE_EXCEPTION_HANDLER)(VOID);
|
||||
#endif /*__GNUC__*/
|
||||
|
||||
typedef struct _SCOPETABLE_ENTRY
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: rtltypes.h,v 1.1 2002/11/15 21:56:37 chorns Exp $
|
||||
/* $Id: rtltypes.h,v 1.2 2002/11/24 18:24:51 robd Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -67,7 +67,7 @@ typedef struct _RTL_BITMAP
|
|||
PULONG Buffer;
|
||||
} RTL_BITMAP, *PRTL_BITMAP;
|
||||
|
||||
typedef NTSTATUS STDCALL
|
||||
typedef NTSTATUS STDCALL_FUNC
|
||||
(*PRTL_QUERY_REGISTRY_ROUTINE)(PWSTR ValueName,
|
||||
ULONG ValueType,
|
||||
PVOID ValueData,
|
||||
|
|
|
@ -62,9 +62,11 @@ typedef struct
|
|||
} ACE, *PACE;
|
||||
#endif
|
||||
|
||||
#ifdef __GNU__
|
||||
typedef struct _SECURITY_DESCRIPTOR_CONTEXT
|
||||
{
|
||||
} SECURITY_DESCRIPTOR_CONTEXT, *PSECURITY_DESCRIPTOR_CONTEXT;
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __USE_W32API
|
||||
|
|
|
@ -16,6 +16,15 @@
|
|||
|
||||
#include <basetsd.h>
|
||||
|
||||
#ifdef __GNUC__
|
||||
//#define STDCALL_FUNCPTR(a) STDCALL (* a)
|
||||
//#define STDCALL_FUNC(a) (STDCALL a )
|
||||
#define STDCALL_FUNC STDCALL
|
||||
#else
|
||||
//#define STDCALL_FUNCPTR(a) (STDCALL * a )
|
||||
#define STDCALL_FUNC(a) (__stdcall a )
|
||||
#endif /*__GNUC__*/
|
||||
|
||||
/* Fixed precision types */
|
||||
typedef signed char INT8, *PINT8;
|
||||
typedef signed short INT16, *PINT16;
|
||||
|
@ -40,11 +49,20 @@ typedef short SHORT;
|
|||
#define CALLBACK WINAPI
|
||||
#define PASCAL WINAPI
|
||||
#else
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define STDCALL
|
||||
#define CDECL
|
||||
#define CALLBACK
|
||||
#define PASCAL
|
||||
#endif
|
||||
#else
|
||||
#define STDCALL __stdcall
|
||||
#define CDECL __cdecl
|
||||
#define CALLBACK
|
||||
#define PASCAL
|
||||
#endif /*__GNUC__*/
|
||||
|
||||
#endif /*i386*/
|
||||
|
||||
#ifdef _WIN64
|
||||
|
||||
|
@ -85,10 +103,31 @@ typedef void *LPVOID;
|
|||
typedef float *PFLOAT;
|
||||
typedef unsigned short *PWCH;
|
||||
typedef unsigned short *PWORD;
|
||||
typedef long long LONGLONG;
|
||||
typedef unsigned long long ULONGLONG;
|
||||
typedef long long *PLONGLONG;
|
||||
typedef unsigned long long *PULONGLONG;
|
||||
|
||||
#ifdef __GNUC__
|
||||
//typedef long long LONGLONG;
|
||||
//typedef unsigned long long ULONGLONG;
|
||||
//typedef long long *PLONGLONG;
|
||||
//typedef unsigned long long *PULONGLONG;
|
||||
#define LONGLONG long long
|
||||
#define ULONGLONG unsigned long long
|
||||
#define PLONGLONG long long *
|
||||
#define PULONGLONG unsigned long long *
|
||||
#else
|
||||
//typedef double LONGLONG;
|
||||
//typedef double ULONGLONG;
|
||||
//typedef double *PLONGLONG;
|
||||
//typedef double *PULONGLONG;
|
||||
#include <msvcrt\crttypes.h>
|
||||
#define inline __inline
|
||||
#define __asm__
|
||||
#define __volatile__(a)
|
||||
#define __attribute__(a)
|
||||
struct _KTHREAD { int foobar; };
|
||||
struct _ETHREAD { int foobar; };
|
||||
struct _EPROCESS { int foobar; };
|
||||
#endif
|
||||
|
||||
typedef const void *LPCVOID;
|
||||
typedef BYTE *LPBYTE, *PBYTE;
|
||||
typedef BOOL *PBOOL;
|
||||
|
@ -109,7 +148,11 @@ typedef USHORT CSHORT;
|
|||
typedef const unsigned short *PCWSTR;
|
||||
typedef char* PCSZ;
|
||||
|
||||
#ifdef __GNUC__
|
||||
typedef DWORD STDCALL (*PTHREAD_START_ROUTINE) (LPVOID);
|
||||
#else
|
||||
typedef DWORD (STDCALL *PTHREAD_START_ROUTINE) (LPVOID);
|
||||
#endif /*__GNUC__*/
|
||||
|
||||
typedef union _LARGE_INTEGER
|
||||
{
|
||||
|
@ -410,12 +453,21 @@ typedef struct _SMALL_RECT
|
|||
} SMALL_RECT, *PSMALL_RECT;
|
||||
|
||||
|
||||
#ifdef __GNUC__
|
||||
typedef VOID STDCALL
|
||||
(*PTIMERAPCROUTINE)(
|
||||
LPVOID lpArgToCompletionRoutine,
|
||||
DWORD dwTimerLowValue,
|
||||
DWORD dwTimerHighValue
|
||||
);
|
||||
#else
|
||||
typedef VOID
|
||||
(STDCALL *PTIMERAPCROUTINE)(
|
||||
LPVOID lpArgToCompletionRoutine,
|
||||
DWORD dwTimerLowValue,
|
||||
DWORD dwTimerHighValue
|
||||
);
|
||||
#endif /*__GNUC__*/
|
||||
|
||||
#include "except.h"
|
||||
|
||||
|
|
|
@ -1,8 +1,25 @@
|
|||
#ifndef __INCLUDE_PE_H
|
||||
#define __INCLUDE_PE_H
|
||||
|
||||
//#define _ANONYMOUS_UNION __extension__
|
||||
//#define _ANONYMOUS_STRUCT __extension__
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef NONAMELESSUNION
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#define _ANONYMOUS_STRUCT __extension__
|
||||
#else
|
||||
#if defined(__cplusplus)
|
||||
#define _ANONYMOUS_UNION __extension__
|
||||
#endif
|
||||
#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
|
||||
#endif /* NONAMELESSUNION */
|
||||
#else
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
#ifndef NTAPI
|
||||
#define NTAPI STDCALL
|
||||
|
|
|
@ -2434,6 +2434,8 @@ typedef struct tagMETAFILEPICT {
|
|||
LONG xExt;
|
||||
LONG yExt;
|
||||
HMETAFILE hMF;
|
||||
#else
|
||||
LONG mm; // robd
|
||||
#endif
|
||||
} METAFILEPICT, *PMETAFILEPICT, *LPMETAFILEPICT;
|
||||
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
* DISCLAMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.1 $
|
||||
* $Author: jfilby $
|
||||
* $Date: 2000/06/16 20:58:56 $
|
||||
* $Revision: 1.2 $
|
||||
* $Author: robd $
|
||||
* $Date: 2002/11/24 18:24:52 $
|
||||
*
|
||||
*/
|
||||
// added modfl
|
||||
|
@ -42,7 +42,7 @@ extern "C" {
|
|||
*
|
||||
* NOTE: The CRTDLL version uses _HUGE_dll instead.
|
||||
*/
|
||||
#if __MSVCRT__
|
||||
#ifdef __MSVCRT__
|
||||
extern double* __imp__HUGE;
|
||||
#define HUGE_VAL (*__imp__HUGE)
|
||||
#else
|
||||
|
|
|
@ -119,6 +119,9 @@
|
|||
#endif
|
||||
#endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) */
|
||||
#endif /* NONAMELESSUNION */
|
||||
#else
|
||||
#define _ANONYMOUS_UNION
|
||||
#define _ANONYMOUS_STRUCT
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#ifndef _ANONYMOUS_UNION
|
||||
|
|
Loading…
Reference in a new issue