Commits
Jeremy Huddleston Sequoia authored 6fb1dcca402
1 + | --- otool/ofile_print.c.orig 2013-11-10 22:33:14.000000000 -0800 |
2 + | +++ otool/ofile_print.c 2013-11-10 22:34:19.000000000 -0800 |
3 + | |
4 + | #include "stuff/guess_short_name.h" |
5 + | #include "ofile_print.h" |
6 + | |
7 + | +static size_t |
8 + | +strnlen(const char *s, size_t maxlen) |
9 + | +{ |
10 + | + size_t len; |
11 + | + |
12 + | + for (len = 0; len < maxlen; len++, s++) { |
13 + | + if (!*s) |
14 + | + break; |
15 + | + } |
16 + | + return (len); |
17 + | +} |
18 + | + |
19 + | /* <mach/loader.h> */ |
20 + | /* The maximum section alignment allowed to be specified, as a power of two */ |
21 + | #define MAXSECTALIGN 15 /* 2**15 or 0x8000 */ |