Changeset 37604 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 15, 2008, 9:42:43 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r37602 r37604 1 2008-10-15 Joerg Bornemann <[email protected]> 2 3 Reviewed by Darin Adler. 4 5 - part of https://bugs.webkit.org/show_bug.cgi?id=20746 6 Fix compilation on Windows CE. 7 8 str(n)icmp, strdup and vsnprintf are not available on Windows CE, 9 they are called _str(n)icmp, etc. instead 10 11 * wtf/StringExtras.h: Added inline function implementations. 12 1 13 2008-10-15 Gabor Loki <[email protected]> 2 14 -
trunk/JavaScriptCore/wtf/StringExtras.h
r36289 r37604 1 1 /* 2 * Copyright (C) 2006 Apple Computer, Inc.All rights reserved.2 * Copyright (C) 2006 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #define WTF_StringExtras_h 28 28 29 #include <stdarg.h> 29 30 #include <stdio.h> 30 #include <stdarg.h>31 31 32 32 #if COMPILER(MSVC) 33 33 34 inline int snprintf(char *str, size_t size, const char* format, ...)34 inline int snprintf(char* buffer, size_t count, const char* format, ...) 35 35 { 36 36 int result; 37 37 va_list args; 38 38 va_start(args, format); 39 result = _vsnprintf( str, size, format, args);39 result = _vsnprintf(buffer, count, format, args); 40 40 va_end(args); 41 41 return result; 42 42 } 43 43 44 #if COMPILER(MSVC7) 45 // MSVC8 and above define this function 46 #define vsnprintf snprintf 44 #if COMPILER(MSVC7) || PLATFORM(WIN_CE) 45 46 inline int vsnprintf(char* buffer, size_t count, const char* format, va_list args) 47 { 48 return _vsnprintf(buffer, count, format, args); 49 } 50 47 51 #endif 48 52 49 inline int strncasecmp(const char* s1, const char* s2, size_t len) { return strnicmp(s1, s2, len); } 53 #if PLATFORM(WIN_CE) 50 54 51 inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1, s2); } 55 inline int strnicmp(const char* string1, const char* string2, size_t count) 56 { 57 return _strnicmp(string1, string2, count); 58 } 59 60 inline int stricmp(const char* string1, const char* string2) 61 { 62 return _stricmp(string1, string2); 63 } 64 65 inline char* strdup(const char* strSource) 66 { 67 return _strdup(strSource); 68 } 69 70 #endif 71 72 inline int strncasecmp(const char* s1, const char* s2, size_t len) 73 { 74 return strnicmp(s1, s2, len); 75 } 76 77 inline int strcasecmp(const char* s1, const char* s2) 78 { 79 return stricmp(s1, s2); 80 } 52 81 53 82 #endif
Note:
See TracChangeset
for help on using the changeset viewer.