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

Side by Side Diff: third_party/talloc/chromium.patch

Issue 10832045: Change talloc.c to build with the mac 10.7 SDK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | third_party/talloc/talloc.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff -c -r talloc-2.0.1/talloc.c talloc/talloc.c 1 diff -c -r talloc-2.0.1/talloc.c talloc/talloc.c
2 *** talloc-2.0.1/talloc.c Tue Dec 15 06:16:57 2009 2 *** talloc-2.0.1/talloc.c Tue Dec 15 06:16:57 2009
3 --- talloc/talloc.c Fri Mar 18 13:03:11 2011 3 --- talloc/talloc.c Fri Mar 18 13:03:11 2011
4 *************** 4 ***************
5 *** 30,36 **** 5 *** 30,36 ****
6 inspired by http://swapped.cc/halloc/ 6 inspired by http://swapped.cc/halloc/
7 */ 7 */
8 8
9 ! #include "replace.h" 9 ! #include "replace.h"
10 #include "talloc.h" 10 #include "talloc.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 { 247 {
248 char *ret; 248 char *ret;
249 249
250 *************** 250 ***************
251 *** 1581,1586 **** 251 *** 1581,1586 ****
252 --- 1593,1609 ---- 252 --- 1593,1609 ----
253 return __talloc_strlendup(t, p, strlen(p)); 253 return __talloc_strlendup(t, p, strlen(p));
254 } 254 }
255 255
256 + #ifndef HAVE_STRNLEN 256 + #ifndef HAVE_STRNLEN
257 + static size_t strnlen(const char* s, size_t n) 257 + #define strnlen rep_strnlen
258 + static size_t rep_strnlen(const char* s, size_t n)
Mark Mentovai 2012/07/27 01:10:14 Bet you broke this patch.
258 + { 259 + {
259 + if (unlikely(!s)) return 0; 260 + if (unlikely(!s)) return 0;
260 + int i = 0; 261 + int i = 0;
261 + while (i < n && *s++ != '\0') 262 + while (i < n && *s++ != '\0')
262 + ++i; 263 + ++i;
263 + return i; 264 + return i;
264 + } 265 + }
265 + #endif 266 + #endif
266 + 267 +
267 /* 268 /*
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 #include <stdlib.h> 362 #include <stdlib.h>
362 #include <stdio.h> 363 #include <stdio.h>
363 #include <stdarg.h> 364 #include <stdarg.h>
364 + #ifndef _MSC_VER 365 + #ifndef _MSC_VER
365 + #include <stdint.h> 366 + #include <stdint.h>
366 + #endif 367 + #endif
367 + #include <string.h> 368 + #include <string.h>
368 369
369 #define TALLOC_VERSION_MAJOR 2 370 #define TALLOC_VERSION_MAJOR 2
370 #define TALLOC_VERSION_MINOR 0 371 #define TALLOC_VERSION_MINOR 0
OLDNEW
« no previous file with comments | « no previous file | third_party/talloc/talloc.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698