VirtualBox

Changeset 1283 in kBuild


Ignore:
Timestamp:
Nov 30, 2007 2:54:36 AM (17 years ago)
Author:
bird
Message:

Use kDefs.h and kTypes.h to avoid having a zillion ways of testing for the different OSes.

Location:
trunk/src/lib
Files:
3 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/kDep.c

    r1177 r1283  
    3636#include <limits.h>
    3737#include <sys/stat.h>
    38 #ifdef __WIN32__
     38#include <k/kDefs.h>
     39#if K_OS == K_OS_WINDOWS
    3940# include <windows.h>
    40 #endif
    41 #if !defined(__WIN32__) && !defined(__OS2__)
     41 extern void nt_fullpath(const char *pszPath, char *pszFull, size_t cchFull); /* nt_fullpath.c */
     42#else
    4243# include <dirent.h>
    43 #endif
    44 #ifndef __WIN32__
    4544# include <unistd.h>
    4645# include <stdint.h>
    47 #else
    48  typedef unsigned char  uint8_t;
    49  typedef unsigned short uint16_t;
    50  typedef unsigned int   uint32_t;
    51  extern void nt_fullpath(const char *pszPath, char *pszFull, size_t cchFull); /* nt_fullpath.c */
    5246#endif
    5347
    5448#include "kDep.h"
    55 
    56 #ifdef NEED_ISBLANK
    57 # define isblank(ch) ( (unsigned char)(ch) == ' ' || (unsigned char)(ch) == '\t' )
    58 #endif
    59 
    60 #define OFFSETOF(type, member)  ( (int)(void *)&( ((type *)(void *)0)->member) )
    6149
    6250
     
    8371
    8472
    85 #if defined(__OS2__)
     73#if K_OS == K_OS_OS2
    8674
    8775/**
     
    9684}
    9785
    98 #elif !defined(__WIN32__) && !defined(__WIN64__)
     86#elif K_OS != K_OS_WINDOWS
    9987
    10088/**
     
    178166}
    179167
    180 
    181 #endif
     168#endif /* !OS/2 && !Windows */
    182169
    183170
     
    195182    for (; pDep; pDep = pDep->pNext)
    196183    {
    197 #ifdef __WIN32__
     184#ifndef PATH_MAX
    198185        char        szFilename[_MAX_PATH + 1];
    199186#else
     
    211198        pszFilename = pDep->szFilename;
    212199
    213 #if !defined(__OS2__) && !defined(__WIN32__)
     200#if K_OS != K_OS_OS2 && K_OS != K_OS_WINDOWS
    214201        /*
    215202         * Skip any drive letters from compilers running in wine.
     
    225212        if (fFixCase)
    226213        {
    227 #if defined(__WIN32__) || defined(__WIN64__)
     214#if K_OS == K_OS_WINDOWS
    228215            nt_fullpath(pszFilename, szFilename, sizeof(szFilename));
    229216#else
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette