Changeset 21804 for branches/gcc-kmk


Ignore:
Timestamp:
Nov 14, 2011, 8:13:20 PM (14 years ago)
Author:
dmik
Message:

Define USE_OS2_TOOLKIT_HEADERS.

This is necessary since some APIs used by Odin are missing from the somewhat
restricted version of the OS/2 Toolkit that comes with GCC.

Location:
branches/gcc-kmk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/Config.kmk

    r21803 r21804  
    143143# Add support for MASM to the GCC compiler
    144144#
    145 TOOL_GXX3OMF_MASM                   = $(firstword $(PATH_TOOL_ALP) alp.exe)
     145TOOL_GXX3OMF_MASM                   = $(PATH_TOOL_ALP)
    146146TOOL_GXX3OMF_MASMFLAGS              = -Mb
    147147TOOL_GXX3OMF_COMPILE_MASM_OUTPUT    = $(outbase).lst
     
    168168TEMPLATE_OdinCxx_TOOL       = GXX3OMF
    169169TEMPLATE_OdinCxx_INCS       = $(PATH_ROOT)/include/win $(PATH_ROOT)/include $(PATH_ROOT)/include/incl_gcc
    170 TEMPLATE_OdinCxx_DEFS       = __WIN32OS2__ __i386__
     170TEMPLATE_OdinCxx_DEFS       = USE_OS2_TOOLKIT_HEADERS OS2EMX_PLAIN_CHAR \
     171                              __WIN32OS2__ __i386__
    171172
    172173TEMPLATE_OdinDLL            = Odin DLL
    173174TEMPLATE_OdinDLL_EXTENDS    = OdinCxx
     175TEMPLATE_OdinDLL_EXTENDS_BY = appending
    174176TEMPLATE_OdinDLL_DEFS       = $(TEMPLATE_OdinCxx_DEFS) __WINE__ TCPV40HDRS COMCTL32UNDOC
    175177TEMPLATE_OdinDLL_LIBS       = $(PATH_STAGE_LIB)/odincrt.lib \
     
    178180TEMPLATE_OdinCRT            = OdinCRT DLL
    179181TEMPLATE_OdinCRT_EXTENDS    = OdinCxx
     182TEMPLATE_OdinCRT_EXTENDS_BY = appending
    180183TEMPLATE_OdinCRT_DEFS       = __WINE__
    181184TEMPLATE_OdinCRT_LIBS       = $(PATH_STAGE_LIB)/initdll.lib
     
    201204 endif
    202205endif
     206
     207#------------------------------------------------------------------------------
     208# Post-processing
     209#------------------------------------------------------------------------------
     210
     211ifeq ($(PATH_TOOL_ALP),)
     212ifneq ($(PATH_SDK_OS2TK4),)
     213PATH_TOOL_ALP := $(PATH_SDK_OS2TK4)/bin/alp.exe
     214else
     215PATH_TOOL_ALP := alp.exe
     216endif
     217endif
     218
     219ifneq ($(PATH_SDK_OS2TK4),)
     220#
     221# We can't add Toolkit includes in _INCS (it will casuse then to be searched
     222# before GCC headers and lead to conflicts), so use the environment variable.
     223#
     224C_INCLUDE_PATH     := $(if $(C_INCLUDE_PATH),$(C_INCLUDE_PATH);)$(PATH_SDK_OS2TK4)/h
     225CPLUS_INCLUDE_PATH := $(if $(CPLUS_INCLUDE_PATH),$(CPLUS_INCLUDE_PATH);)$(PATH_SDK_OS2TK4)/h
     226endif
  • branches/gcc-kmk/LocalConfig.kmk.tpl

    r21750 r21804  
    2222
    2323#
    24 # Path to the IBM The IBM Assembly Language Processor (may be found in the
    25 # OS/2 toolkit). Defaults to 'alp.exe'.
     24# Path to the OS/2 Toolkit versoin 4.x. If not set, it is assumed that the
     25# toolkit is accessible through the environment.
     26#
     27# PATH_SDK_OS2TK4 := D:/Dev/OS2TK45
     28
     29#
     30# Path to the IBM Assembly Language Processor (may be found in the
     31# OS/2 toolkit). Defaults to '$(PATH_SDK_OS2TK4)/bin/alp.exe' if
     32# PATH_SDK_OS2TK4 is set, or to 'alp.exe' otherwise.
    2633#
    2734# PATH_TOOL_ALP := alp.exe
    28  
  • branches/gcc-kmk/include/odin.h

    r21787 r21804  
    9393  #ifdef __INNOTEK_LIBC__
    9494  #define SYSTEM    _System
     95  #define _LNK_CONV _Optlink
    9596  #else
    9697  #define SYSTEM    CDECL
  • branches/gcc-kmk/include/os2wrap.h

    r21723 r21804  
    55#ifdef __EMX__
    66
    7 #define OS2EMX_PLAIN_CHAR
    8 
    97#ifndef USE_OS2_TOOLKIT_HEADERS
    108
     
    1210#define OS2_INCLUDED
    1311#define OS2DEF_INCLUDED
     12#define WIN_INCLUDED
    1413#define __OS2_H__
    1514
     
    1716typedef unsigned short APIRET16;
    1817#define APIENTRY16 _Far16 _Pascal
    19 #define _LNK_CONV _Optlink
    2018
    2119#define INCL_LONGLONG_STRUCTS
  • branches/gcc-kmk/src/kernel32/conbuffer.cpp

    r21302 r21804  
    5353 * Includes                                                                  *
    5454 *****************************************************************************/
     55
     56// Vio/Kbd/Mou declarations conflict in GCC and in real OS2TK headers;
     57// force GCC declarations since we link against GCC libs
     58#if defined (__EMX__) && defined (USE_OS2_TOOLKIT_HEADERS)
     59#undef USE_OS2_TOOLKIT_HEADERS
     60#endif
    5561
    5662#define  INCL_WIN
  • branches/gcc-kmk/src/kernel32/conbuffervio.cpp

    r10010 r21804  
    5353 * Includes                                                                  *
    5454 *****************************************************************************/
     55
     56// Vio/Kbd/Mou declarations conflict in GCC and in real OS2TK headers;
     57// force GCC declarations since we link against GCC libs
     58#if defined (__EMX__) && defined (USE_OS2_TOOLKIT_HEADERS)
     59#undef USE_OS2_TOOLKIT_HEADERS
     60#endif
    5561
    5662#define  INCL_WIN
  • branches/gcc-kmk/src/kernel32/console.cpp

    r21755 r21804  
    5353*   Header Files                                                               *
    5454*******************************************************************************/
    55 #include <process.h>
    56 #include <stdlib.h>
    57 #include <string.h>
     55
     56// Vio/Kbd/Mou declarations conflict in GCC and in real OS2TK headers;
     57// force GCC declarations since we link against GCC libs
     58#if defined (__EMX__) && defined (USE_OS2_TOOLKIT_HEADERS)
     59#undef USE_OS2_TOOLKIT_HEADERS
     60#endif
    5861
    5962#define  INCL_WIN
     
    6972#define  INCL_AVIO
    7073#include <os2wrap.h>         //Odin32 OS/2 api wrappers
     74
     75#include <process.h>
     76#include <stdlib.h>
     77#include <string.h>
    7178
    7279#include <win32type.h>
  • branches/gcc-kmk/tools/common/kError.cpp

    r21759 r21804  
    1616*   Header Files                                                               *
    1717*******************************************************************************/
    18 #ifdef __EMX__
     18#if defined (__EMX__) && !defined (USE_OS2_TOOLKIT_HEADERS)
    1919#define __OS2DEF__
    20 #define OS2EMX_PLAIN_CHAR
    2120#endif
    2221#include <os2.h>
  • branches/gcc-kmk/tools/common/kFile.cpp

    r21759 r21804  
    1919*   Header Files                                                               *
    2020*******************************************************************************/
    21 #ifdef __EMX__
     21#if defined (__EMX__) && !defined (USE_OS2_TOOLKIT_HEADERS)
    2222#define __OS2DEF__
    23 #define OS2EMX_PLAIN_CHAR
    2423#endif
    2524#include <os2.h>
Note: See TracChangeset for help on using the changeset viewer.