forked from KolibriOS/kolibrios
linking native Kolibri executable
git-svn-id: svn://kolibrios.org@704 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -23,6 +23,7 @@ extern "C"
|
||||
#define FILE_NOT_FOUND 5
|
||||
#define FILE_EOF 6
|
||||
|
||||
#if 0
|
||||
|
||||
typedef unsigned int DWORD;
|
||||
typedef unsigned short int WORD;
|
||||
@@ -62,10 +63,6 @@ typedef struct
|
||||
DWORD size_high;
|
||||
} FILEINFO;
|
||||
|
||||
void _stdcall InitHeap(int heap_size);
|
||||
void* _stdcall UserAlloc(int size);
|
||||
int _stdcall UserFree(void* p);
|
||||
|
||||
void _stdcall GetNotify(void *event);
|
||||
|
||||
void _stdcall CreateThread(void *fn, char *p_stack);
|
||||
@@ -85,7 +82,8 @@ int _stdcall remap_key(int key);
|
||||
|
||||
int _cdecl get_button_id();
|
||||
|
||||
void delay(int val);
|
||||
//void delay(int val);
|
||||
|
||||
int wait_for_event(int time);
|
||||
int wait_for_event_infinite();
|
||||
void BeginDraw(void);
|
||||
@@ -99,6 +97,37 @@ void _stdcall make_button(int x, int y, int xsize, int ysize, int id, int color)
|
||||
void _stdcall draw_bar(int x, int y, int xsize, int ysize, int color);
|
||||
void _stdcall write_text(int x,int y,int color,char* text,int len);
|
||||
|
||||
#endif
|
||||
|
||||
unsigned init_heap(void);
|
||||
|
||||
#pragma aux init_heap = \
|
||||
"mov EAX, 68" \
|
||||
"mov EBX, 11" \
|
||||
"int 0x40" \
|
||||
value [EAX] \
|
||||
modify [ EBX ];
|
||||
|
||||
void *user_alloc(unsigned size);
|
||||
|
||||
void *user_alloc(unsigned size);
|
||||
|
||||
#pragma aux user_alloc = \
|
||||
"mov EAX, 68" \
|
||||
"mov EBX, 12" \
|
||||
"int 0x40" \
|
||||
parm [ ECX ] value [EAX] \
|
||||
modify [ EBX ];
|
||||
|
||||
unsigned user_free(void *);
|
||||
|
||||
#pragma aux user_free = \
|
||||
"mov EAX, 68" \
|
||||
"mov EBX, 13" \
|
||||
"int 0x40" \
|
||||
parm [ ECX ] value [EAX] \
|
||||
modify [ EBX ];
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
}
|
||||
|
37
programs/develop/open watcom/trunk/clib/h/locales.h
Normal file
37
programs/develop/open watcom/trunk/clib/h/locales.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Open Watcom Project
|
||||
*
|
||||
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original
|
||||
* Code as defined in and that are subject to the Sybase Open Watcom
|
||||
* Public License version 1.0 (the 'License'). You may not use this file
|
||||
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
|
||||
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
|
||||
* provided with the Original Code and Modifications, and is also
|
||||
* available at www.sybase.com/developer/opensource.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
|
||||
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
|
||||
* NON-INFRINGEMENT. Please see the License for the specific language
|
||||
* governing rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Description: WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
|
||||
* DESCRIBE IT HERE!
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/* locales.h */
|
||||
|
||||
#define C_LOCALE 0
|
||||
#define NATIVE_LOCALE 1
|
||||
#define INVALID_LOCALE 2
|
36
programs/develop/open watcom/trunk/clib/h/localset.h
Normal file
36
programs/develop/open watcom/trunk/clib/h/localset.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Open Watcom Project
|
||||
*
|
||||
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original
|
||||
* Code as defined in and that are subject to the Sybase Open Watcom
|
||||
* Public License version 1.0 (the 'License'). You may not use this file
|
||||
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
|
||||
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
|
||||
* provided with the Original Code and Modifications, and is also
|
||||
* available at www.sybase.com/developer/opensource.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
|
||||
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
|
||||
* NON-INFRINGEMENT. Please see the License for the specific language
|
||||
* governing rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Description: WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
|
||||
* DESCRIBE IT HERE!
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
|
||||
extern char _LocaleSetting[];
|
||||
#define _INITLOCALESETTING
|
||||
#define _LOCALESETTING _LocaleSetting
|
@@ -1,293 +1,296 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Open Watcom Project
|
||||
*
|
||||
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original
|
||||
* Code as defined in and that are subject to the Sybase Open Watcom
|
||||
* Public License version 1.0 (the 'License'). You may not use this file
|
||||
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
|
||||
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
|
||||
* provided with the Original Code and Modifications, and is also
|
||||
* available at www.sybase.com/developer/opensource.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
|
||||
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
|
||||
* NON-INFRINGEMENT. Please see the License for the specific language
|
||||
* governing rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Description: Configuration for clib builds.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef _VARIETY_H_INCLUDED
|
||||
#define _VARIETY_H_INCLUDED
|
||||
|
||||
//
|
||||
// Note: for the DLL versions of the runtime libraries, this file must be
|
||||
// included before any of the runtime header files.
|
||||
//
|
||||
|
||||
#ifndef _COMDEF_H_INCLUDED
|
||||
#include <_comdef.h>
|
||||
#endif
|
||||
|
||||
// specialized data reference macro
|
||||
#define _HUGEDATA _WCDATA
|
||||
|
||||
// memory model macros
|
||||
#if defined(__SMALL__)
|
||||
#define __SMALL_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#elif defined(__FLAT__)
|
||||
#define __SMALL_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#elif defined(__MEDIUM__)
|
||||
#define __SMALL_DATA__
|
||||
#define __BIG_CODE__
|
||||
#elif defined(__COMPACT__)
|
||||
#define __BIG_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#elif defined(__LARGE__)
|
||||
#define __BIG_DATA__
|
||||
#define __BIG_CODE__
|
||||
#elif defined(__HUGE__)
|
||||
#define __BIG_DATA__
|
||||
#define __BIG_CODE__
|
||||
#elif defined(__AXP__) || defined(__PPC__) || defined(__MIPS__)
|
||||
// these effectively use near data references
|
||||
#define __SMALL_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#else
|
||||
#error unable to configure memory model
|
||||
#endif
|
||||
|
||||
// operating system and processor macros
|
||||
#if defined(__GENERIC__)
|
||||
#if defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __GENERIC_386__
|
||||
#elif defined(M_I86)
|
||||
#define __REAL_MODE__
|
||||
#define __GENERIC_086__
|
||||
#else
|
||||
#error unrecognized processor for GENERIC
|
||||
#endif
|
||||
#elif defined(__OS2__)
|
||||
#if defined(M_I86)
|
||||
#define __REAL_MODE__
|
||||
#define __OS2_286__
|
||||
#elif defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __OS2_386__
|
||||
#define __WARP__
|
||||
#elif defined(__PPC__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __OS2_PPC__
|
||||
#define __WARP__
|
||||
#else
|
||||
#error unrecognized processor for OS2
|
||||
#endif
|
||||
#elif defined(__NT__)
|
||||
#if !defined(WIN32_LEAN_AND_MEAN) && !defined(WIN32_NICE_AND_FAT)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#define __PROTECT_MODE__
|
||||
#if defined(__386__)
|
||||
#define __NT_386__
|
||||
#elif defined(__AXP__)
|
||||
#define __NT_AXP__
|
||||
#elif defined(__PPC__)
|
||||
#define __NT_PPC__
|
||||
#else
|
||||
#error unrecognized processor for NT
|
||||
#endif
|
||||
#elif defined(__WINDOWS__) || defined(__WINDOWS_386__)
|
||||
#define __PROTECT_MODE__
|
||||
#if defined(__386__)
|
||||
#define __WINDOWS__
|
||||
#elif defined(M_I86)
|
||||
#define __WINDOWS_286__
|
||||
#else
|
||||
#error unrecognized processor for WINDOWS
|
||||
#endif
|
||||
#elif defined(__DOS__)
|
||||
#if defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __DOS_386__
|
||||
#elif defined(M_I86)
|
||||
#define __REAL_MODE__
|
||||
#define __DOS_086__
|
||||
#else
|
||||
#error unrecognized processor for DOS
|
||||
#endif
|
||||
#elif defined(__OSI__)
|
||||
#if defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __OSI_386__
|
||||
#else
|
||||
#error unrecognized processor for OSI
|
||||
#endif
|
||||
#elif defined(__QNX__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __UNIX__
|
||||
#if defined(__386__)
|
||||
#define __QNX_386__
|
||||
#elif defined(M_I86)
|
||||
#define __QNX_286__
|
||||
#else
|
||||
#error unrecognized processor for QNX
|
||||
#endif
|
||||
#elif defined(__LINUX__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __UNIX__
|
||||
#if defined(__386__)
|
||||
#define __LINUX_386__
|
||||
#elif defined(__PPC__)
|
||||
#define __LINUX_PPC__
|
||||
#elif defined(__MIPS__)
|
||||
#define __LINUX_MIPS__
|
||||
#else
|
||||
#error unrecognized processor for Linux
|
||||
#endif
|
||||
#elif defined(__NETWARE__)
|
||||
#define __PROTECT_MODE__
|
||||
#if defined(__386__)
|
||||
#define __NETWARE_386__
|
||||
#else
|
||||
#error unrecognized processor for NETWARE
|
||||
#endif
|
||||
#else
|
||||
#error unable to configure operating system and processor
|
||||
#endif
|
||||
|
||||
// handle building dll's with appropriate linkage
|
||||
#if !defined(__SW_BR) && (defined(__WARP__) || defined(__NT__))
|
||||
#if defined(__MAKE_DLL_CLIB)
|
||||
#undef _WCRTLINK
|
||||
#undef _WCIRTLINK
|
||||
#undef _WCRTLINKD
|
||||
#undef _WMRTLINK
|
||||
#undef _WMIRTLINK
|
||||
#undef _WMRTLINKD
|
||||
#undef _WPRTLINK
|
||||
#undef _WPIRTLINK
|
||||
#undef _WPRTLINKD
|
||||
#if defined(__NT__)
|
||||
#define _WCRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllexport)
|
||||
#define _WMRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllimport)
|
||||
#define _WPRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllimport)
|
||||
#elif defined(__WARP__)
|
||||
#define _WCRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllexport)
|
||||
#define _WMRTLINK _WRTLCALL
|
||||
#define _WMIRTLINK _WRTLCALL
|
||||
#define _WMRTLINKD
|
||||
#define _WPRTLINK _WRTLCALL
|
||||
#define _WPIRTLINK _WRTLCALL
|
||||
#define _WPRTLINKD
|
||||
#endif
|
||||
#elif defined(__MAKE_DLL_MATHLIB)
|
||||
#define _RTDLL
|
||||
#undef _WCRTLINK
|
||||
#undef _WCIRTLINK
|
||||
#undef _WCRTLINKD
|
||||
#undef _WMRTLINK
|
||||
#undef _WMIRTLINK
|
||||
#undef _WMRTLINKD
|
||||
#undef _WPRTLINK
|
||||
#undef _WPIRTLINK
|
||||
#undef _WPRTLINKD
|
||||
#if defined(__NT__)
|
||||
#define _WCRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllimport)
|
||||
#define _WMRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllexport)
|
||||
#define _WPRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllimport)
|
||||
#elif defined(__WARP__)
|
||||
#define _WCRTLINK _WRTLCALL
|
||||
#define _WCIRTLINK _WRTLCALL
|
||||
#define _WCRTLINKD
|
||||
#define _WMRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllexport)
|
||||
#define _WPRTLINK _WRTLCALL
|
||||
#define _WPIRTLINK _WRTLCALL
|
||||
#define _WPRTLINKD
|
||||
#endif
|
||||
#elif defined(__MAKE_DLL_CPPLIB)
|
||||
#define _RTDLL
|
||||
#undef _WCRTLINK
|
||||
#undef _WCIRTLINK
|
||||
#undef _WCRTLINKD
|
||||
#undef _WMRTLINK
|
||||
#undef _WMIRTLINK
|
||||
#undef _WMRTLINKD
|
||||
#undef _WPRTLINK
|
||||
#undef _WPIRTLINK
|
||||
#undef _WPRTLINKD
|
||||
#if defined(__NT__)
|
||||
#define _WCRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllimport)
|
||||
#define _WMRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllimport)
|
||||
#define _WPRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllexport)
|
||||
#elif defined(__WARP__)
|
||||
#define _WCRTLINK _WRTLCALL
|
||||
#define _WCIRTLINK _WRTLCALL
|
||||
#define _WCRTLINKD
|
||||
#define _WMRTLINK _WRTLCALL
|
||||
#define _WMIRTLINK _WRTLCALL
|
||||
#define _WMRTLINKD
|
||||
#define _WPRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllexport)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define __ptr_check( p, a )
|
||||
#define __null_check( p, a )
|
||||
#define __stream_check( s, a )
|
||||
|
||||
#define __ROUND_UP_SIZE( __x, __amt ) (((__x)+((__amt)-1))&(~((__amt)-1)))
|
||||
///
|
||||
/// This doesn't work for far pointer's
|
||||
///
|
||||
///#define __ROUND_UP_PTR( __x, __amt ) ((void *)__ROUND_UP_SIZE((unsigned)(__x),__amt))
|
||||
#if defined(M_I86)
|
||||
#define __ALIGN_SIZE( __x ) __ROUND_UP_SIZE( __x, 2 )
|
||||
// #define __ALIGN_PTR( __x ) __ROUND_UP_PTR( __x, 2 )
|
||||
#elif defined(__386__)
|
||||
#define __ALIGN_SIZE( __x ) __ROUND_UP_SIZE( __x, 4 )
|
||||
/// #define __ALIGN_PTR( __x ) __ROUND_UP_PTR( __x, 4 )
|
||||
#else
|
||||
#define __ALIGN_SIZE( __x ) __ROUND_UP_SIZE( __x, 8 )
|
||||
// #define __ALIGN_PTR( __x ) __ROUND_UP_PTR( __x, 8 )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/****************************************************************************
|
||||
*
|
||||
* Open Watcom Project
|
||||
*
|
||||
* Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* This file contains Original Code and/or Modifications of Original
|
||||
* Code as defined in and that are subject to the Sybase Open Watcom
|
||||
* Public License version 1.0 (the 'License'). You may not use this file
|
||||
* except in compliance with the License. BY USING THIS FILE YOU AGREE TO
|
||||
* ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
|
||||
* provided with the Original Code and Modifications, and is also
|
||||
* available at www.sybase.com/developer/opensource.
|
||||
*
|
||||
* The Original Code and all software distributed under the License are
|
||||
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
* EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
|
||||
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
|
||||
* NON-INFRINGEMENT. Please see the License for the specific language
|
||||
* governing rights and limitations under the License.
|
||||
*
|
||||
* ========================================================================
|
||||
*
|
||||
* Description: Configuration for clib builds.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#ifndef _VARIETY_H_INCLUDED
|
||||
#define _VARIETY_H_INCLUDED
|
||||
|
||||
//
|
||||
// Note: for the DLL versions of the runtime libraries, this file must be
|
||||
// included before any of the runtime header files.
|
||||
//
|
||||
|
||||
#ifndef _COMDEF_H_INCLUDED
|
||||
#include <_comdef.h>
|
||||
#endif
|
||||
|
||||
// specialized data reference macro
|
||||
#define _HUGEDATA _WCDATA
|
||||
|
||||
// memory model macros
|
||||
#if defined(__SMALL__)
|
||||
#define __SMALL_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#elif defined(__FLAT__)
|
||||
#define __SMALL_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#elif defined(__MEDIUM__)
|
||||
#define __SMALL_DATA__
|
||||
#define __BIG_CODE__
|
||||
#elif defined(__COMPACT__)
|
||||
#define __BIG_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#elif defined(__LARGE__)
|
||||
#define __BIG_DATA__
|
||||
#define __BIG_CODE__
|
||||
#elif defined(__HUGE__)
|
||||
#define __BIG_DATA__
|
||||
#define __BIG_CODE__
|
||||
#elif defined(__AXP__) || defined(__PPC__) || defined(__MIPS__)
|
||||
// these effectively use near data references
|
||||
#define __SMALL_DATA__
|
||||
#define __SMALL_CODE__
|
||||
#else
|
||||
#error unable to configure memory model
|
||||
#endif
|
||||
|
||||
// operating system and processor macros
|
||||
#if defined(__GENERIC__)
|
||||
#if defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __GENERIC_386__
|
||||
#elif defined(M_I86)
|
||||
#define __REAL_MODE__
|
||||
#define __GENERIC_086__
|
||||
#else
|
||||
#error unrecognized processor for GENERIC
|
||||
#endif
|
||||
#elif defined(__OS2__)
|
||||
#if defined(M_I86)
|
||||
#define __REAL_MODE__
|
||||
#define __OS2_286__
|
||||
#elif defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __OS2_386__
|
||||
#define __WARP__
|
||||
#elif defined(__PPC__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __OS2_PPC__
|
||||
#define __WARP__
|
||||
#else
|
||||
#error unrecognized processor for OS2
|
||||
#endif
|
||||
#elif defined(__NT__)
|
||||
#if !defined(WIN32_LEAN_AND_MEAN) && !defined(WIN32_NICE_AND_FAT)
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
#define __PROTECT_MODE__
|
||||
#if defined(__386__)
|
||||
#define __NT_386__
|
||||
#elif defined(__AXP__)
|
||||
#define __NT_AXP__
|
||||
#elif defined(__PPC__)
|
||||
#define __NT_PPC__
|
||||
#else
|
||||
#error unrecognized processor for NT
|
||||
#endif
|
||||
#elif defined(__WINDOWS__) || defined(__WINDOWS_386__)
|
||||
#define __PROTECT_MODE__
|
||||
#if defined(__386__)
|
||||
#define __WINDOWS__
|
||||
#elif defined(M_I86)
|
||||
#define __WINDOWS_286__
|
||||
#else
|
||||
#error unrecognized processor for WINDOWS
|
||||
#endif
|
||||
#elif defined(__DOS__)
|
||||
#if defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __DOS_386__
|
||||
#elif defined(M_I86)
|
||||
#define __REAL_MODE__
|
||||
#define __DOS_086__
|
||||
#else
|
||||
#error unrecognized processor for DOS
|
||||
#endif
|
||||
#elif defined(__OSI__)
|
||||
#if defined(__386__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __OSI_386__
|
||||
#else
|
||||
#error unrecognized processor for OSI
|
||||
#endif
|
||||
#elif defined(__QNX__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __UNIX__
|
||||
#if defined(__386__)
|
||||
#define __QNX_386__
|
||||
#elif defined(M_I86)
|
||||
#define __QNX_286__
|
||||
#else
|
||||
#error unrecognized processor for QNX
|
||||
#endif
|
||||
#elif defined(__LINUX__)
|
||||
#define __PROTECT_MODE__
|
||||
#define __UNIX__
|
||||
#if defined(__386__)
|
||||
#define __LINUX_386__
|
||||
#elif defined(__PPC__)
|
||||
#define __LINUX_PPC__
|
||||
#elif defined(__MIPS__)
|
||||
#define __LINUX_MIPS__
|
||||
#else
|
||||
#error unrecognized processor for Linux
|
||||
#endif
|
||||
#elif defined(__NETWARE__)
|
||||
#define __PROTECT_MODE__
|
||||
#if defined(__386__)
|
||||
#define __NETWARE_386__
|
||||
#else
|
||||
#error unrecognized processor for NETWARE
|
||||
#endif
|
||||
#else
|
||||
#error unable to configure operating system and processor
|
||||
#endif
|
||||
|
||||
// handle building dll's with appropriate linkage
|
||||
#if !defined(__SW_BR) && (defined(__WARP__) || defined(__NT__))
|
||||
#if defined(__MAKE_DLL_CLIB)
|
||||
#undef _WCRTLINK
|
||||
#undef _WCIRTLINK
|
||||
#undef _WCRTLINKD
|
||||
#undef _WMRTLINK
|
||||
#undef _WMIRTLINK
|
||||
#undef _WMRTLINKD
|
||||
#undef _WPRTLINK
|
||||
#undef _WPIRTLINK
|
||||
#undef _WPRTLINKD
|
||||
#if defined(__NT__)
|
||||
#define _WCRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllexport)
|
||||
#define _WMRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllimport)
|
||||
#define _WPRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllimport)
|
||||
#elif defined(__WARP__)
|
||||
#define _WCRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllexport)
|
||||
#define _WMRTLINK _WRTLCALL
|
||||
#define _WMIRTLINK _WRTLCALL
|
||||
#define _WMRTLINKD
|
||||
#define _WPRTLINK _WRTLCALL
|
||||
#define _WPIRTLINK _WRTLCALL
|
||||
#define _WPRTLINKD
|
||||
#endif
|
||||
#elif defined(__MAKE_DLL_MATHLIB)
|
||||
#define _RTDLL
|
||||
#undef _WCRTLINK
|
||||
#undef _WCIRTLINK
|
||||
#undef _WCRTLINKD
|
||||
#undef _WMRTLINK
|
||||
#undef _WMIRTLINK
|
||||
#undef _WMRTLINKD
|
||||
#undef _WPRTLINK
|
||||
#undef _WPIRTLINK
|
||||
#undef _WPRTLINKD
|
||||
#if defined(__NT__)
|
||||
#define _WCRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllimport)
|
||||
#define _WMRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllexport)
|
||||
#define _WPRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllimport)
|
||||
#elif defined(__WARP__)
|
||||
#define _WCRTLINK _WRTLCALL
|
||||
#define _WCIRTLINK _WRTLCALL
|
||||
#define _WCRTLINKD
|
||||
#define _WMRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllexport)
|
||||
#define _WPRTLINK _WRTLCALL
|
||||
#define _WPIRTLINK _WRTLCALL
|
||||
#define _WPRTLINKD
|
||||
#endif
|
||||
#elif defined(__MAKE_DLL_CPPLIB)
|
||||
#define _RTDLL
|
||||
#undef _WCRTLINK
|
||||
#undef _WCIRTLINK
|
||||
#undef _WCRTLINKD
|
||||
#undef _WMRTLINK
|
||||
#undef _WMIRTLINK
|
||||
#undef _WMRTLINKD
|
||||
#undef _WPRTLINK
|
||||
#undef _WPIRTLINK
|
||||
#undef _WPRTLINKD
|
||||
#if defined(__NT__)
|
||||
#define _WCRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WCRTLINKD __declspec(dllimport)
|
||||
#define _WMRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMIRTLINK __declspec(dllimport) _WRTLCALL
|
||||
#define _WMRTLINKD __declspec(dllimport)
|
||||
#define _WPRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllexport)
|
||||
#elif defined(__WARP__)
|
||||
#define _WCRTLINK _WRTLCALL
|
||||
#define _WCIRTLINK _WRTLCALL
|
||||
#define _WCRTLINKD
|
||||
#define _WMRTLINK _WRTLCALL
|
||||
#define _WMIRTLINK _WRTLCALL
|
||||
#define _WMRTLINKD
|
||||
#define _WPRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPIRTLINK __declspec(dllexport) _WRTLCALL
|
||||
#define _WPRTLINKD __declspec(dllexport)
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define __ptr_check( p, a )
|
||||
#define __null_check( p, a )
|
||||
#define __stream_check( s, a )
|
||||
|
||||
#define __ROUND_UP_SIZE( __x, __amt ) (((__x)+((__amt)-1))&(~((__amt)-1)))
|
||||
///
|
||||
/// This doesn't work for far pointer's
|
||||
///
|
||||
///#define __ROUND_UP_PTR( __x, __amt ) ((void *)__ROUND_UP_SIZE((unsigned)(__x),__amt))
|
||||
#if defined(M_I86)
|
||||
#define __ALIGN_SIZE( __x ) __ROUND_UP_SIZE( __x, 2 )
|
||||
// #define __ALIGN_PTR( __x ) __ROUND_UP_PTR( __x, 2 )
|
||||
#elif defined(__386__)
|
||||
#define __ALIGN_SIZE( __x ) __ROUND_UP_SIZE( __x, 4 )
|
||||
/// #define __ALIGN_PTR( __x ) __ROUND_UP_PTR( __x, 4 )
|
||||
#else
|
||||
#define __ALIGN_SIZE( __x ) __ROUND_UP_SIZE( __x, 8 )
|
||||
// #define __ALIGN_PTR( __x ) __ROUND_UP_PTR( __x, 8 )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#undef _WCRTLINKD
|
||||
#define _WCRTLINKD
|
||||
|
Reference in New Issue
Block a user