| OLD | NEW |
| 1 diff --git a/configure b/configure | 1 diff --git a/configure b/configure |
| 2 --- a/configure | 2 --- a/configure |
| 3 +++ b/configure | 3 +++ b/configure |
| 4 @@ -33768,7 +33768,6 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; } | 4 @@ -33696,7 +33696,6 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; } |
| 5 -Wattributes \ | 5 -Wattributes \ |
| 6 -Wbad-function-cast \ | 6 -Wbad-function-cast \ |
| 7 -Wbuiltin-macro-redefined \ | 7 -Wbuiltin-macro-redefined \ |
| 8 - -Wcast-align \ | 8 - -Wcast-align \ |
| 9 -Wchar-subscripts \ | 9 -Wchar-subscripts \ |
| 10 -Wclobbered \ | 10 -Wclobbered \ |
| 11 -Wcomment \ | 11 -Wcomment \ |
| 12 @@ -33782,7 +33781,6 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; } | 12 @@ -33711,7 +33710,6 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; } |
| 13 -Wdouble-promotion \ | 13 -Wdouble-promotion \ |
| 14 -Wempty-body \ | 14 -Wempty-body \ |
| 15 -Wendif-labels \ | 15 -Wendif-labels \ |
| 16 - -Wenum-compare \ | 16 - -Wenum-compare \ |
| 17 -Wextra \ | 17 -Wextra \ |
| 18 -Wformat-contains-nul \ | 18 -Wformat-contains-nul \ |
| 19 -Wformat-extra-args \ | 19 -Wformat-extra-args \ |
| 20 @@ -33805,14 +33803,11 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6;
} | 20 @@ -33734,14 +33732,11 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6;
} |
| 21 -Wmain \ | 21 -Wmain \ |
| 22 -Wmaybe-uninitialized \ | 22 -Wmaybe-uninitialized \ |
| 23 -Wmissing-braces \ | 23 -Wmissing-braces \ |
| 24 - -Wmissing-declarations \ | 24 - -Wmissing-declarations \ |
| 25 -Wmissing-field-initializers \ | 25 -Wmissing-field-initializers \ |
| 26 -Wmissing-include-dirs \ | 26 -Wmissing-include-dirs \ |
| 27 -Wmissing-parameter-type \ | 27 -Wmissing-parameter-type \ |
| 28 - -Wmissing-prototypes \ | 28 - -Wmissing-prototypes \ |
| 29 -Wmultichar \ | 29 -Wmultichar \ |
| 30 -Wnarrowing \ | 30 -Wnarrowing \ |
| 31 - -Wnested-externs \ | 31 - -Wnested-externs \ |
| 32 -Wnonnull \ | 32 -Wnonnull \ |
| 33 -Wnormalized=nfc \ | |
| 34 -Wold-style-declaration \ | 33 -Wold-style-declaration \ |
| 35 @@ -33838,8 +33833,6 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; } | 34 -Wold-style-definition \ |
| 35 @@ -33767,8 +33762,6 @@ printf "%s\n" "$gl_cv_cc_uninitialized_supported" >&6; } |
| 36 -Wstrict-prototypes \ | 36 -Wstrict-prototypes \ |
| 37 -Wsuggest-attribute=const \ | 37 -Wsuggest-attribute=const \ |
| 38 -Wsuggest-attribute=format \ | 38 -Wsuggest-attribute=format \ |
| 39 - -Wsuggest-attribute=noreturn \ | 39 - -Wsuggest-attribute=noreturn \ |
| 40 - -Wsuggest-attribute=pure \ | 40 - -Wsuggest-attribute=pure \ |
| 41 -Wswitch \ | 41 -Wswitch \ |
| 42 -Wswitch-default \ | 42 -Wswitch-default \ |
| 43 -Wsync-nand \ | 43 -Wsync-nand \ |
| 44 diff --git a/lib/error.c b/lib/error.c | 44 diff --git a/lib/error.c b/lib/error.c |
| 45 --- a/lib/error.c | 45 --- a/lib/error.c |
| 46 +++ b/lib/error.c | 46 +++ b/lib/error.c |
| 47 @@ -377,9 +377,14 @@ error_at_line (int status, int errnum, const char *file_nam
e, | 47 @@ -382,9 +382,14 @@ error_at_line (int status, int errnum, const char *file_nam
e, |
| 48 __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", | 48 __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ", |
| 49 file_name, line_number); | 49 file_name, line_number); |
| 50 #else | 50 #else |
| 51 +# if defined(__pnacl__) | 51 +# if defined(__pnacl__) |
| 52 + fprintf (stderr, "%s:%d: ", | 52 + fprintf (stderr, "%s:%d: ", |
| 53 + file_name, line_number); | 53 + file_name, line_number); |
| 54 +#else | 54 +#else |
| 55 fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", | 55 fprintf (stderr, file_name != NULL ? "%s:%d: " : " ", |
| 56 file_name, line_number); | 56 file_name, line_number); |
| 57 #endif | 57 #endif |
| 58 +#endif | 58 +#endif |
| 59 | 59 |
| 60 va_start (args, message); | 60 va_start (args, message); |
| 61 error_tail (status, errnum, message, args); | 61 error_tail (status, errnum, message, args); |
| 62 diff --git a/lib/fcntl.c b/lib/fcntl.c | 62 diff --git a/lib/fcntl.c b/lib/fcntl.c |
| 63 --- a/lib/fcntl.c | 63 --- a/lib/fcntl.c |
| 64 +++ b/lib/fcntl.c | 64 +++ b/lib/fcntl.c |
| 65 @@ -186,7 +186,12 @@ rpl_fcntl (int fd, int action, /* arg */...) | 65 @@ -202,7 +202,12 @@ rpl_fcntl (int fd, int action, /* arg */...) |
| 66 { | 66 { |
| 67 int target = va_arg (arg, int); | 67 int target = va_arg (arg, int); |
| 68 /* Detect invalid target; needed for cygwin 1.5.x. */ | 68 /* Detect invalid target; needed for cygwin 1.5.x. */ |
| 69 + /* TODO(bradnelson): Drop once newlib has getdtablesize. */ | 69 + /* TODO(bradnelson): Drop once newlib has getdtablesize. */ |
| 70 +#if defined(__native_client__) && defined(_NEWLIB_VERSION) | 70 +#if defined(__native_client__) && defined(_NEWLIB_VERSION) |
| 71 + if (target < 0) | 71 + if (target < 0) |
| 72 +#else | 72 +#else |
| 73 if (target < 0 || getdtablesize () <= target) | 73 if (target < 0 || getdtablesize () <= target) |
| 74 +#endif | 74 +#endif |
| 75 errno = EINVAL; | 75 errno = EINVAL; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 + if (idx >= set->nelem) | 139 + if (idx >= set->nelem) |
| 140 +#else | 140 +#else |
| 141 if (idx < 0 || idx >= set->nelem) | 141 if (idx < 0 || idx >= set->nelem) |
| 142 +#endif | 142 +#endif |
| 143 return; | 143 return; |
| 144 --set->nelem; | 144 --set->nelem; |
| 145 for (; idx < set->nelem; idx++) | 145 for (; idx < set->nelem; idx++) |
| 146 diff --git a/src/Makefile.in b/src/Makefile.in | 146 diff --git a/src/Makefile.in b/src/Makefile.in |
| 147 --- a/src/Makefile.in | 147 --- a/src/Makefile.in |
| 148 +++ b/src/Makefile.in | 148 +++ b/src/Makefile.in |
| 149 @@ -1254,7 +1254,7 @@ clean-binPROGRAMS: | 149 @@ -1259,7 +1259,7 @@ clean-binPROGRAMS: |
| 150 | 150 |
| 151 grep$(EXEEXT): $(grep_OBJECTS) $(grep_DEPENDENCIES) $(EXTRA_grep_DEPENDENCIES) | 151 grep$(EXEEXT): $(grep_OBJECTS) $(grep_DEPENDENCIES) $(EXTRA_grep_DEPENDENCIES) |
| 152 @rm -f grep$(EXEEXT) | 152 @rm -f grep$(EXEEXT) |
| 153 - $(AM_V_CCLD)$(LINK) $(grep_OBJECTS) $(grep_LDADD) $(LIBS) | 153 - $(AM_V_CCLD)$(LINK) $(grep_OBJECTS) $(grep_LDADD) $(LIBS) |
| 154 +» $(AM_V_CCLD)$(LINK) $(grep_OBJECTS) $(grep_LDADD) -Wl,--undefined=PSUser
CreateInstance -lcli_main -lppapi_simple -lnacl_io -lppapi -lppapi_cpp -pthread
$(LIBS) | 154 +» $(AM_V_CCLD)$(LINK) $(grep_OBJECTS) $(grep_LDADD) -Wl,--undefined=PSUser
CreateInstance -lcli_main -lnacl_spawn -lppapi_simple -lnacl_io -lppapi -lppapi_
cpp -pthread $(LIBS) |
| 155 install-binSCRIPTS: $(bin_SCRIPTS) | 155 install-binSCRIPTS: $(bin_SCRIPTS) |
| 156 @$(NORMAL_INSTALL) | 156 @$(NORMAL_INSTALL) |
| 157 @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ | 157 @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ |
| 158 diff --git a/src/grep.c b/src/grep.c | 158 diff --git a/src/grep.c b/src/grep.c |
| 159 --- a/src/grep.c | 159 --- a/src/grep.c |
| 160 +++ b/src/grep.c | 160 +++ b/src/grep.c |
| 161 @@ -1931,7 +1931,7 @@ fgrep_to_grep_pattern (size_t len, char const *keys, | 161 @@ -2107,7 +2107,7 @@ fgrep_to_grep_pattern (size_t len, char const *keys, |
| 162 } | 162 } |
| 163 | 163 |
| 164 int | 164 int |
| 165 -main (int argc, char **argv) | 165 -main (int argc, char **argv) |
| 166 +nacl_main (int argc, char **argv) | 166 +nacl_main (int argc, char **argv) |
| 167 { | 167 { |
| 168 char *keys; | 168 char *keys; |
| 169 size_t keycc, oldcc, keyalloc; | 169 size_t keycc, oldcc, keyalloc; |
| OLD | NEW |