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

Side by Side Diff: ports/dosbox/nacl.patch

Issue 162913002: Use _NEWLIB_VERSION macro to detect newlib. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 6 years, 10 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 | « ports/civetweb/nacl.patch ('k') | ports/leveldb/nacl.patch » ('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 --git a/include/setup.h b/include/setup.h 1 diff --git a/include/setup.h b/include/setup.h
2 index db75ada..f52b840 100644 2 index db75ada..f52b840 100644
3 --- a/include/setup.h 3 --- a/include/setup.h
4 +++ b/include/setup.h 4 +++ b/include/setup.h
5 @@ -21,6 +21,8 @@ 5 @@ -21,6 +21,8 @@
6 #ifndef DOSBOX_SETUP_H 6 #ifndef DOSBOX_SETUP_H
7 #define DOSBOX_SETUP_H 7 #define DOSBOX_SETUP_H
8 8
9 +#include <stdio.h> 9 +#include <stdio.h>
10 + 10 +
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 +#ifndef __native_client__ 176 +#ifndef __native_client__
177 + |SDL_INIT_CDROM /* nacl-SDL is not built with CDROM */ 177 + |SDL_INIT_CDROM /* nacl-SDL is not built with CDROM */
178 +#endif /* __native_client__ */ 178 +#endif /* __native_client__ */
179 |SDL_INIT_NOPARACHUTE 179 |SDL_INIT_NOPARACHUTE
180 ) < 0 ) E_Exit("Can't init SDL %s",SDL_GetError()); 180 ) < 0 ) E_Exit("Can't init SDL %s",SDL_GetError());
181 sdl.inited = true; 181 sdl.inited = true;
182 @@ -1899,6 +1902,22 @@ int main(int argc, char* argv[]) { 182 @@ -1899,6 +1902,22 @@ int main(int argc, char* argv[]) {
183 return 0; 183 return 0;
184 } 184 }
185 185
186 +#if defined(__native_client__) && !defined(__GLIBC__) 186 +#if defined(__native_client__) && defined(_NEWLIB_VERSION)
187 +#include <libgen.h> 187 +#include <libgen.h>
188 +#include <assert.h> 188 +#include <assert.h>
189 + 189 +
190 +// Horrible hack to ensure that _execve is pulled out of libnosys.a 190 +// Horrible hack to ensure that _execve is pulled out of libnosys.a
191 +// TODO(sbc): Remove this once libnosys is rolled in libnacl 191 +// TODO(sbc): Remove this once libnosys is rolled in libnacl
192 +extern "C" void* _execve; 192 +extern "C" void* _execve;
193 +void* foo = (void*)_execve; 193 +void* foo = (void*)_execve;
194 + 194 +
195 +char *dirname(char *path) { 195 +char *dirname(char *path) {
196 + fprintf(stderr, "ERROR: %s is not implemented\n", __func__); 196 + fprintf(stderr, "ERROR: %s is not implemented\n", __func__);
197 + assert(0); 197 + assert(0);
198 + return NULL; 198 + return NULL;
199 +} 199 +}
200 +#endif 200 +#endif
201 + 201 +
202 void GFX_GetSize(int &width, int &height, bool &fullscreen) { 202 void GFX_GetSize(int &width, int &height, bool &fullscreen) {
203 width = sdl.draw.width; 203 width = sdl.draw.width;
204 height = sdl.draw.height; 204 height = sdl.draw.height;
OLDNEW
« no previous file with comments | « ports/civetweb/nacl.patch ('k') | ports/leveldb/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698