Changeset 21755 for branches/gcc-kmk/src
- Timestamp:
- Oct 28, 2011, 2:04:25 AM (14 years ago)
- Location:
- branches/gcc-kmk/src/kernel32
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/kernel32/_ras.cpp
r21739 r21755 167 167 } RASCONTEXT_I; 168 168 169 extern "C" { 170 169 171 void rasSaveContext(RASCONTEXT_I *pcontext) 170 172 { … … 2195 2197 } 2196 2198 2199 } // extern "C" 2200 -
branches/gcc-kmk/src/kernel32/async.cpp
r7549 r21755 74 74 static GLOBALS Globals; 75 75 76 extern "C" { 76 77 77 78 /***************************************************************************** … … 108 109 } 109 110 111 } // extern "C" 112 -
branches/gcc-kmk/src/kernel32/atom.cpp
r21737 r21755 34 34 #define LOOKUP_NOCASE 0x80000000 35 35 36 extern "C" { 37 36 38 ATOM APIENTRY LookupAtom(HATOMTBL hAtomTbl, PSZ psz, ULONG actionMask); 37 39 … … 359 361 //****************************************************************************** 360 362 //****************************************************************************** 363 364 } // extern "C" -
branches/gcc-kmk/src/kernel32/console.cpp
r21426 r21755 2308 2308 } 2309 2309 2310 extern "C" { 2310 2311 2311 2312 /***************************************************************************** … … 3772 3773 return fResult; 3773 3774 } 3775 3776 } // extern "C" -
branches/gcc-kmk/src/kernel32/critsection.cpp
r21302 r21755 2 2 /* 3 3 * Win32 critical sections 4 * 4 * 5 5 * 6 6 * … … 238 238 return ret; 239 239 } 240 241 extern "C" { 240 242 241 243 /*********************************************************************** … … 416 418 } 417 419 #endif 418 420 419 421 if (--crit->RecursionCount) 420 422 { … … 470 472 } 471 473 474 } // extern "C" 475 -
branches/gcc-kmk/src/kernel32/dbgwrap.cpp
r21567 r21755 18 18 #include <dbgwrap.h> 19 19 20 extern "C" { 20 21 21 22 BOOL WINAPI TryEnterCriticalSection( CRITICAL_SECTION *crit ); … … 950 951 DEBUGWRAP_LVL2_12(OemToCharBuffW) 951 952 DEBUGWRAP_LVL2_8(OemToCharW) 953 954 } // extern "C" -
branches/gcc-kmk/src/kernel32/exceptions.cpp
r21717 r21755 109 109 static PEXCEPTION_HANDLER StartupCodeHandler = NULL; 110 110 111 extern "C" PWINEXCEPTION_FRAME GetExceptionRecord(ULONG offset, ULONG segment); 111 extern "C" { 112 113 PWINEXCEPTION_FRAME GetExceptionRecord(ULONG offset, ULONG segment); 112 114 113 115 LONG WIN32API UnhandledExceptionFilter(PWINEXCEPTION_POINTERS lpexpExceptionInfo); … … 118 120 PCONTEXTRECORD pCtxRec, PVOID p, PSZ szTrapDump); 119 121 120 extern "C"121 122 int __cdecl __seh_handler(PWINEXCEPTION_RECORD pRec, 122 123 PWINEXCEPTION_FRAME pFrame, 123 124 PCONTEXTRECORD pContext, PVOID pVoid); 124 125 125 extern "C"126 126 PWINEXCEPTION_FRAME __cdecl __seh_get_prev_frame(PWINEXCEPTION_FRAME pFrame); 127 127 … … 1791 1791 * Author : Sander van Leeuwen [Sun, 1999/08/21 12:16] 1792 1792 *****************************************************************************/ 1793 void OS2SetExceptionHandler(void *exceptframe)1793 void SYSTEM OS2SetExceptionHandler(void *exceptframe) 1794 1794 { 1795 1795 PEXCEPTIONREGISTRATIONRECORD pExceptRec = (PEXCEPTIONREGISTRATIONRECORD)exceptframe; … … 1954 1954 * Author : Sander van Leeuwen [Sun, 1999/08/21 12:16] 1955 1955 *****************************************************************************/ 1956 void OS2UnsetExceptionHandler(void *exceptframe)1956 void SYSTEM OS2UnsetExceptionHandler(void *exceptframe) 1957 1957 { 1958 1958 PEXCEPTIONREGISTRATIONRECORD pExceptRec = (PEXCEPTIONREGISTRATIONRECORD)exceptframe; … … 1986 1986 //***************************************************************************** 1987 1987 1988 } // extern "C" 1989 -
branches/gcc-kmk/src/kernel32/exceptutil.asm
r10409 r21755 71 71 72 72 public _RtlUnwind@16 73 extrn OS2R TLUNWIND: near73 extrn OS2RtlUnwind : near 74 74 75 75 _RtlUnwind@16 proc near … … 102 102 mov eax, ss 103 103 push eax 104 call OS2R TLUNWIND104 call OS2RtlUnwind 105 105 106 106 ret 16 ;__stdcall -
branches/gcc-kmk/src/kernel32/exceptutil.h
r21619 r21755 20 20 void __cdecl SetExceptionChain(DWORD); 21 21 22 extern "C"PVOID QueryExceptionChain();22 PVOID QueryExceptionChain(); 23 23 24 void OS2SetExceptionHandler(void *exceptframe);25 void OS2UnsetExceptionHandler(void *exceptframe);24 void SYSTEM OS2SetExceptionHandler(void *exceptframe); 25 void SYSTEM OS2UnsetExceptionHandler(void *exceptframe); 26 26 27 27 #ifdef DEBUG -
branches/gcc-kmk/src/kernel32/heap.cpp
r21435 r21755 998 998 } 999 999 1000 extern "C" { 1001 1000 1002 /************************************************************************* 1001 1003 * EncodePointer … … 1013 1015 } 1014 1016 1017 } // extern "C" 1018 -
branches/gcc-kmk/src/kernel32/network.cpp
r7603 r21755 19 19 #define DBG_LOCALLOG DBG_network 20 20 #include "dbglocal.h" 21 22 extern "C" { 21 23 22 24 //****************************************************************************** … … 67 69 //****************************************************************************** 68 70 //****************************************************************************** 71 72 } // extern "C" -
branches/gcc-kmk/src/kernel32/ordinals.cpp
r21737 r21755 32 32 *****************************************************************************/ 33 33 34 35 36 34 /***************************************************************************** 37 35 * Prototypes * 38 36 *****************************************************************************/ 37 38 extern "C" { 39 39 40 40 /***************************************************************************** … … 142 142 arg3)); 143 143 } 144 145 } // extern "C" -
branches/gcc-kmk/src/kernel32/oslibwps.cpp
r9889 r21755 37 37 *pszFilename1 = 0; 38 38 } 39 40 extern "C" { 41 39 42 //****************************************************************************** 40 43 // ODIN_DisableFolderShellLink 41 44 // 42 // Disable object creation in Odin folder. Desktop shortcuts will still be 45 // Disable object creation in Odin folder. Desktop shortcuts will still be 43 46 // created as WPS objects on the desktop. 44 47 // … … 84 87 } 85 88 } 86 else { 89 else { 87 90 dprintf(("OSLibWinCreateObject: pszLink == NULL!!")); 88 91 goto fail; … … 115 118 116 119 fWin32App = ODIN_IsWin32App(pszPath); 117 if(!fWin32App) 120 if(!fWin32App) 118 121 {//don't use the PE loader; use the program path directly 119 122 sprintf(pszSetupString, "PROGTYPE=PM;OBJECTID=<%s%s>;EXENAME=%s;SET BEGINLIBPATH=%s;STARTUPDIR=%s;ICONFILE=%s;PARAMETERS=", (fDesktop) ? WPS_SHELLLINK_DESKTOP : "", pszName, pszPath, szSystemDir, szWorkDir, pszIcoPath); … … 182 185 strcpy(szLinkFile, lpszLink); 183 186 strupr(szLinkFile); 184 if(strstr(szLinkFile, ".LNK")) 187 if(strstr(szLinkFile, ".LNK")) 185 188 {//could be a shelllink file, check for magic string at start of the file 186 189 FILE *lnkfile; … … 190 193 191 194 char szMagic[sizeof(WPS_SHELLLINK_MAGIC)]; 192 195 193 196 memset(szMagic, 0, sizeof(szMagic)); 194 197 fread(szMagic, sizeof(szMagic)-1, 1, lnkfile); … … 203 206 //****************************************************************************** 204 207 // OSLibWinDeleteObject 205 // 208 // 206 209 // Delete object with object id stored in the file 207 210 // 208 211 // Parameters: 209 // 212 // 210 213 // LPSTR lpszLink - shelllink file 211 214 // … … 226 229 227 230 char szMagic[sizeof(WPS_SHELLLINK_MAGIC)]; 228 231 229 232 memset(szMagic, 0, sizeof(szMagic)); 230 233 fread(szMagic, sizeof(szMagic)-1, 1, lnkfile); 231 234 232 if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC)) 235 if(!strcmp(szMagic, WPS_SHELLLINK_MAGIC)) 233 236 { 234 237 fseek(lnkfile, 0, SEEK_END); 235 238 wpsobjectidsize = ftell(lnkfile) - sizeof(WPS_SHELLLINK_MAGIC) + 2; 236 239 fseek(lnkfile, sizeof(WPS_SHELLLINK_MAGIC)-1, SEEK_SET); 237 240 238 241 memset(szObjectId, 0, sizeof(szObjectId)); 239 242 szObjectId[0] = '<'; … … 251 254 //****************************************************************************** 252 255 //****************************************************************************** 256 257 } // extern "C" -
branches/gcc-kmk/src/kernel32/process.cpp
r21720 r21755 40 40 static DWORD ProcessAffinityMask = 1; 41 41 static PDB *PROCESS_First = &ProcessPDB; 42 43 extern "C" { 42 44 43 45 /*********************************************************************** … … 515 517 //****************************************************************************** 516 518 //****************************************************************************** 519 520 } // extern "C" 521 -
branches/gcc-kmk/src/kernel32/profile.cpp
r21355 r21755 772 772 } 773 773 774 extern "C" { 775 774 776 int WIN32API PROFILE_SetOdinIniString(LPCSTR section_name, LPCSTR key_name, 775 777 LPCSTR value) … … 1408 1410 *p='\0'; 1409 1411 ret = PROFILE_SetString( section, buf, p+1 ); 1410 1412 1411 1413 } 1412 1414 HeapFree( GetProcessHeap(), 0, buf ); … … 1637 1639 * CloseProfileUserMapping (KERNEL.138) 1638 1640 */ 1639 BOOL WINAPI CloseProfileUserMapping(void) 1641 BOOL WINAPI CloseProfileUserMapping(void) 1640 1642 { 1641 1643 dprintf(("CloseProfileUserMapping: STUB")); … … 1649 1651 } 1650 1652 1653 } // extern "C" 1654 -
branches/gcc-kmk/src/kernel32/registry.cpp
r21302 r21755 79 79 } 80 80 81 extern "C" { 82 81 83 void WIN32API SetRegistryRootKey(HKEY hRootkey, HKEY hKey) 82 84 { 83 85 switch((DWORD)hRootkey) 84 86 { 85 case HKEY_CLASSES_ROOT: 87 case HKEY_CLASSES_ROOT: 86 88 hKeyClassesRoot = hKey; 87 89 break; … … 112 114 LONG WIN32API RegCloseKey(HKEY hKey) 113 115 { 114 switch(hKey) 116 switch(hKey) 115 117 {//Closing a root key should just return success (matters for custom builds) 116 118 case HKEY_CLASSES_ROOT: … … 166 168 astring, 167 169 phkResult); 168 170 169 171 if (NULL != astring) 170 172 FreeAsciiString(astring); 171 173 172 174 return(rc); 173 175 } … … 247 249 phkResult, 248 250 lpdwDisposition); 249 251 250 252 if (NULL != astring1) 251 253 FreeAsciiString(astring1); 252 254 253 255 if (NULL != astring2) 254 256 FreeAsciiString(astring2); 255 257 256 258 return(rc); 257 259 } … … 278 280 rc = O32_RegDeleteKey(ConvertKey(hKey), 279 281 astring); 280 282 281 283 if (NULL != astring) 282 284 FreeAsciiString(astring); 283 285 284 286 return(rc); 285 287 } … … 343 345 rc = O32_RegDeleteValue(ConvertKey(hKey), 344 346 astring); 345 347 346 348 if (NULL != astring) 347 349 FreeAsciiString(astring); 348 350 349 351 return(rc); 350 352 } … … 385 387 *****************************************************************************/ 386 388 387 LONG WIN32API RegEnumKeyW(HKEY hKey, DWORD iSubKey, LPWSTR lpszName, 389 LONG WIN32API RegEnumKeyW(HKEY hKey, DWORD iSubKey, LPWSTR lpszName, 388 390 DWORD cchName) 389 391 { … … 529 531 * Author : Patrick Haller [Tue, 1998/06/16 23:00] 530 532 *****************************************************************************/ 531 533 532 534 LONG WIN32API RegEnumValueW(HKEY hkey, 533 535 DWORD iValue, … … 638 640 if(rc) 639 641 *arg3 = 0; 640 642 641 643 if (NULL != astring) 642 644 FreeAsciiString(astring); 643 645 644 646 return(rc); 645 647 } … … 705 707 if(rc) 706 708 *arg5 = 0; 707 709 708 710 if (NULL != astring) 709 711 FreeAsciiString(astring); 710 712 711 713 return(rc); 712 714 } … … 741 743 lpcchClass, lpdwReserved, lpcSubKeys, 742 744 lpcchMaxSubKey, lpcchMaxClass, lpcValues, 743 lpcchMaxValueName, lpcbMaxValueData, 745 lpcchMaxValueName, lpcbMaxValueData, 744 746 lpcbSecurityDescriptor,lpftLastWriteTime); 745 747 } … … 776 778 lpcchClass, lpdwReserved, lpcSubKeys, 777 779 lpcchMaxSubKey, lpcchMaxClass, lpcValues, 778 lpcchMaxValueName, lpcbMaxValueData, 780 lpcchMaxValueName, lpcbMaxValueData, 779 781 lpcbSecurityDescriptor,lpftLastWriteTime); 780 782 if(rc == ERROR_SUCCESS) … … 786 788 free(astring); 787 789 } 788 else 790 else 789 791 if(lpszClass) *lpszClass = 0; 790 792 } … … 852 854 } 853 855 854 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 855 pcbValue) 856 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 857 pcbValue) 856 858 { 857 859 *pcbValue = *pcbValue * sizeof(WCHAR); //size in bytes!! 858 860 } 859 861 860 862 if (NULL != astring1) 861 863 FreeAsciiString(astring1); 862 864 863 865 return(rc); 864 866 } … … 986 988 } 987 989 988 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 989 lpcbData) 990 if((rc == ERROR_SUCCESS || rc == ERROR_MORE_DATA) && 991 lpcbData) 990 992 { 991 993 switch(*lpdwType) { … … 1001 1003 if (NULL != astring) 1002 1004 FreeAsciiString(astring); 1003 1005 1004 1006 if(akeydata) 1005 1007 free(akeydata); … … 1073 1075 1074 1076 rc = RegSetValueA(hkey, astring1, dwType, astring2, cbData); 1075 1077 1076 1078 if (NULL != astring1) 1077 1079 FreeAsciiString(astring1); 1078 1080 1079 1081 if (NULL != astring2) 1080 1082 FreeAsciiString(astring2); 1081 1083 1082 1084 return(rc); 1083 1085 } … … 1184 1186 } 1185 1187 rc = RegSetValueExA(hkey, astring, dwReserved, fdwType, lpbData, cbData); 1186 1188 1187 1189 if(akeydata) 1188 1190 FreeAsciiString(akeydata); 1189 1191 1190 1192 if (NULL != astring) 1191 1193 FreeAsciiString(astring); 1192 1194 1193 1195 return(rc); 1194 1196 } … … 1715 1717 } 1716 1718 1719 } // extern "C" 1720 -
branches/gcc-kmk/src/kernel32/stubs.cpp
r21737 r21755 149 149 typedef DWORD CALID; 150 150 151 extern "C" { 151 152 152 153 /***************************************************************************** … … 1579 1580 } 1580 1581 1581 1582 } // extern "C" 1583 -
branches/gcc-kmk/src/kernel32/thunk.cpp
r8449 r21755 23 23 #define DBG_LOCALLOG DBG_thunk 24 24 #include "dbglocal.h" 25 26 extern "C" { 25 27 26 28 /************************************************************************ … … 405 407 void WINAPI SUnMapLS_IP_EBP_40(CONTEXT86 *context) { x_SUnMapLS_IP_EBP_x(context,40); } 406 408 409 } // extern "C" 410 -
branches/gcc-kmk/src/kernel32/time.cpp
r21732 r21755 36 36 #include "dbglocal.h" 37 37 38 extern "C" { 38 39 39 40 //****************************************************************************** … … 370 371 //****************************************************************************** 371 372 372 373 } // extern "C" 374 -
branches/gcc-kmk/src/kernel32/windllpe2lx.cpp
r21716 r21755 43 43 *******************************************************************************/ 44 44 extern BOOL fPeLoader; 45 46 extern "C" { 45 47 46 48 /** … … 134 136 } 135 137 138 } // extern "C" 136 139 137 140 /** -
branches/gcc-kmk/src/kernel32/winexepe2lx.cpp
r10397 r21755 49 49 BOOL Win32Pe2LxExe::fEarlyInit = FALSE; 50 50 51 extern "C" { 51 52 52 53 /** … … 235 236 //****************************************************************************** 236 237 //****************************************************************************** 238 239 } // extern "C" -
branches/gcc-kmk/src/kernel32/wprocess.cpp
r21730 r21755 109 109 PFNLXDLLLOAD pfnLxDllLoadCallback = NULL; 110 110 111 extern "C" { 111 112 112 113 //****************************************************************************** … … 3058 3059 } 3059 3060 3061 } // extern "C" 3062
Note:
See TracChangeset
for help on using the changeset viewer.