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

Side by Side Diff: icu52/source/tools/toolutil/pkg_genc.c

Issue 224943002: icu local change part1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: function indentation changed Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « icu52/source/stubdata/stubdata.c ('k') | no next file » | 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 (C) 2009-2013, International Business Machines 2 * Copyright (C) 2009-2013, International Business Machines
3 * Corporation and others. All Rights Reserved. 3 * Corporation and others. All Rights Reserved.
4 ******************************************************************************* 4 *******************************************************************************
5 */ 5 */
6 #include "unicode/utypes.h" 6 #include "unicode/utypes.h"
7 7
8 #if U_PLATFORM_HAS_WIN32_API 8 #if U_PLATFORM_HAS_WIN32_API
9 # define VC_EXTRALEAN 9 # define VC_EXTRALEAN
10 # define WIN32_LEAN_AND_MEAN 10 # define WIN32_LEAN_AND_MEAN
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 const char *footer; 112 const char *footer;
113 int8_t hexType; /* HEX_0X or HEX_0h */ 113 int8_t hexType; /* HEX_0X or HEX_0h */
114 } assemblyHeader[] = { 114 } assemblyHeader[] = {
115 // For gcc assemblers, the meaning of .align changes depending on the 115 // For gcc assemblers, the meaning of .align changes depending on the
116 // hardware, so we use .balign 16 which always means 16 bytes. 116 // hardware, so we use .balign 16 which always means 16 bytes.
117 // https://sourceware.org/binutils/docs/as/Pseudo-Ops.html 117 // https://sourceware.org/binutils/docs/as/Pseudo-Ops.html
118 {"gcc", 118 {"gcc",
119 ".globl %s\n" 119 ".globl %s\n"
120 "\t.section .note.GNU-stack,\"\",%%progbits\n" 120 "\t.section .note.GNU-stack,\"\",%%progbits\n"
121 "\t.section .rodata\n" 121 "\t.section .rodata\n"
122 "\t.balign 16\n" 122 "\t.balign 16\n"
123 /* The 3 lines below are added for Chrome. */
124 "#ifdef U_HIDE_DATA_SYMBOL\n"
125 "\t.hidden %s\n"
126 "#endif\n"
123 "\t.type %s,%%object\n" 127 "\t.type %s,%%object\n"
124 "%s:\n\n", 128 "%s:\n\n",
125 129
126 ".long ","",HEX_0X 130 ".long ","",HEX_0X
127 }, 131 },
128 {"gcc-darwin", 132 {"gcc-darwin",
129 /*"\t.section __TEXT,__text,regular,pure_instructions\n" 133 /*"\t.section __TEXT,__text,regular,pure_instructions\n"
130 "\t.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32\n" */ 134 "\t.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32\n" */
131 ".globl _%s\n" 135 ".globl _%s\n"
136 /* The 3 lines below are added for Chrome. */
137 "#ifdef U_HIDE_DATA_SYMBOL\n"
138 "\t.private_extern _%s\n"
139 "#endif\n"
132 "\t.data\n" 140 "\t.data\n"
133 "\t.const\n" 141 "\t.const\n"
134 "\t.balign 16\n" 142 "\t.balign 16\n"
135 "_%s:\n\n", 143 "_%s:\n\n",
136 144
137 ".long ","",HEX_0X 145 ".long ","",HEX_0X
138 }, 146 },
139 {"gcc-cygwin", 147 {"gcc-cygwin",
140 ".globl _%s\n" 148 ".globl _%s\n"
141 "\t.section .rodata\n" 149 "\t.section .rodata\n"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 char *bufferStr = (char *)buffer; 265 char *bufferStr = (char *)buffer;
258 FileStream *in, *out; 266 FileStream *in, *out;
259 size_t i, length; 267 size_t i, length;
260 268
261 in=T_FileStream_open(filename, "rb"); 269 in=T_FileStream_open(filename, "rb");
262 if(in==NULL) { 270 if(in==NULL) {
263 fprintf(stderr, "genccode: unable to open input file %s\n", filename); 271 fprintf(stderr, "genccode: unable to open input file %s\n", filename);
264 exit(U_FILE_ACCESS_ERROR); 272 exit(U_FILE_ACCESS_ERROR);
265 } 273 }
266 274
267 getOutFilename(filename, destdir, bufferStr, entry, ".s", optFilename); 275 getOutFilename(filename, destdir, bufferStr, entry, ".S", optFilename);
268 out=T_FileStream_open(bufferStr, "w"); 276 out=T_FileStream_open(bufferStr, "w");
269 if(out==NULL) { 277 if(out==NULL) {
270 fprintf(stderr, "genccode: unable to open output file %s\n", bufferStr); 278 fprintf(stderr, "genccode: unable to open output file %s\n", bufferStr);
271 exit(U_FILE_ACCESS_ERROR); 279 exit(U_FILE_ACCESS_ERROR);
272 } 280 }
273 281
274 if (outFilePath != NULL) { 282 if (outFilePath != NULL) {
275 uprv_strcpy(outFilePath, bufferStr); 283 uprv_strcpy(outFilePath, bufferStr);
276 } 284 }
277 285
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 1190
1183 if(T_FileStream_error(out)) { 1191 if(T_FileStream_error(out)) {
1184 fprintf(stderr, "genccode: file write error while generating from file % s\n", filename); 1192 fprintf(stderr, "genccode: file write error while generating from file % s\n", filename);
1185 exit(U_FILE_ACCESS_ERROR); 1193 exit(U_FILE_ACCESS_ERROR);
1186 } 1194 }
1187 1195
1188 T_FileStream_close(out); 1196 T_FileStream_close(out);
1189 T_FileStream_close(in); 1197 T_FileStream_close(in);
1190 } 1198 }
1191 #endif 1199 #endif
OLDNEW
« no previous file with comments | « icu52/source/stubdata/stubdata.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698