Ignore:
Timestamp:
Nov 18, 2006, 12:21:33 PM (19 years ago)
Author:
bird
Message:

cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kLdr/kLdrModNative.c

    r2878 r2883  
    3333#include "kLdrInternal.h"
    3434#ifdef __OS2__
     35# define INCL_BASE
    3536# include <os2.h>
    3637
     38# ifndef LIBPATHSTRICT
     39#  define LIBPATHSTRICT 3
     40# endif
     41  extern APIRET DosQueryHeaderInfo(HMODULE hmod, ULONG ulIndex, PVOID pvBuffer, ULONG cbBuffer, ULONG ulSubFunction);
     42# define QHINF_EXEINFO       1 /* NE exeinfo. */
     43# define QHINF_READRSRCTBL   2 /* Reads from the resource table. */
     44# define QHINF_READFILE      3 /* Reads from the executable file. */
     45# define QHINF_LIBPATHLENGTH 4 /* Gets the libpath length. */
     46# define QHINF_LIBPATH       5 /* Gets the entire libpath. */
     47# define QHINF_FIXENTRY      6 /* NE only */
     48# define QHINF_STE           7 /* NE only */
     49# define QHINF_MAPSEL        8 /* NE only */
     50
    3751#elif defined(__WIN__)
    38 //# include "kLdrModPE.h"
    3952# undef IMAGE_NT_SIGNATURE
    4053# undef IMAGE_DOS_SIGNATURE
     
    4255# ifndef IMAGE_SCN_TYPE_NOLOAD
    4356#  define IMAGE_SCN_TYPE_NOLOAD 0x00000002
    44 #endif
    45 
     57# endif
    4658
    4759/*#elif defined(__NT__)
     
    162174    HMODULE hmod;
    163175
    164     rc = DosLoadModule(NULL, 0, pszFilename, &hmod);
     176    rc = DosLoadModule(NULL, 0, (PCSZ)pszFilename, &hmod);
    165177    if (rc)
    166178        return rc;
     
    213225
    214226    /* get the filename. */
    215     rc = DosQueryModuleName(hmod, sizeof(szFilename), szFilename);
     227    rc = DosQueryModuleName((HMODULE)uHandle, sizeof(szFilename), szFilename);
    216228    if (rc)
    217229    {
     
    308320     */
    309321#ifdef __OS2__
    310     pModNative->hmod = hmod;
     322    pModNative->hmod = (HMODULE)uHandle;
    311323
    312324    /* just fake a segment for now. */
     
    514526        rc = DosQueryProcAddr(pModNative->hmod,
    515527                              pszSymbol ? 0 : iSymbol,
    516                               pszSymbol,
     528                              (PCSZ)pszSymbol,
    517529                              &pfn);
    518530        if (rc)
     
    525537        rc = DosQueryProcType(pModNative->hmod,
    526538                              pszSymbol ? 0 : iSymbol,
    527                               pszSymbol,
     539                              (PCSZ)pszSymbol,
    528540                              &ulProcType);
    529541        if (rc)
     
    567579
    568580    /** @todo implement export enumeration on OS/2. */
     581    (void)pModNative;
    569582    return ERROR_NOT_SUPPORTED;
    570583
     
    653666
    654667    /** @todo implement export enumeration on OS/2. */
     668    (void)pModNative;
    655669    return ERROR_NOT_SUPPORTED;
    656670
     
    675689                                      const IMAGE_IMPORT_DESCRIPTOR *);
    676690    pszImportName = KLDRMODNATIVE_RVA2TYPE(pModNative->hmod, pImpDesc->Name, const char *);
    677     cchImportName = strlen(pszImportName);
     691    cchImportName = kLdrHlpStrLen(pszImportName);
    678692    if (cchImportName < cchName)
    679693    {
     
    704718
    705719    /** @todo implement export enumeration on OS/2. */
     720    (void)pModNative;
    706721    return -1;
    707722
     
    743758
    744759    /** @todo implement export enumeration on OS/2. */
     760    (void)pModNative;
    745761    return ERROR_NOT_SUPPORTED;
    746762
     
    765781
    766782    /** @todo implement export enumeration on OS/2. */
     783    (void)pModNative;
    767784    return ERROR_NOT_SUPPORTED;
    768785
     
    789806
    790807    /** @todo implement export enumeration on OS/2. */
     808    (void)pModNative;
    791809    return ERROR_NOT_SUPPORTED;
    792810
     
    820838            case IMAGE_DEBUG_TYPE_UNKNOWN:
    821839            case IMAGE_DEBUG_TYPE_FPO:
    822             case IMAGE_DEBUG_TYPE_COFF: //stabs dialect??
     840            case IMAGE_DEBUG_TYPE_COFF: /*stabs dialect??*/
    823841            case IMAGE_DEBUG_TYPE_MISC:
    824842            case IMAGE_DEBUG_TYPE_EXCEPTION:
     
    863881
    864882    /** @todo implement export enumeration on OS/2. */
     883    (void)pModNative;
    865884    return KLDR_ERR_NO_DEBUG_INFO;
    866885
Note: See TracChangeset for help on using the changeset viewer.