OLD | NEW |
1 diff --git a/Include/datetime.h b/Include/datetime.h | 1 diff --git a/Include/datetime.h b/Include/datetime.h |
2 --- a/Include/datetime.h | 2 --- a/Include/datetime.h |
3 +++ b/Include/datetime.h | 3 +++ b/Include/datetime.h |
4 @@ -166,6 +166,8 @@ typedef struct { | 4 @@ -166,6 +166,8 @@ typedef struct { |
5 | 5 |
6 #ifdef Py_BUILD_CORE | 6 #ifdef Py_BUILD_CORE |
7 | 7 |
8 +#define PyDataTime_STATIC 1 | 8 +#define PyDataTime_STATIC 1 |
9 + | 9 + |
10 /* Macros for type checking when building the Python core. */ | 10 /* Macros for type checking when building the Python core. */ |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 + | 402 + |
403 +// Dummy implementation of nacl_spawn_vfork_exit, otherwise provided | 403 +// Dummy implementation of nacl_spawn_vfork_exit, otherwise provided |
404 +// by nacl_spawn. | 404 +// by nacl_spawn. |
405 +void nacl_spawn_vfork_exit(int status) { | 405 +void nacl_spawn_vfork_exit(int status) { |
406 + _exit(status); | 406 + _exit(status); |
407 +} | 407 +} |
408 + | 408 + |
409 int | 409 int |
410 main(int argc, char **argv) | 410 main(int argc, char **argv) |
411 { | 411 { |
412 @@ -20,5 +43,9 @@ main(int argc, char **argv) | 412 @@ -20,5 +49,9 @@ main(int argc, char **argv) |
413 m = fpgetmask(); | 413 m = fpgetmask(); |
414 fpsetmask(m & ~FP_X_OFL); | 414 fpsetmask(m & ~FP_X_OFL); |
415 #endif | 415 #endif |
416 +#ifdef __native_client__ | 416 +#ifdef __native_client__ |
417 + setvbuf(stdout, NULL, _IOLBF, 0); | 417 + setvbuf(stdout, NULL, _IOLBF, 0); |
418 + setvbuf(stdin, NULL, _IOLBF, 0); | 418 + setvbuf(stdin, NULL, _IOLBF, 0); |
419 +#endif | 419 +#endif |
420 return Py_Main(argc, argv); | 420 return Py_Main(argc, argv); |
421 } | 421 } |
| 422 diff --git a/Modules/readline.c b/Modules/readline.c |
| 423 --- a/Modules/readline.c |
| 424 +++ b/Modules/readline.c |
| 425 @@ -950,7 +950,12 @@ setup_readline(void) |
| 426 /* Wrapper around GNU readline that handles signals differently. */ |
| 427 |
| 428 |
| 429 -#if defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT) |
| 430 +/* |
| 431 + * Don't use the select()-based readline under Native Client. While select() |
| 432 + * is available and compile and link time it will fail at runtime under sel_ldr |
| 433 + * since there is no IRT/syscall implemenation of select(). |
| 434 + */ |
| 435 +#if defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT) && !defined(__native_clie
nt__) |
| 436 |
| 437 static char *completed_input_string; |
| 438 static void |
422 diff --git a/Modules/timemodule.c b/Modules/timemodule.c | 439 diff --git a/Modules/timemodule.c b/Modules/timemodule.c |
423 --- a/Modules/timemodule.c | 440 --- a/Modules/timemodule.c |
424 +++ b/Modules/timemodule.c | 441 +++ b/Modules/timemodule.c |
425 @@ -34,6 +34,11 @@ extern int ftime(struct timeb *); | 442 @@ -34,6 +34,11 @@ extern int ftime(struct timeb *); |
426 #endif /* MS_WINDOWS */ | 443 #endif /* MS_WINDOWS */ |
427 #endif /* HAVE_FTIME */ | 444 #endif /* HAVE_FTIME */ |
428 | 445 |
429 +#if defined(__native_client__) && !defined(__GLIBC__) | 446 +#if defined(__native_client__) && !defined(__GLIBC__) |
430 +#define timezone _timezone | 447 +#define timezone _timezone |
431 +#define daylight _daylight | 448 +#define daylight _daylight |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 OpenUNIX*|UnixWare*) | 676 OpenUNIX*|UnixWare*) |
660 @@ -2121,7 +2140,7 @@ then | 677 @@ -2121,7 +2140,7 @@ then |
661 LINKFORSHARED="-Wl,-E -Wl,+s";; | 678 LINKFORSHARED="-Wl,-E -Wl,+s";; |
662 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; | 679 # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
663 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; | 680 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
664 - Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; | 681 - Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; |
665 + Linux*|GNU*|NaCl*) LINKFORSHARED="-Xlinker -export-dynamic";; | 682 + Linux*|GNU*|NaCl*) LINKFORSHARED="-Xlinker -export-dynamic";; |
666 # -u libsys_s pulls in all symbols in libsys | 683 # -u libsys_s pulls in all symbols in libsys |
667 Darwin/*) | 684 Darwin/*) |
668 # -u _PyMac_Error is needed to pull in the mac toolbox glue, | 685 # -u _PyMac_Error is needed to pull in the mac toolbox glue, |
OLD | NEW |