Changeset 21732 for branches/gcc-kmk/src


Ignore:
Timestamp:
Oct 21, 2011, 5:13:04 PM (14 years ago)
Author:
dmik
Message:

Common compiler warnings and errors.

Location:
branches/gcc-kmk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/src/kernel32/hmparport.cpp

    r8404 r21732  
    6060
    6161#define MAX_PARALLEL_PORTS_CONFIGURATION 3
    62 static PARALLELPORTCONFIGURATION arrParallelPorts[MAX_PARALLEL_PORTS_CONFIGURATION] = 
     62static PARALLELPORTCONFIGURATION arrParallelPorts[MAX_PARALLEL_PORTS_CONFIGURATION] =
    6363{
    6464  {1, 0x378, 8, 0x778, 3},
     
    7171{
    7272  ULONG ulMagic;
    73  
     73
    7474  // Win32 Device Control Block
    7575  COMMCONFIG   CommCfg;
    76  
     76
    7777  // hardware configuration block
    7878  PPARALLELPORTCONFIGURATION pHardwareConfiguration;
     
    8383static VOID *CreateDevData()
    8484{
    85    HFILE  hfFileHandle = 0L;   
    86    UCHAR   uchParms[2] = {0, RM_COMMAND_PHYS}; 
    87    ULONG   ulParmLen = 0; 
     85   HFILE  hfFileHandle = 0L;
     86   UCHAR   uchParms[2] = {0, RM_COMMAND_PHYS};
     87   ULONG   ulParmLen = 0;
    8888   UCHAR   uchDataArea[MAX_ENUM_SIZE] = {0};
    89    UCHAR   uchDataArea2[MAX_RM_NODE_SIZE] = {0}; 
    90    ULONG   ulDataLen = 0;           
     89   UCHAR   uchDataArea2[MAX_RM_NODE_SIZE] = {0};
     90   ULONG   ulDataLen = 0;
    9191   int rc,portCount = 0;
    92  
     92
    9393   PRM_ENUMNODES_DATA enumData;
    9494   PNODEENTRY pNode;
     
    105105  }
    106106  else
    107   { 
     107  {
    108108            dprintf(("HMDeviceParPortClass: Succesfully opened Resource Manager"));
    109109
     
    114114                    CAT_RM,FUNC_RM_ENUM_NODES, uchParms, sizeof(uchParms),
    115115                    &ulParmLen,
    116                     uchDataArea,         
    117                     sizeof(uchDataArea), 
    118                     &ulDataLen);         
    119                                        
     116                    uchDataArea,
     117                    sizeof(uchDataArea),
     118                    &ulDataLen);
     119
    120120            if (rc)
    121121            {
    122                   dprintf(("HMDeviceParPortClass: Failed to get resource list (IOCTL)"));     
     122                  dprintf(("HMDeviceParPortClass: Failed to get resource list (IOCTL)"));
    123123            goto resourceLoopEnd;
    124124            }
    125125
    126126            enumData = (PRM_ENUMNODES_DATA)uchDataArea;
    127  
     127
    128128            inputData.RMHandle = enumData->NodeEntry[0].RMHandle;
    129129            inputData.Linaddr = (ULONG)&uchDataArea2[0];
    130          
     130
    131131        for (int i=0;i<enumData->NumEntries;i++)
    132132        {
    133133            ulParmLen = sizeof(inputData);                        /* Length of input parameters */
    134134            ulDataLen = sizeof(uchDataArea2);                      /* Length of data  */
    135        
     135
    136136            rc = OSLibDosDevIOCtl(hfFileHandle,           /* Handle to device */
    137137                   CAT_RM,FUNC_RM_GET_NODEINFO,
     
    146146            if (rc)
    147147            {
    148                 dprintf(("HMDeviceParPortClass: Failed to get resource node (IOCTL)"));     
    149                 break; 
     148                dprintf(("HMDeviceParPortClass: Failed to get resource node (IOCTL)"));
     149                break;
    150150            }
    151151            inputData.RMHandle = enumData->NodeEntry[i].RMHandle;
     
    163163                // @@PF Hack, but what to do no ECP info from Resource Manager!
    164164                    if (arrParallelPorts[portCount].ulPortBase == 0x378)
    165                 {       
     165                {
    166166                    arrParallelPorts[portCount].ulEcpPortBase = 0x778;
    167167                    arrParallelPorts[portCount].ulEcpPortSpan = 3;
    168168                }
    169                     else       
     169                    else
    170170                    if (arrParallelPorts[portCount].ulPortBase == 0x278)
    171                 {       
     171                {
    172172                    arrParallelPorts[portCount].ulEcpPortBase = 0x678;
    173173                    arrParallelPorts[portCount].ulEcpPortSpan = 3;
     
    178178                arrParallelPorts[portCount].ulEcpPortSpan = 0;
    179179                dprintf(("HMDeviceParPortClass: Found and registered LPT%d with Base I/O: 0x%x",portCount,arrParallelPorts[portCount].ulPortBase));
    180                 portCount ++ ;   
     180                portCount ++ ;
    181181            }
    182182        }
    183183    }
    184184resourceLoopEnd:
    185     OSLibDosClose(hfFileHandle); 
     185    OSLibDosClose(hfFileHandle);
    186186
    187187    pData = new HMDEVPARPORTDATA();
     
    194194        pData->CommCfg.dwProviderSubType = PST_PARALLELPORT;
    195195    }
    196    
     196
    197197    return pData;
    198198}
    199199//******************************************************************************
    200200//******************************************************************************
    201 HMDeviceParPortClass::HMDeviceParPortClass(LPCSTR lpDeviceName) : 
     201HMDeviceParPortClass::HMDeviceParPortClass(LPCSTR lpDeviceName) :
    202202  HMDeviceHandler(lpDeviceName)
    203203{
    204204  dprintf(("HMDeviceParPortClass::HMDevParPortClass(%s)\n",
    205205           lpDeviceName));
    206  
     206
    207207#ifndef DEVINFO_PRINTER
    208208#define DEVINFO_PRINTER         0
    209209#endif
    210  
     210
    211211  // first, we determine the number of parallel port devices available
    212  
     212
    213213  // PH 2001-12-04 Note:
    214214  // This call will not return any information about redirected LPT ports.
     
    223223  if (0 == bNumberOfParallelPorts)
    224224    return;
    225  
     225
    226226  VOID *pData;
    227227  dprintf(("HMDeviceParPortClass: Registering LPTs with Handle Manager\n"));
    228  
     228
    229229  pData = CreateDevData();
    230230  if(pData!= NULL)
    231231    HMDeviceRegisterEx("LPT1", this, pData);
    232  
     232
    233233  // add symbolic links to the "real name" of the device
    234234  if (bNumberOfParallelPorts > 0)
     
    246246    free(pszLPT);
    247247    free(pszLPT2);
    248    
     248
    249249    // add "PRN" device
    250250    HandleNamesAddSymbolicLink("PRN",        "LPT1");
     
    272272  if (bNumberOfParallelPorts == 0)
    273273    return FALSE;
    274  
     274
    275275  // can be both, "LPT1" and "LPT1:"
    276276  if(namelength > 5)
     
    283283  if(namelength == 5 && lpDeviceName[4] != ':')
    284284    return FALSE;
    285  
     285
    286286  // can support up tp LPT9
    287287  if ( (lpDeviceName[3] >= '1') &&
     
    305305           lpSecurityAttributes,
    306306           pHMHandleDataTemplate));
    307  
     307
    308308  char lptname[6];
    309309
    310310  dprintf(("HMDeviceParPortClass: Parallel port %s open request\n", lpFileName));
    311  
     311
    312312  // Don't accept any name if no parallel ports have been detected
    313313  if (bNumberOfParallelPorts == 0)
     
    315315    return ERROR_DEV_NOT_EXIST;
    316316  }
    317  
     317
    318318  strcpy(lptname, lpFileName);
    319319  lptname[4] = 0;   //get rid of : (if present) (eg LPT1:)
     
    326326                                          OSLIB_ACCESS_SHAREDENYWRITE);
    327327  SetErrorMode(oldmode);
    328  
     328
    329329  // check if handle could be opened properly
    330330  if (0 == pHMHandleData->hHMHandle)
     
    337337    APIRET rc;
    338338    pHMHandleData->lpHandlerData = new HMDEVPARPORTDATA();
    339    
     339
    340340    // Init The handle instance with the default default device config
    341341    memcpy( pHMHandleData->lpHandlerData,
    342342            pHMHandleData->lpDeviceData,
    343343            sizeof(HMDEVPARPORTDATA));
    344    
     344
    345345    // determine which port was opened
    346346    ULONG ulPortNo = lptname[3] - '1';
    347    
     347
    348348    // safety check (device no 0..8 -> LPT1..9)
    349349    if (ulPortNo > MAX_PARALLEL_PORTS_CONFIGURATION)
     
    352352      return ERROR_DEV_NOT_EXIST;
    353353    }
    354    
     354
    355355    // and save the hardware information
    356356    PHMDEVPARPORTDATA pPPD = (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData;
    357357    pPPD->pHardwareConfiguration = &arrParallelPorts[ulPortNo];
    358  
     358
    359359    return NO_ERROR;
    360360  }
     
    387387  dprintf(("HMDeviceParPortClass: Parallel port close request(%08xh)\n",
    388388           pHMHandleData));
    389  
    390   delete pHMHandleData->lpHandlerData;
     389
     390  delete (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData;
    391391  return OSLibDosClose(pHMHandleData->hHMHandle);
    392392}
     
    511511//******************************************************************************
    512512//******************************************************************************
    513 BOOL HMDeviceParPortClass::DeviceIoControl(PHMHANDLEDATA pHMHandleData, 
     513BOOL HMDeviceParPortClass::DeviceIoControl(PHMHANDLEDATA pHMHandleData,
    514514                                           DWORD dwIoControlCode,
    515                                            LPVOID lpInBuffer, 
     515                                           LPVOID lpInBuffer,
    516516                                           DWORD nInBufferSize,
    517                                            LPVOID lpOutBuffer, 
     517                                           LPVOID lpOutBuffer,
    518518                                           DWORD nOutBufferSize,
    519                                            LPDWORD lpBytesReturned, 
     519                                           LPDWORD lpBytesReturned,
    520520                                           LPOVERLAPPED lpOverlapped)
    521521{
     
    528528        msg = "IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO";
    529529        break;
    530      
     530
    531531      case IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO:
    532532        msg = "IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO";
    533533        break;
    534534    }
    535  
     535
    536536    if(msg) {
    537537        dprintf(("HMDeviceParPortClass::DeviceIoControl %s %x %d %x %d %x %x", msg, lpInBuffer, nInBufferSize,
     
    545545      {
    546546        PPARALLEL_PORT_INFORMATION pPPI = (PPARALLEL_PORT_INFORMATION)lpOutBuffer;
    547        
    548         if(nOutBufferSize < sizeof(PARALLEL_PORT_INFORMATION) || !pPPI) 
     547
     548        if(nOutBufferSize < sizeof(PARALLEL_PORT_INFORMATION) || !pPPI)
    549549        {
    550550          SetLastError(ERROR_INSUFFICIENT_BUFFER);
    551551          return FALSE;
    552552        }
    553        
     553
    554554        if(lpBytesReturned)
    555555          *lpBytesReturned = sizeof(PARALLEL_PORT_INFORMATION);
    556        
     556
    557557        // fill in the data values
    558558        PHMDEVPARPORTDATA pPPD = (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData;
    559        
     559
    560560        // @@@PH
    561561        // Specifies the bus relative base I/O address of the parallel port registers.
    562562        pPPI->OriginalController.LowPart  = pPPD->pHardwareConfiguration->ulPortBase;
    563563        pPPI->OriginalController.HighPart = 0;
    564        
     564
    565565        // Pointer to the system-mapped base I/O location of the parallel port registers.
    566566        pPPI->Controller = NULL;
    567        
     567
    568568        // Specifies the size, in bytes, of the I/O space, allocated to the parallel port.
    569569        pPPI->SpanOfController = pPPD->pHardwareConfiguration->ulPortSpan;
    570        
     570
    571571        // Pointer to a callback routine that a kernel-mode driver can use to try to allocate the parallel port.
    572572        pPPI->TryAllocatePort = NULL;
    573        
     573
    574574        // Pointer to a callback routine that a kernel-mode driver can use to free the parallel port.
    575575        pPPI->FreePort = NULL;
    576        
     576
    577577        // Pointer to a callback routine that a kernel-mode driver can use to determine the number of requests on the work queue of the parallel port.
    578578        pPPI->QueryNumWaiters = NULL;
    579        
     579
    580580        // Pointer to the device extension of parallel port.
    581581        pPPI->Context = NULL;
     
    583583        return TRUE;
    584584      }
    585      
    586      
     585
     586
    587587      case IOCTL_INTERNAL_GET_PARALLEL_PNP_INFO:
    588588      {
    589589        PPARALLEL_PNP_INFORMATION pPPI = (PPARALLEL_PNP_INFORMATION)lpOutBuffer;
    590        
     590
    591591        if(nOutBufferSize < sizeof(PARALLEL_PNP_INFORMATION) || !pPPI)
    592592        {
     
    594594          return FALSE;
    595595        }
    596        
     596
    597597        if(lpBytesReturned)
    598598          *lpBytesReturned = sizeof(PARALLEL_PNP_INFORMATION);
    599        
     599
    600600        // fill in the data values
    601601        PHMDEVPARPORTDATA pPPD = (PHMDEVPARPORTDATA)pHMHandleData->lpHandlerData;
    602        
     602
    603603        // @@@PH
    604         // Specifies the base physical address that the system-supplied 
    605         // function driver for parallel ports uses to control the ECP 
     604        // Specifies the base physical address that the system-supplied
     605        // function driver for parallel ports uses to control the ECP
    606606        // operation of the parallel port.
    607607        pPPI->OriginalEcpController.LowPart  = pPPD->pHardwareConfiguration->ulEcpPortBase;
    608608        pPPI->OriginalEcpController.HighPart = 0;
    609        
    610         // Pointer to the I/O port resource that is used to control the 
     609
     610        // Pointer to the I/O port resource that is used to control the
    611611        // port in ECP mode.
    612612        pPPI->EcpController = NULL;
    613        
     613
    614614        // Specifies the size, in bytes, of the I/O port resource.
    615615        pPPI->SpanOfEcpController = pPPD->pHardwareConfiguration->ulEcpPortSpan;
    616        
     616
    617617        // Not used.
    618618        pPPI->PortNumber = 0;
    619        
     619
    620620        // Specifies the hardware capabilities of the parallel port. The following capabilities can be set using a bitwise OR of the following constants:
    621621        pPPI->HardwareCapabilities = 0;
     
    626626        //  PPT_EPP_PRESENT
    627627        //  PT_NO_HARDWARE_PRESENT
    628        
     628
    629629        // Pointer to a callback routine that a kernel-mode driver can use to change the operating mode of the parallel port.
    630630        pPPI->TrySetChipMode = 0;
    631        
     631
    632632        // Pointer to a callback routine that a kernel-mode driver can use to clear the operating mode of the parallel port.
    633633        pPPI->ClearChipMode = 0;
    634        
     634
    635635        // Specifies the size, in words, of the hardware first in/first out (FIFO) buffer. The FIFO word size, in bits, is the value of FifoWidth.
    636636        pPPI->FifoDepth = 0;
    637        
     637
    638638        // Specifies the FIFO word size, in bits, which is the number of bits handled in parallel.
    639639        pPPI->FifoWidth = 0;
    640        
     640
    641641        // Not used.
    642642        pPPI->EppControllerPhysicalAddress.LowPart = 0;
    643643        pPPI->EppControllerPhysicalAddress.HighPart = 0;
    644        
     644
    645645        // Not used.
    646646        pPPI->SpanOfEppController = 0;
    647        
     647
    648648        // Specifies the number of daisy-chain devices currently attached to a parallel port. In Microsoftÿ Windowsÿ XP, from zero to two devices can be simultaneously connected to a
    649649        // parallel port. In Windows 2000, from zero to four devices can be simultaneously connected to a parallel port.
    650650        pPPI->Ieee1284_3DeviceCount = 0;
    651        
     651
    652652        // Pointer to a callback routine that a kernel-mode driver can use to try to select an IEEE 1284.3 device.
    653653        pPPI->TrySelectDevice = 0;
    654        
     654
    655655        // Pointer to a callback routine that a kernel-mode driver can use to deselect an IEEE 1284.3 device.
    656656        pPPI->DeselectDevice = 0;
    657        
     657
    658658        // Pointer to the device extension of a parallel port's function device object (FDO).
    659659        pPPI->Context = 0;
    660        
     660
    661661        // The current operating mode of the parallel port.
    662662        pPPI->CurrentMode = 0;
    663        
     663
    664664        // The symbolic link name of the parallel port.
    665665        pPPI->PortName = 0;
    666        
     666
    667667        return TRUE;
    668668      }
  • branches/gcc-kmk/src/kernel32/mmap.cpp

    r21720 r21732  
    5050
    5151
    52 static char *pszMMapSemName = MEMMAP_CRITSECTION_NAME;
     52static LPCSTR pszMMapSemName = MEMMAP_CRITSECTION_NAME;
    5353
    5454//******************************************************************************
  • branches/gcc-kmk/src/kernel32/oslibdos.cpp

    r21675 r21732  
    9898static ULONG crc32str(const char *psz);
    9999
    100 char* ODINHelperStripUNC(char* strUNC)
    101 {
    102     char *retStr = strUNC;
     100LPCSTR ODINHelperStripUNC(LPCSTR strUNC)
     101{
     102    LPCSTR retStr = strUNC;
    103103
    104104    if (!strUNC) return NULL;
     
    460460//******************************************************************************
    461461//******************************************************************************
    462 DWORD OSLibDosOpen(char *lpszFileName, DWORD flags)
     462DWORD OSLibDosOpen(LPCSTR lpszFileName, DWORD flags)
    463463{
    464464 APIRET rc;
     
    721721//******************************************************************************
    722722//******************************************************************************
    723 BOOL OSLibDosDelete(char *lpszFileName)
     723BOOL OSLibDosDelete(LPCSTR lpszFileName)
    724724{
    725725    APIRET rc;
     
    850850DWORD WIN32API GetEnvironmentVariableA(LPCSTR, LPSTR, DWORD );
    851851//******************************************************************************
    852 DWORD OSLibDosSearchPath(DWORD cmd, char *path, char *name, char *full_name,
    853                          DWORD length_fullname)
     852DWORD OSLibDosSearchPath(DWORD cmd, LPCSTR path, LPCSTR name,
     853                         LPSTR full_name, DWORD length_fullname)
    854854{
    855855  switch(cmd) {
     
    947947   APIRET  rc = ERROR_NOT_ENOUGH_MEMORY;
    948948
    949    CHAR* lpszFileLoc = ODINHelperStripUNC(lpszFile);
     949   LPCSTR lpszFileLoc = ODINHelperStripUNC(lpszFile);
    950950
    951951   //TODO: lpSecurityAttributes (inheritance)
  • branches/gcc-kmk/src/kernel32/oslibdos.h

    r21564 r21732  
    1717#endif
    1818
    19 char* ODINHelperStripUNC(char* strUNC);
     19LPCSTR ODINHelperStripUNC(LPCSTR strUNC);
    2020
    2121#ifdef OS2_INCLUDED
     
    4646#define OSLIB_ACCESS_SHAREDENYWRITE     16
    4747
    48 DWORD OSLibDosOpen(char *lpszFileName, DWORD flags);
     48DWORD OSLibDosOpen(LPCSTR lpszFileName, DWORD flags);
    4949BOOL OSLibDosClose(DWORD hFile);
    50 BOOL OSLibDosDelete(char *lpszFileName);
     50BOOL OSLibDosDelete(LPCSTR lpszFileName);
    5151BOOL OSLibDosCopyFile(LPCSTR lpszOldFile, LPCSTR lpszNewFile, BOOL fFailIfExist);
    5252BOOL OSLibDosMoveFile(LPCSTR lpszOldFile, LPCSTR lpszNewFile);
     
    6565#define OSLIB_SEARCHENV         4
    6666
    67 DWORD OSLibDosSearchPath(DWORD cmd, char *path, char *name, char *full_name, DWORD length_fullname);
     67DWORD OSLibDosSearchPath(DWORD cmd, LPCSTR path, LPCSTR name,
     68                         LPSTR full_name, DWORD length_fullname);
    6869
    6970#ifndef FIL_QUERYFULLNAME
  • branches/gcc-kmk/src/kernel32/time.cpp

    r21302 r21732  
    4040//File time (UTC) to MS-DOS date & time values (also UTC)
    4141//******************************************************************************
    42 BOOL WIN32API FileTimeToDosDateTime(const FILETIME *lpFileTime, LPWORD lpDosDate, 
     42BOOL WIN32API FileTimeToDosDateTime(const FILETIME *lpFileTime, LPWORD lpDosDate,
    4343                                    LPWORD lpDosTime)
    4444{
     
    6060        return FALSE;
    6161    }
    62     return O32_FileTimeToLocalFileTime(lpFileTime, lpLocalTime); 
     62    return O32_FileTimeToLocalFileTime(lpFileTime, lpLocalTime);
    6363}
    6464//******************************************************************************
    6565//Local time to File time (UTC)
    6666//******************************************************************************
    67 BOOL WIN32API LocalFileTimeToFileTime(const FILETIME *lpLocalFileTime, 
     67BOOL WIN32API LocalFileTimeToFileTime(const FILETIME *lpLocalFileTime,
    6868                                      LPFILETIME lpFileTime)
    6969{
     
    9898}
    9999//******************************************************************************
    100 //MS-DOS date & time values (UTC) to File time (also UTC) 
     100//MS-DOS date & time values (UTC) to File time (also UTC)
    101101//******************************************************************************
    102102BOOL WIN32API DosDateTimeToFileTime(WORD wDosDate, WORD wDosTime, LPFILETIME pFileTime)
    103103{
    104104    dprintf(("%x %x", wDosDate, wDosTime));
    105    
     105
    106106    if(pFileTime == NULL) {
    107107        SetLastError(ERROR_INVALID_PARAMETER);
     
    117117}
    118118//******************************************************************************
    119 //The GetLocalTime function retrieves the current local date and time. 
     119//The GetLocalTime function retrieves the current local date and time.
    120120//(in local time)
    121121//******************************************************************************
     
    130130}
    131131//******************************************************************************
    132 //The SetLocalTime function sets the current local time and date. 
     132//The SetLocalTime function sets the current local time and date.
    133133//(in local time)
    134134//******************************************************************************
     
    143143}
    144144//******************************************************************************
    145 //The GetSystemTime function retrieves the current system date and time. 
     145//The GetSystemTime function retrieves the current system date and time.
    146146//The system time is expressed in Coordinated Universal Time (UTC).
    147147//******************************************************************************
     
    157157}
    158158//******************************************************************************
    159 //The SetSystemTime function sets the current system time and date. 
     159//The SetSystemTime function sets the current system time and date.
    160160//The system time is expressed in Coordinated Universal Time (UCT).
    161161//******************************************************************************
     
    185185}
    186186//******************************************************************************
    187 static const LPSTR szTZBias           = "Bias";
    188 static const LPSTR szTZActiveTimeBias = "ActiveTimeBias";
    189 
    190 static const LPWSTR szTZStandardName  = (LPWSTR)L"StandardName";
    191 static const LPSTR szTZStandardBias   = "StandardBias";
    192 static const LPSTR szTZStandardStart  = "StandardStart";
    193 
    194 static const LPWSTR szTZDaylightName  = (LPWSTR)L"DaylightName";
    195 static const LPSTR szTZDaylightBias   = "DaylightBias";
    196 static const LPSTR szTZDaylightStart  = "DaylightStart";
    197 static const LPSTR KEY_WINDOWS_TZ     = "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation";
     187static const LPCSTR szTZBias           = "Bias";
     188static const LPCSTR szTZActiveTimeBias = "ActiveTimeBias";
     189
     190static const LPCWSTR szTZStandardName  = (LPCWSTR)L"StandardName";
     191static const LPCSTR szTZStandardBias   = "StandardBias";
     192static const LPCSTR szTZStandardStart  = "StandardStart";
     193
     194static const LPCWSTR szTZDaylightName  = (LPCWSTR)L"DaylightName";
     195static const LPCSTR szTZDaylightBias   = "DaylightBias";
     196static const LPCSTR szTZDaylightStart  = "DaylightStart";
     197static const LPCSTR KEY_WINDOWS_TZ     = "SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation";
    198198//******************************************************************************
    199199DWORD WIN32API GetTimeZoneInformation(LPTIME_ZONE_INFORMATION lpTimeZone)
  • branches/gcc-kmk/src/kernel32/windllpe2lx.h

    r21716 r21732  
    2525public:
    2626    /** @cat Constructor/Destructor */
    27     Win32Pe2LxDll(HINSTANCE hinstance, BOOL fWin32k) throw(ULONG);
     27    Win32Pe2LxDll(HINSTANCE hinstance, BOOL fWin32k);
    2828    virtual     ~Win32Pe2LxDll();
    2929    DWORD       init();
  • branches/gcc-kmk/src/kernel32/winimagepe2lx.cpp

    r10397 r21732  
    440440                           + strlen((char*)pLrec->pName) + 1    /* size of the filename */
    441441                           + 3) & ~3));                          /* the size is align on 4 bytes boundrary */
     442#ifdef __INNOTEK_LIBC__
     443                    pLrec->pNextRec = (void **)(qsLrec_t*)((char*)pLrec->pObjInfo
     444                                                   + sizeof(qsLObjrec_t) * pLrec->ctObj);
     445#else
    442446                    pLrec->pNextRec = (qsLrec_t*)((char*)pLrec->pObjInfo
    443447                                                   + sizeof(qsLObjrec_t) * pLrec->ctObj);
     448#endif
    444449                    }
    445450                if (pLrec->hmte == hmod)
     
    549554
    550555            /* loop thru the PE sections */
    551             for (int i = 0; i < pNtHdrs->FileHeader.NumberOfSections; i++)
     556            int i;
     557            for (i = 0; i < pNtHdrs->FileHeader.NumberOfSections; i++)
    552558            {
    553559                if (paSections[0].cbVirtual < paPESections[i].VirtualAddress)
  • branches/gcc-kmk/src/odincrt/critsect.cpp

    r10580 r21732  
    3535        return NO_ERROR;
    3636    }
    37    
     37
    3838    return ERROR_INVALID_PARAMETER;
    3939}
     
    101101 */
    102102ULONG WIN32API DosInitializeCriticalSection(CRITICAL_SECTION_OS2 *crit,
    103                                             PSZ pszSemName, BOOL fShared)
     103                                            PCSZ pszSemName, BOOL fShared)
    104104{
    105105    APIRET rc;
     
    125125 *           DosAccessCriticalSection
    126126 */
    127 ULONG WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *crit, PSZ pszSemName)
     127ULONG WIN32API DosAccessCriticalSection(CRITICAL_SECTION_OS2 *crit, PCSZ pszSemName)
    128128{
    129129    APIRET rc = NO_ERROR;
    130    
    131     // Increment creation counter to prevent the section to be destroyed while 
     130
     131    // Increment creation counter to prevent the section to be destroyed while
    132132    // we are checking it. Assume that an unitialized section has the counter == 0
    133133    DosInterlockedIncrement(&crit->CreationCount);
    134    
     134
    135135    if (DosValidateCriticalSection (crit) == NO_ERROR)
    136136    {
    137137        // the section already initialized, use it
    138138        HEV hevLock = NULLHANDLE;
    139        
     139
    140140        if (pszSemName == NULL)
    141141        {
     
    155155        rc = DosInitializeCriticalSection (crit, pszSemName, TRUE);
    156156    }
    157      
     157
    158158    return NO_ERROR;
    159159}
Note: See TracChangeset for help on using the changeset viewer.