Changeset 13089 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Mar 2, 2006, 1:12:06 AM (19 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSLock.cpp
r12728 r13089 28 28 namespace KJS { 29 29 30 #if KJS_MULTIPLE_THREADS30 #if USE(MULTIPLE_THREADS) 31 31 32 32 static pthread_once_t interpreterLockOnce = PTHREAD_ONCE_INIT; -
trunk/JavaScriptCore/kjs/collector.cpp
r12897 r13089 33 33 #include <algorithm> 34 34 35 #if __APPLE__35 #if PLATFORM(DARWIN) 36 36 37 37 #include <pthread.h> … … 40 40 #include <mach/thread_act.h> 41 41 42 #elif WIN3242 #elif PLATFORM(WIN_OS) 43 43 44 44 #include <windows.h> 45 45 46 #el se46 #elif PLATFORM(UNIX) 47 47 48 48 #include <pthread.h> 49 49 50 #ifdef HAVE_PTHREAD_NP_H 51 50 #if HAVE(PTHREAD_NP_H) 52 51 #include <pthread_np.h> 53 54 #endif 55 56 #endif 52 #endif 53 54 #endif 55 56 #define DEBUG_COLLECTOR 0 57 57 58 58 using std::max; … … 192 192 } 193 193 194 #if KJS_MULTIPLE_THREADS194 #if USE(MULTIPLE_THREADS) 195 195 196 196 struct Collector::Thread { … … 301 301 setjmp(registers); 302 302 303 #if __APPLE__303 #if PLATFORM(DARWIN) 304 304 pthread_t thread = pthread_self(); 305 305 void *stackBase = pthread_get_stackaddr_np(thread); 306 #elif WIN32306 #elif PLATFORM(WIN_OS) && PLATFORM(X86) && COMPILER(MSVC) 307 307 NT_TIB *pTib; 308 308 __asm { … … 311 311 } 312 312 void *stackBase = (void *)pTib->StackBase; 313 #el se313 #elif PLATFORM(UNIX) 314 314 static void *stackBase = 0; 315 315 static pthread_t stackThread; … … 317 317 if (stackBase == 0 || thread != stackThread) { 318 318 pthread_attr_t sattr; 319 #if def HAVE_PTHREAD_NP_H319 #if HAVE(PTHREAD_NP_H) 320 320 // e.g. on FreeBSD 5.4, [email protected] 321 321 pthread_attr_get_np(thread, &sattr); … … 330 330 stackThread = thread; 331 331 } 332 #else 333 #error Need a way to get the stack base on this platform 332 334 #endif 333 335 … … 338 340 } 339 341 340 #if KJS_MULTIPLE_THREADS342 #if USE(MULTIPLE_THREADS) 341 343 342 344 typedef unsigned long usword_t; // word size, assumed to be either 32 or 64 bit … … 346 348 thread_suspend(thread->machThread); 347 349 348 #if KJS_CPU_X86350 #if PLATFORM(X86) 349 351 i386_thread_state_t regs; 350 352 unsigned user_count = sizeof(regs)/sizeof(int); 351 353 thread_state_flavor_t flavor = i386_THREAD_STATE; 352 #elif KJS_CPU_PPC354 #elif PLATFORM(PPC) 353 355 ppc_thread_state_t regs; 354 356 unsigned user_count = PPC_THREAD_STATE_COUNT; 355 357 thread_state_flavor_t flavor = PPC_THREAD_STATE; 356 #elif KJS_CPU_PPC64358 #elif PLATFORM(PPC64) 357 359 ppc_thread_state64_t regs; 358 360 unsigned user_count = PPC_THREAD_STATE64_COUNT; … … 368 370 369 371 // scan the stack 370 #if KJS_CPU_X86372 #if PLATFORM(X86) 371 373 markStackObjectsConservatively((void *)regs.esp, pthread_get_stackaddr_np(thread->posixThread)); 372 #elif KJS_CPU_PPC || KJS_CPU_PPC64374 #elif PLATFORM(PPC) || PLATFORM(PPC64) 373 375 markStackObjectsConservatively((void *)regs.r1, pthread_get_stackaddr_np(thread->posixThread)); 374 376 #else … … 385 387 markCurrentThreadConservatively(); 386 388 387 #if KJS_MULTIPLE_THREADS389 #if USE(MULTIPLE_THREADS) 388 390 for (Thread *thread = registeredThreads; thread != NULL; thread = thread->next) { 389 391 if (thread->posixThread != pthread_self()) { -
trunk/JavaScriptCore/kjs/config.h
r12305 r13089 1 #if __APPLE__ 1 #include <kxmlcore/Platform.h> 2 3 #if PLATFORM(DARWIN) 2 4 3 5 #define HAVE_ERRNO_H 1 … … 11 13 #define HAVE_SYS_TIMEB_H 1 12 14 13 #define KJS_MULTIPLE_THREADS 1 14 15 #elif WIN32 15 #elif PLATFORM(WIN_OS) 16 16 17 17 #define HAVE_FLOAT_H 1 18 18 #define HAVE_FUNC__FINITE 1 19 19 #define HAVE_SYS_TIMEB_H 1 20 21 20 22 #define USE_SYSTEM_MALLOC 1 21 23 22 24 #else 25 26 // FIXME: is this actually used or do other platforms generate their 27 // own config.h? 23 28 24 29 #define HAVE_ERRNO_H 1 … … 33 38 #endif 34 39 35 #define HAVE_FUNC_STRTOLL 136 40 #define HAVE_ICU 1 37 41 #define HAVE_PCREPOSIX 1 42 43 // FIXME: if all platforms have these, do they really need #defines? 38 44 #define HAVE_STDINT_H 1 39 45 #define HAVE_STRING_H 1 40 41 #if __ppc__ || __PPC__ || __powerpc__42 #define KJS_CPU_PPC 143 #define WORDS_BIGENDIAN 144 #elif __ppc64__ || __PPC64__45 #define KJS_CPU_PPC64 146 #define WORDS_BIGENDIAN 147 #elif __i386__48 #define KJS_CPU_X86 149 #endif50 46 51 47 #define KXC_CHANGES 1 -
trunk/JavaScriptCore/kjs/date_object.cpp
r13015 r13089 23 23 #include "date_object.h" 24 24 25 #if HAVE _ERRNO_H25 #if HAVE(ERRNO_H) 26 26 #include <errno.h> 27 27 #endif 28 28 29 #if HAVE _SYS_PARAM_H29 #if HAVE(SYS_PARAM_H) 30 30 #include <sys/param.h> 31 31 #endif 32 32 33 #if HAVE _SYS_TIME_H33 #if HAVE(SYS_TIME_H) 34 34 #include <sys/time.h> 35 35 #endif 36 36 37 #if HAVE _SYS_TIMEB_H37 #if HAVE(SYS_TIMEB_H) 38 38 #include <sys/timeb.h> 39 39 #endif … … 52 52 #include "operations.h" 53 53 54 #if __APPLE__54 #if PLATFORM(MAC) 55 55 #include <CoreFoundation/CoreFoundation.h> 56 56 #endif 57 57 58 #if WIN3258 #if PLATFORM(WIN_OS) 59 59 #define copysign(x, y) _copysign(x, y) 60 60 #define isfinite(x) _finite(x) … … 65 65 inline int gmtoffset(const tm& t) 66 66 { 67 #if WIN3267 #if PLATFORM(WIN_OS) 68 68 // Time is supposed to be in the current timezone. 69 69 // FIXME: Use undocumented _dstbias? … … 142 142 static void millisecondsToTM(double milli, bool utc, tm *t); 143 143 144 #if __APPLE__144 #if PLATFORM(MAC) 145 145 146 146 static CFDateFormatterStyle styleFromArgString(const UString& string, CFDateFormatterStyle defaultStyle) … … 207 207 } 208 208 209 #endif // __APPLE__209 #endif // PLATFORM(MAC) 210 210 211 211 static UString formatDate(const tm &t) … … 231 231 char buffer[100]; 232 232 if (utc) { 233 #if !WIN32 233 // FIXME: why not on windows? 234 #if !PLATFORM(WIN_OS) 234 235 ASSERT(t.tm_gmtoff == 0); 235 236 #endif … … 554 555 JSValue *result = 0; 555 556 UString s; 556 #if ! __APPLE__557 #if !PLATFORM(DARWIN) 557 558 const int bufsize=100; 558 559 char timebuffer[bufsize]; … … 610 611 return jsString(formatDateUTCVariant(t) + " " + formatTime(t, utc)); 611 612 break; 612 #if __APPLE__613 #if PLATFORM(MAC) 613 614 case ToLocaleString: 614 615 return jsString(formatLocaleDate(exec, secs, true, true, args)); … … 735 736 736 737 if (numArgs == 0) { // new Date() ECMA 15.9.3.3 737 #if !WIN32 738 #if PLATFORM(WIN_OS) 739 #if COMPILER(BORLAND) 740 struct timeb timebuffer; 741 ftime(&timebuffer); 742 #else 743 struct _timeb timebuffer; 744 _ftime(&timebuffer); 745 #endif 746 double utc = timebuffer.time * msPerSecond + timebuffer.millitm; 747 #else 738 748 struct timeval tv; 739 749 gettimeofday(&tv, 0); 740 750 double utc = floor(tv.tv_sec * msPerSecond + tv.tv_usec / 1000); 741 #else742 # if __BORLANDC__743 struct timeb timebuffer;744 ftime(&timebuffer);745 # else746 struct _timeb timebuffer;747 _ftime(&timebuffer);748 # endif749 double utc = timebuffer.time * msPerSecond + timebuffer.millitm;750 751 #endif 751 752 value = utc; … … 855 856 // obsolete time zones not listed here equivalent to "-0000". 856 857 static const struct KnownZone { 857 #if ! WIN32858 #if !PLATFORM(WIN_OS) 858 859 const 859 860 #endif … … 878 879 if (utc) { 879 880 time_t zero = 0; 880 #if !WIN32 881 #if PLATFORM(WIN_OS) 882 // FIXME: not thread safe 883 (void)localtime(&zero); 884 #if COMPILER(BORLAND) || COMPILER(CYGWIN) 885 utcOffset = - _timezone; 886 #else 887 utcOffset = - timezone; 888 #endif 889 t->tm_isdst = 0; 890 #else 881 891 tm t3; 882 892 localtime_r(&zero, &t3); 883 893 utcOffset = t3.tm_gmtoff; 884 894 t->tm_isdst = t3.tm_isdst; 885 #else886 // FIXME: not thread safe887 (void)localtime(&zero);888 # if __BORLANDC__ || __CYGWIN__889 utcOffset = - _timezone;890 # else891 utcOffset = - timezone;892 # endif893 t->tm_isdst = 0;894 895 #endif 895 896 } else { -
trunk/JavaScriptCore/kjs/dtoa.cpp
r12069 r13089 173 173 #include "dtoa.h" 174 174 175 #if def WORDS_BIGENDIAN175 #if PLATFORM(BIG_ENDIAN) 176 176 #define IEEE_MC68k 177 177 #else -
trunk/JavaScriptCore/kjs/fpconst.cpp
r12315 r13089 32 32 // It would be good to figure out a 100% clean way that still avoids code that runs at init time. 33 33 34 #if __APPLE__34 #if PLATFORM(DARWIN) 35 35 36 #ifdef WORDS_BIGENDIAN 37 extern const unsigned char NaN[sizeof(double)] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; 38 extern const unsigned char Inf[sizeof(double)] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; 36 #if PLATFORM(BIG_ENDIAN) 37 extern const unsigned char NaN[sizeof(double)] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; 38 extern const unsigned char Inf[sizeof(double)] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; 39 #elif PLATFORM(MIDDLE_ENDIAN) 40 extern const unsigned char NaN[] = { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 }; 41 extern const unsigned char Inf[] = { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }; 39 42 #else 40 extern const unsigned char NaN[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; 41 extern const unsigned char Inf[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; 43 extern const unsigned char NaN[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; 44 extern const unsigned char Inf[sizeof(double)] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; 45 #endif // PLATFORM(MIDDLE_ENDIAN) 46 47 #else // !PLATFORM(DARWIN) 48 49 #include "value.h" 50 51 #if PLATFORM(BIG_ENDIAN) 52 const unsigned char NaN_Bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; 53 const unsigned char Inf_Bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; 54 #elif PLATFORM(MIDDLE_ENDIAN) 55 const unsigned char NaN_Bytes[] = { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 }; 56 const unsigned char Inf_Bytes[] = { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }; 57 #else 58 const unsigned char NaN_Bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; 59 const unsigned char Inf_Bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; 42 60 #endif 61 const double NaN = *(const double*) NaN_Bytes; 62 const double Inf = *(const double*) Inf_Bytes; 63 64 #endif // !PLATFORM(DARWIN) 43 65 44 #endif45 66 46 } 67 } // namespace KJS -
trunk/JavaScriptCore/kjs/grammar.y
r12317 r13089 4 4 * This file is part of the KDE libraries 5 5 * Copyright (C) 1999-2000 Harri Porten ([email protected]) 6 * Copyright (C) 2006 Apple Computer, Inc. 6 7 * 7 8 * This library is free software; you can redistribute it and/or … … 38 39 /* default values for bison */ 39 40 #define YYDEBUG 0 40 #if !__APPLE__ /* work around the fact that YYERROR_VERBOSE causes a compiler warning in bison code */ 41 #if !PLATFORM(DARWIN) 42 // avoid triggering warnings in older bison 41 43 #define YYERROR_VERBOSE 42 44 #endif -
trunk/JavaScriptCore/kjs/identifier.cpp
r12329 r13089 26 26 // runs at init time. 27 27 28 #if ! defined(WIN32) // can't get this to compile on Visual C++ yet28 #if !PLATFORM(WIN_OS) // can't get this to compile on Visual C++ yet 29 29 #define AVOID_STATIC_CONSTRUCTORS 1 30 30 #endif -
trunk/JavaScriptCore/kjs/internal.cpp
r13015 r13089 53 53 namespace KJS { 54 54 55 #if !__APPLE__ 56 57 #ifdef WORDS_BIGENDIAN 58 const unsigned char NaN_Bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 }; 59 const unsigned char Inf_Bytes[] = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 }; 60 #elif defined(arm) 61 const unsigned char NaN_Bytes[] = { 0, 0, 0xf8, 0x7f, 0, 0, 0, 0 }; 62 const unsigned char Inf_Bytes[] = { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 }; 63 #else 64 const unsigned char NaN_Bytes[] = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f }; 65 const unsigned char Inf_Bytes[] = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f }; 66 #endif 67 68 const double NaN = *(const double*) NaN_Bytes; 69 const double Inf = *(const double*) Inf_Bytes; 70 71 #endif 72 73 #if WIN32 55 #if PLATFORM(WIN_OS) 74 56 #define copysign _copysign 75 57 #endif -
trunk/JavaScriptCore/kjs/interpreter.cpp
r13015 r13089 37 37 #include "object.h" 38 38 #include "operations.h" 39 #if __APPLE__ 39 #include "types.h" 40 #include "value.h" 41 42 #if PLATFORM(MAC) 40 43 #include "runtime.h" 41 44 #endif 42 #include "types.h"43 #include "value.h"44 45 45 46 namespace KJS { … … 125 126 CString message = comp.value()->toObject(exec)->toString(exec).UTF8String(); 126 127 int line = comp.value()->toObject(exec)->get(exec, "line")->toUInt32(exec); 127 #if def WIN32128 #if PLATFORM(WIN_OS) 128 129 printf("%s line %d: %s\n", f.c_str(), line, message.c_str()); 129 130 #else … … 326 327 } 327 328 328 #if __APPLE__ 329 // bindings are OS X WebKit-only for now 330 #if PLATFORM(MAC) 329 331 void *Interpreter::createLanguageInstanceForValue(ExecState *exec, int language, JSObject *value, const Bindings::RootObject *origin, const Bindings::RootObject *current) 330 332 { 331 333 return Bindings::Instance::createLanguageInstanceForValue (exec, (Bindings::Instance::BindingLanguage)language, value, origin, current); 332 334 } 333 334 335 #endif 335 336 -
trunk/JavaScriptCore/kjs/interpreter.h
r13015 r13089 396 396 virtual bool isSafeScript(const Interpreter*) { return true; } 397 397 398 #if __APPLE__398 #if PLATFORM(MAC) 399 399 virtual void *createLanguageInstanceForValue(ExecState*, int language, JSObject* value, const Bindings::RootObject* origin, const Bindings::RootObject* current); 400 400 #endif -
trunk/JavaScriptCore/kjs/lookup.cpp
r12317 r13089 26 26 27 27 #include "lookup.h" 28 29 #ifdef HAVE_CONFIG_H30 #endif31 28 32 29 using namespace KJS; -
trunk/JavaScriptCore/kjs/lookup.h
r13015 r13089 300 300 301 301 // Work around a bug in GCC 4.1 302 #if ! __GNUC__302 #if !COMPILER(GCC) 303 303 #define KJS_GCC_ROOT_NS_HACK :: 304 304 #else -
trunk/JavaScriptCore/kjs/math_object.cpp
r12921 r13089 35 35 #include "math_object.lut.h" 36 36 37 #if WIN3237 #if PLATFORM(WIN_OS) 38 38 39 39 #include <float.h> -
trunk/JavaScriptCore/kjs/object.cpp
r13015 r13089 41 41 #include "nodes.h" 42 42 43 #ifndef NDEBUG 44 //#define JAVASCRIPT_CALL_TRACING 1 45 #endif 43 #define JAVASCRIPT_CALL_TRACING 0 46 44 47 45 #if JAVASCRIPT_CALL_TRACING -
trunk/JavaScriptCore/kjs/object.h
r12949 r13089 30 30 // maximum global call stack size. Protects against accidental or 31 31 // malicious infinite recursions. Define to -1 if you want no limit. 32 #if __APPLE__32 #if PLATFORM(DARWIN) 33 33 // Given OS X stack sizes we run out of stack at about 350 levels. 34 34 // If we improve our stack usage, we can bump this number. -
trunk/JavaScriptCore/kjs/operations.cpp
r12848 r13089 31 31 #include <stdlib.h> 32 32 33 #ifndef HAVE_FUNC_ISINF 34 #ifdef HAVE_IEEEFP_H 33 #if HAVE(FUNC_ISINF) && HAVE(IEEEFP_H) 35 34 #include <ieeefp.h> 36 35 #endif 37 #endif /* HAVE_FUNC_ISINF */ 38 39 #if HAVE_FLOAT_H 36 37 #if HAVE(FLOAT_H) 40 38 #include <float.h> 41 39 #endif … … 45 43 namespace KJS { 46 44 47 #if !__APPLE__ 45 #if !PLATFORM(DARWIN) 46 // FIXME: should probably be inlined on other platforms too, and controlled exclusively 47 // by HAVE macros 48 48 49 49 50 bool isNaN(double d) 50 51 { 51 #if def HAVE_FUNC_ISNAN52 #if HAVE(FUNC_ISNAN) 52 53 return isnan(d); 53 #elif defined HAVE_FLOAT_H54 #elif HAVE(FLOAT_H) 54 55 return _isnan(d) != 0; 55 56 #else … … 60 61 bool isInf(double d) 61 62 { 62 #if WIN32 63 // FIXME: should be HAVE(_FPCLASS) 64 #if PLATFORM(WIN_OS) 63 65 int fpClass = _fpclass(d); 64 66 return _FPCLASS_PINF == fpClass || _FPCLASS_NINF == fpClass; 65 #elif defined(HAVE_FUNC_ISINF)67 #elif HAVE(FUNC_ISINF) 66 68 return isinf(d); 67 #elif HAVE _FUNC_FINITE69 #elif HAVE(FUNC_FINITE) 68 70 return finite(d) == 0 && d == d; 69 #elif HAVE _FUNC__FINITE71 #elif HAVE(FUNC__FINITE) 70 72 return _finite(d) == 0 && d == d; 71 73 #else … … 76 78 bool isPosInf(double d) 77 79 { 78 #if WIN32 80 // FIXME: should be HAVE(_FPCLASS) 81 #if PLATFORM(WIN_OS) 79 82 return _FPCLASS_PINF == _fpclass(d); 80 #elif defined(HAVE_FUNC_ISINF)83 #elif HAVE(FUNC_ISINF) 81 84 return (isinf(d) == 1); 82 #elif HAVE _FUNC_FINITE83 return finite(d) == 0&& d == d; // ### can we distinguish between + and - ?84 #elif HAVE _FUNC__FINITE85 return _finite(d) == 0&& d == d; // ###85 #elif HAVE(FUNC_FINITE) 86 return !finite(d) && d == d; // ### can we distinguish between + and - ? 87 #elif HAVE(FUNC__FINITE) 88 return !_finite(d) && d == d; // ### 86 89 #else 87 90 return false; … … 91 94 bool isNegInf(double d) 92 95 { 93 #if WIN32 96 // FIXME: should be HAVE(_FPCLASS) 97 #if PLATFORM(WIN_OS) 94 98 return _FPCLASS_NINF == _fpclass(d); 95 #elif defined(HAVE_FUNC_ISINF)99 #elif HAVE(FUNC_ISINF) 96 100 return (isinf(d) == -1); 97 #elif HAVE _FUNC_FINITE101 #elif HAVE(FUNC_FINITE) 98 102 return finite(d) == 0 && d == d; // ### 99 #elif HAVE _FUNC__FINITE103 #elif HAVE(FUNC__FINITE) 100 104 return _finite(d) == 0 && d == d; // ### 101 105 #else -
trunk/JavaScriptCore/kjs/operations.h
r12317 r13089 29 29 class JSValue; 30 30 31 #if __APPLE__31 #if PLATFORM(DARWIN) 32 32 inline bool isNaN(double d) { return isnan(d); } 33 33 inline bool isInf(double d) { return isinf(d); } … … 35 35 inline bool isNegInf(double d) { return isinf(d) && d < 0; } 36 36 #else 37 /**38 * @return True if d is not a number (platform support required).39 */40 37 bool isNaN(double d); 41 /**42 * @return True if d is infinite (platform support required).43 */44 38 bool isInf(double d); 45 39 bool isPosInf(double d); -
trunk/JavaScriptCore/kjs/regexp.cpp
r12317 r13089 33 33 : _flags(flags), _numSubPatterns(0) 34 34 { 35 #if def HAVE_PCREPOSIX35 #if HAVE(PCREPOSIX) 36 36 37 37 int options = PCRE_UTF8; … … 61 61 #endif 62 62 63 #else /* HAVE _PCREPOSIX*/63 #else /* HAVE(PCREPOSIX) */ 64 64 65 65 int regflags = 0; … … 85 85 RegExp::~RegExp() 86 86 { 87 #if def HAVE_PCREPOSIX87 #if HAVE(PCREPOSIX) 88 88 pcre_free(_regex); 89 89 #else … … 107 107 return UString::null(); 108 108 109 #if def HAVE_PCREPOSIX109 #if HAVE(PCREPOSIX) 110 110 111 111 if (!_regex) -
trunk/JavaScriptCore/kjs/regexp.h
r12317 r13089 27 27 #include "config.h" 28 28 29 #if def HAVE_PCREPOSIX29 #if HAVE(PCREPOSIX) 30 30 #include <pcre.h> 31 31 #else // POSIX regex - not so good... … … 33 33 #include <regex.h> 34 34 } 35 #endif // HAVE_PCREPOSIX35 #endif // HAVE(PCREPOSIX) 36 36 37 37 #include "ustring.h" … … 52 52 53 53 private: 54 #if def HAVE_PCREPOSIX54 #if HAVE(PCREPOSIX) 55 55 pcre *_regex; 56 56 #else -
trunk/JavaScriptCore/kjs/testkjs.cpp
r12924 r13089 35 35 #include <stdlib.h> 36 36 #include <string.h> 37 #if HAVE _SYS_TIME_H37 #if HAVE(SYS_TIME_H) 38 38 #include <sys/time.h> 39 39 #endif … … 53 53 54 54 private: 55 #if ! WIN3255 #if !PLATFORM(WIN_OS) 56 56 // Windows does not have timeval, disabling this class for now (bug 7399) 57 57 timeval m_startTime; … … 62 62 void StopWatch::start() 63 63 { 64 #if ! WIN3264 #if !PLATFORM(WIN_OS) 65 65 gettimeofday(&m_startTime, 0); 66 66 #endif … … 69 69 void StopWatch::stop() 70 70 { 71 #if ! WIN3271 #if !PLATFORM(WIN_OS) 72 72 gettimeofday(&m_stopTime, 0); 73 73 #endif … … 76 76 long StopWatch::getElapsedMS() 77 77 { 78 #if ! WIN3278 #if !PLATFORM(WIN_OS) 79 79 timeval elapsedTime; 80 80 timersub(&m_stopTime, &m_startTime, &elapsedTime); -
trunk/JavaScriptCore/kjs/ustring.cpp
r12949 r13089 29 29 #include <stdio.h> 30 30 #include <ctype.h> 31 #if def HAVE_STRING_H31 #if HAVE(STRING_H) 32 32 #include <string.h> 33 33 #endif 34 #if def HAVE_STRINGS_H34 #if HAVE(STRINGS_H) 35 35 #include <strings.h> 36 36 #endif -
trunk/JavaScriptCore/kjs/ustring.h
r12949 r13089 28 28 #include <kxmlcore/RefPtr.h> 29 29 #include <kxmlcore/PassRefPtr.h> 30 31 #if __APPLE__32 #include <sys/types.h>33 #ifndef KWQ_UNSIGNED_TYPES_DEFINED34 #define KWQ_UNSIGNED_TYPES_DEFINED35 typedef unsigned char uchar;36 typedef unsigned long ulong;37 #endif38 #endif39 30 40 31 #include <stdint.h>
Note:
See TracChangeset
for help on using the changeset viewer.