Changeset 21790 for branches


Ignore:
Timestamp:
Nov 3, 2011, 7:45:31 PM (14 years ago)
Author:
dmik
Message:

Extern "C".

Mostly, to fix the GCC bug with stdcall not suppressing C++ mangling.

Location:
branches/gcc-kmk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/include/kbdhook.h

    r10383 r21790  
    2929#define PMKBDHK_HOOK_TERM   "_hookKill@0"
    3030
     31#ifdef __cplusplus
     32extern "C" {
     33#endif
    3134
    3235typedef BOOL  (* WIN32API PFN_HOOKINIT)(ULONG hab, char *lpszWindowClass);
     
    3639BOOL WIN32API hookKill(ULONG hab);
    3740
     41#ifdef __cplusplus
     42} // extern "C"
     43#endif
     44
    3845#endif  // __KBDHOOK_H
    3946
  • branches/gcc-kmk/include/odinwrap.h

    r7357 r21790  
    6060#include <malloc.h>
    6161#include <odin.h>
     62
     63//#ifdef __cplusplus
     64extern "C" {
     65//#endif
    6266
    6367// ---------------------------------------------------------------------------
     
    7579extern char*             WIN32API dbg_GetLastCallerName();
    7680
    77 
     81//#ifdef __cplusplus
     82} // extern "C"
     83//#endif
    7884
    7985// ---------------------------------------------------------------------------
     
    13451351#define ODINPROCEDURE14(cName,t1,a1,t2,a2,t3,a3,t4,a4,t5,a5,t6,a6,t7,a7,t8,a8,t9,a9,t10,a10,t11,a11,t12,a12,t13,a13,t14,a14)  \
    13461352  void WINAPI cName(t1 a1,t2 a2,t3 a3,t4 a4,t5 a5,t6 a6,t7 a7,t8 a8,t9 a9,t10 a10,t11 a11,t12 a12,t13 a13,t14 a14)    \
    1347  
     1353
    13481354#define ODINFUNCTIONNODBG0   ODINFUNCTION0
    13491355#define ODINFUNCTIONNODBG1   ODINFUNCTION1
  • branches/gcc-kmk/include/os2newapi.h

    r21380 r21790  
    77#ifndef __OS2NEWAPI_H__
    88#define __OS2NEWAPI_H__
     9
     10#ifdef __cplusplus
     11extern "C" {
     12#endif
    913
    1014#ifdef INCL_WIN
     
    4246USHORT APIENTRY16 DosSizeSeg(SEL sel, PULONG pcbSize);
    4347
     48#ifndef __EMX__
    4449#define DosSelToFlat Dos32SelToFlat
     50#endif
    4551ULONG _Optlink DosSelToFlat(ULONG seladdr);
    4652
     53#ifndef __EMX__
    4754#define DosFlatToSel Dos32FlatToSel
     55#endif
    4856ULONG _Optlink DosFlatToSel(ULONG lin);
    4957
     
    6775                                   ULONG   ulSubFunction);
    6876
     77#ifdef __cplusplus
     78} // extern "C"
     79#endif
     80
    6981#endif //__OS2SEL_H__
  • branches/gcc-kmk/include/win/global.h

    r4 r21790  
    1818    int shmid;
    1919} SHMDATA;
     20
     21#ifdef __cplusplus
     22extern "C" {
     23#endif
    2024
    2125/* memory/global.c */
     
    4549extern BOOL ATOM_Init( WORD globalTableSel );
    4650
     51#ifdef __cplusplus
     52} // extern "C"
     53#endif
     54
    4755#endif  /* __WINE_GLOBAL_H */
  • branches/gcc-kmk/include/win/virtual.h

    r7566 r21790  
    88#define __VIRTUAL_H
    99
     10#ifdef __cplusplus
     11extern "C" {
     12#endif
     13
    1014HANDLE WINAPI VIRTUAL_MapFileA( LPCSTR name , LPVOID *lpMapping, BOOL fReadIntoMemory = FALSE);
    1115HANDLE WINAPI VIRTUAL_MapFileW( LPCWSTR name , LPVOID *lpMapping, BOOL fReadIntoMemory = FALSE);
     
    1418                          DWORD  fdwProtect, LPSTR name);
    1519
     20#ifdef __cplusplus
     21} // extern "C"
     22#endif
     23
    1624#endif  /* __VIRTUAL_H */
  • branches/gcc-kmk/src/kernel32/dbglog.cpp

    r21722 r21790  
    795795              "int 3"
    796796#endif
     797extern "C"
    797798void WIN32API DebugBreak()
    798799{
  • branches/gcc-kmk/src/kernel32/environ.cpp

    r21730 r21790  
    8585  }
    8686}
     87
     88extern "C" {
     89
    8790//******************************************************************************
    8891//******************************************************************************
     
    330333  return ret;
    331334}
     335
     336} // extern "C"
     337
    332338//******************************************************************************
    333339// Create a new process environment block based on input from the application
  • branches/gcc-kmk/src/kernel32/heap.cpp

    r21755 r21790  
    264264
    265265#pragma pack()
     266
     267extern "C" {
    266268
    267269/***********************************************************************
     
    9981000}
    9991001
    1000 extern "C" {
    1001 
    10021002/*************************************************************************
    10031003 * EncodePointer
  • branches/gcc-kmk/src/kernel32/hmdevio.cpp

    r21720 r21790  
    464464                                        lpOverlapped, lpcbTransfer, fWait, (LPVOID)pHMHandleData->dwUserData);
    465465}
     466
     467extern "C" {
     468
    466469//******************************************************************************
    467470//******************************************************************************
     
    507510//******************************************************************************
    508511//******************************************************************************
     512
     513} // extern "C"
     514
  • branches/gcc-kmk/src/kernel32/kernel32.def

    r21781 r21790  
    11731173
    11741174;code memory allocation
    1175     codeHeap                                                      @1272 NONAME
     1175    codeHeap                   = _codeHeap                        @1272 NONAME
    11761176
    11771177;fast file API's
     
    11881188    InitializeKernel32                                            @1302 NONAME
    11891189
    1190     IsExeStarted__Fv                                              @2001 NONAME
     1190    IsExeStarted               = _IsExeStarted                    @2001 NONAME
    11911191    CheckCurFS                                                    @2002 NONAME
    11921192    _SupportsCPUID                                                @2003 NONAME
     
    12221222    OSLibDosDevIOCtl                                              @2026 NONAME
    12231223
    1224     OSLibImSetMsgQueueProperty                                    @2029 NONAME
    1225 
    1226     fIsDBCSEnv                                                    @2103 NONAME
     1224    OSLibImSetMsgQueueProperty = _OSLibImSetMsgQueueProperty      @2029 NONAME
     1225
     1226    fIsDBCSEnv                 = _fIsDBCSEnv                      @2103 NONAME
    12271227
    12281228    vsnprintfW                            @2030 NONAME
  • branches/gcc-kmk/src/kernel32/kernel32dbg.def

    r21781 r21790  
    11741174
    11751175;code memory allocation
    1176     codeHeap                                                      @1272 NONAME
     1176    codeHeap                   = _codeHeap                        @1272 NONAME
    11771177
    11781178;fast file API's
     
    11891189    InitializeKernel32                                            @1302 NONAME
    11901190
    1191     IsExeStarted__Fv                                              @2001 NONAME
     1191    IsExeStarted               = _IsExeStarted                    @2001 NONAME
    11921192    CheckCurFS                                                    @2002 NONAME
    11931193    _SupportsCPUID                                                @2003 NONAME
     
    12231223    OSLibDosDevIOCtl                                              @2026 NONAME
    12241224
    1225     OSLibImSetMsgQueueProperty                                    @2029 NONAME
    1226 
    1227     fIsDBCSEnv                                                    @2103 NONAME
     1225    OSLibImSetMsgQueueProperty = _OSLibImSetMsgQueueProperty      @2029 NONAME
     1226
     1227    fIsDBCSEnv                 = _fIsDBCSEnv                      @2103 NONAME
    12281228    _hookInit@4                                                   @2104 NONAME
    12291229
  • branches/gcc-kmk/src/kernel32/oslibdos.cpp

    r21732 r21790  
    8888static  CDDRVLTR    cdDrvLtr = {0xffff, 0xffff};
    8989
     90extern "C" {
    9091
    9192/*******************************************************************************
     
    35893590}
    35903591
     3592} // extern "C"
     3593
  • branches/gcc-kmk/src/kernel32/thread.cpp

    r21716 r21790  
    6161//******************************************************************************
    6262//******************************************************************************
     63extern "C"
    6364HANDLE WIN32API CreateThread(LPSECURITY_ATTRIBUTES  lpsa,
    6465                             DWORD                  cbStack,
     
    115116  return pHandle->hmHandleData.hWin32Handle;
    116117}
     118
     119extern "C" {
     120
    117121/*****************************************************************************
    118122 * Name      : HMGetThreadPriority
     
    370374  return (lpResult);                                  /* deliver return code */
    371375}
     376
     377} // extern "C"
     378
    372379/*****************************************************************************
    373380 * Name      : HMSetThreadTerminated
     
    397404  return (lpResult);                                  /* deliver return code */
    398405}
     406
     407extern "C" {
     408
    399409//******************************************************************************
    400410//******************************************************************************
     
    654664  return FALSE;
    655665}
     666
     667} // extern "C"
     668
    656669//******************************************************************************
    657670//******************************************************************************
  • branches/gcc-kmk/src/kernel32/winexebase.cpp

    r21731 r21790  
    4444//******************************************************************************
    4545//******************************************************************************
    46 BOOL IsExeStarted()
     46extern "C" BOOL IsExeStarted()
    4747{
    4848    return fExeStarted;
  • branches/gcc-kmk/src/kernel32/winexepeldr.cpp

    r21737 r21790  
    5959//   (not other options available at this time)
    6060//******************************************************************************
     61extern "C"
    6162DWORD WIN32API CreateWin32PeLdrExe(char *szFileName, char *szCmdLine,
    6263                                   char *peoptions,
Note: See TracChangeset for help on using the changeset viewer.