Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: src/dtoa-config.c

Issue 545125: Initial Solaris support (Closed)
Patch Set: Fixed comments, simplified platform-solaris Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/SConscript ('k') | src/platform.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2007-2008 the V8 project authors. All rights reserved. 2 * Copyright 2007-2008 the V8 project authors. All rights reserved.
3 * Redistribution and use in source and binary forms, with or without 3 * Redistribution and use in source and binary forms, with or without
4 * modification, are permitted provided that the following conditions are 4 * modification, are permitted provided that the following conditions are
5 * met: 5 * met:
6 * 6 *
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above 9 * * Redistributions in binary form must reproduce the above
10 * copyright notice, this list of conditions and the following 10 * copyright notice, this list of conditions and the following
(...skipping 20 matching lines...) Expand all
31 * Dtoa needs to have a particular environment set up for it so 31 * Dtoa needs to have a particular environment set up for it so
32 * instead of using it directly you should use this file. 32 * instead of using it directly you should use this file.
33 * 33 *
34 * The way it works is that when you link with it, its definitions 34 * The way it works is that when you link with it, its definitions
35 * of dtoa, strtod etc. override the default ones. So if you fail 35 * of dtoa, strtod etc. override the default ones. So if you fail
36 * to link with this library everything will still work, it's just 36 * to link with this library everything will still work, it's just
37 * subtly wrong. 37 * subtly wrong.
38 */ 38 */
39 39
40 #if !(defined(__APPLE__) && defined(__MACH__)) && \ 40 #if !(defined(__APPLE__) && defined(__MACH__)) && \
41 !defined(WIN32) && !defined(__FreeBSD__) && !defined(__OpenBSD__) 41 !defined(WIN32) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && \
42 !defined(__sun)
42 #include <endian.h> 43 #include <endian.h>
43 #endif 44 #endif
44 #include <math.h> 45 #include <math.h>
45 #include <float.h> 46 #include <float.h>
46 47
47 /* The floating point word order on ARM is big endian when floating point 48 /* The floating point word order on ARM is big endian when floating point
48 * emulation is used, even if the byte order is little endian */ 49 * emulation is used, even if the byte order is little endian */
49 #if !(defined(__APPLE__) && defined(__MACH__)) && !defined(WIN32) && \ 50 #if !(defined(__APPLE__) && defined(__MACH__)) && !defined(WIN32) && \
50 !defined(__FreeBSD__) && !defined(__OpenBSD__) && \ 51 !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__sun) && \
51 __FLOAT_WORD_ORDER == __BIG_ENDIAN 52 __FLOAT_WORD_ORDER == __BIG_ENDIAN
52 #define IEEE_MC68k 53 #define IEEE_MC68k
53 #else 54 #else
54 #define IEEE_8087 55 #define IEEE_8087
55 #endif 56 #endif
56 57
57 #define __MATH_H__ 58 #define __MATH_H__
58 #if defined(__APPLE__) && defined(__MACH__) || defined(__FreeBSD__) || \ 59 #if defined(__APPLE__) && defined(__MACH__) || defined(__FreeBSD__) || \
59 defined(__OpenBSD__) 60 defined(__OpenBSD__) || defined(__sun)
60 /* stdlib.h on FreeBSD and Apple's 10.5 and later SDKs will mangle the 61 /* stdlib.h on FreeBSD and Apple's 10.5 and later SDKs will mangle the
61 * name of strtod. If it's included after strtod is redefined as 62 * name of strtod. If it's included after strtod is redefined as
62 * gay_strtod, it will mangle the name of gay_strtod, which is 63 * gay_strtod, it will mangle the name of gay_strtod, which is
63 * unwanted. */ 64 * unwanted. */
64 #include <stdlib.h> 65 #include <stdlib.h>
65 66
66 #endif 67 #endif
67 /* stdlib.h on Windows adds __declspec(dllimport) to all functions when using 68 /* stdlib.h on Windows adds __declspec(dllimport) to all functions when using
68 * the DLL version of the CRT (compiling with /MD or /MDd). If stdlib.h is 69 * the DLL version of the CRT (compiling with /MD or /MDd). If stdlib.h is
69 * included after strtod is redefined as gay_strtod, it will add 70 * included after strtod is redefined as gay_strtod, it will add
(...skipping 12 matching lines...) Expand all
82 /* On 64-bit systems, we need to make sure that a Long is only 32 bits. */ 83 /* On 64-bit systems, we need to make sure that a Long is only 32 bits. */
83 #ifdef V8_TARGET_ARCH_X64 84 #ifdef V8_TARGET_ARCH_X64
84 #define Long int 85 #define Long int
85 #endif /* V8_TARGET_ARCH_X64 */ 86 #endif /* V8_TARGET_ARCH_X64 */
86 87
87 /* Make sure we use the David M. Gay version of strtod(). On Linux, we 88 /* Make sure we use the David M. Gay version of strtod(). On Linux, we
88 * cannot use the same name (maybe the function does not have weak 89 * cannot use the same name (maybe the function does not have weak
89 * linkage?). */ 90 * linkage?). */
90 #define strtod gay_strtod 91 #define strtod gay_strtod
91 #include "third_party/dtoa/dtoa.c" 92 #include "third_party/dtoa/dtoa.c"
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698