Changeset 142399 in webkit


Ignore:
Timestamp:
Feb 10, 2013 6:13:23 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Refactor the way HAVE_XXX macros are set
https://bugs.webkit.org/show_bug.cgi?id=108132

Patch by Laszlo Gombos <l.gombos@samsung.com> on 2013-02-10
Reviewed by Benjamin Poulain.

OS(WINDOWS) and OS(UNIX) are so broadly defined that for each
builds exactly one of them is enabled. Use this assumption to
cleanup Platform.h.

  • wtf/Platform.h:
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r142395 r142399  
     12013-02-10  Laszlo Gombos  <l.gombos@samsung.com>
     2
     3        Refactor the way HAVE_XXX macros are set
     4        https://bugs.webkit.org/show_bug.cgi?id=108132
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        OS(WINDOWS) and OS(UNIX) are so broadly defined that for each
     9        builds exactly one of them is enabled. Use this assumption to
     10        cleanup Platform.h.
     11
     12        * wtf/Platform.h:
     13
    1142013-02-10  Jae Hyun Park  <jae.park08@gmail.com>
    215
  • trunk/Source/WTF/wtf/Platform.h

    r142395 r142399  
    679679
    680680#if OS(UNIX)
     681#define HAVE_ERRNO_H 1
     682#define HAVE_MMAP 1   
    681683#define HAVE_SIGNAL_H 1
     684#define HAVE_STRINGS_H 1
     685#define HAVE_SYS_PARAM_H 1
     686#define HAVE_SYS_TIME_H 1
    682687#define WTF_USE_OS_RANDOMNESS 1
     688#endif /* OS(UNIX) */
     689
     690#if OS(UNIX) && !OS(ANDROID) && !OS(QNX)
     691#define HAVE_LANGINFO_H 1
    683692#endif
    684693
     
    709718#if OS(DARWIN)
    710719
    711 #define HAVE_ERRNO_H 1
    712 #define HAVE_LANGINFO_H 1
    713 #define HAVE_MMAP 1
    714720#define HAVE_MERGESORT 1
    715 #define HAVE_STRINGS_H 1
    716 #define HAVE_SYS_PARAM_H 1
    717 #define HAVE_SYS_TIME_H 1
    718721#define HAVE_SYS_TIMEB_H 1
    719722#define WTF_USE_ACCELERATE 1
     
    723726#define HAVE_DISPATCH_H 1
    724727#define HAVE_HOSTED_CORE_ANIMATION 1
     728#define HAVE_MADV_FREE 1
     729#define HAVE_PTHREAD_SETNAME_NP 1
    725730
    726731#if !PLATFORM(IOS)
    727732#define HAVE_MADV_FREE_REUSE 1
    728 #define HAVE_MADV_FREE 1
    729 #define HAVE_PTHREAD_SETNAME_NP 1
    730 #endif
    731 
    732 #endif
    733 
    734 #if PLATFORM(IOS)
    735 #define HAVE_MADV_FREE 1
    736 #define HAVE_PTHREAD_SETNAME_NP 1
    737 #endif
    738 
    739 #elif OS(WINDOWS)
    740 
    741 #if !OS(WINCE)
     733#endif /* !PLATFORM(IOS) */
     734
     735#endif /* PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 */
     736
     737#endif /* OS(DARWIN) */
     738
     739#if OS(WINDOWS) && !OS(WINCE)
    742740#define HAVE_SYS_TIMEB_H 1
    743741#define HAVE_ALIGNED_MALLOC 1
    744742#define HAVE_ISDEBUGGERPRESENT 1
    745743#endif
     744
     745#if OS(WINDOWS)
    746746#define HAVE_VIRTUALALLOC 1
    747747#define WTF_USE_OS_RANDOMNESS 1
    748 
    749 #elif OS(QNX)
    750 
    751 #define HAVE_ERRNO_H 1
    752 #define HAVE_MMAP 1
     748#endif
     749
     750#if OS(QNX)
    753751#define HAVE_MADV_FREE_REUSE 1
    754752#define HAVE_MADV_FREE 1
    755 #define HAVE_STRINGS_H 1
    756 #define HAVE_SYS_PARAM_H 1
    757 #define HAVE_SYS_TIME_H 1
    758753#define WTF_USE_PTHREADS 1
    759 
    760 #elif OS(ANDROID)
    761 
    762 #define HAVE_ERRNO_H 1
    763 #define HAVE_MMAP 1
    764 #define HAVE_STRINGS_H 1
    765 #define HAVE_SYS_PARAM_H 1
    766 #define HAVE_SYS_TIME_H 1
    767 
    768 #else
    769 
    770 /* FIXME: is this actually used or do other platforms generate their own config.h? */
    771 
    772 #define HAVE_ERRNO_H 1
    773 #define HAVE_LANGINFO_H 1
    774 #define HAVE_MMAP 1
    775 #define HAVE_STRINGS_H 1
    776 #define HAVE_SYS_PARAM_H 1
    777 #define HAVE_SYS_TIME_H 1
    778 
    779754#endif
    780755
Note: See TracChangeset for help on using the changeset viewer.