| 1 | diff -u -r ../../glkterm/Makefile ./Makefile |
| 2 | --- ../../glkterm/Makefile 2012-10-14 19:21:09.000000000 +0200 |
| 3 | +++ ./Makefile 2014-02-15 13:43:48.000000000 +0100 |
| 4 | @@ -10,21 +10,21 @@ |
| 5 | |
| 6 | # Pick a C compiler. |
| 7 | #CC = cc |
| 8 | -CC = gcc -ansi |
| 9 | +#CC = gcc -ansi |
| 10 | |
| 11 | # You may need to set directories to pick up the ncursesw library. |
| 12 | #INCLUDEDIRS = -I/usr/5include |
| 13 | #LIBDIRS = -L/usr/5lib |
| 14 | -LIBS = -lncursesw |
| 15 | +LIBS = $(LDFLAGS) -lncursesw |
| 16 | |
| 17 | # Use this LIBS line instead of the above if you do not have ncursesw |
| 18 | # available. For example, on a standard Mac OSX setup. (You will |
| 19 | # probably also have to set LOCAL_NCURSESW in CFLAGS or in gtoption.h.) |
| 20 | #LIBS = -lncurses |
| 21 | |
| 22 | -OPTIONS = -g -Wall |
| 23 | +#OPTIONS = -g -Wall |
| 24 | |
| 25 | -CFLAGS = $(OPTIONS) $(INCLUDEDIRS) |
| 26 | +#CFLAGS = $(OPTIONS) $(INCLUDEDIRS) |
| 27 | |
| 28 | GLKLIB = libglktermw.a |
| 29 | |
| 30 | @@ -44,8 +44,8 @@ |
| 31 | cgunicod.o: cgunigen.c |
| 32 | |
| 33 | $(GLKLIB): $(GLKTERM_OBJS) |
| 34 | - ar r $(GLKLIB) $(GLKTERM_OBJS) |
| 35 | - ranlib $(GLKLIB) |
| 36 | + $(AR) r $(GLKLIB) $(GLKTERM_OBJS) |
| 37 | + $(RANLIB) $(GLKLIB) |
| 38 | |
| 39 | Make.glktermw: |
| 40 | echo LINKLIBS = $(LIBDIRS) $(LIBS) > Make.glktermw |
| 41 | diff -u -r ../../glkterm/cgdate.c ./cgdate.c |
| 42 | --- ../../glkterm/cgdate.c 2012-10-14 19:21:09.000000000 +0200 |
| 43 | +++ ./cgdate.c 2014-02-15 13:45:27.000000000 +0100 |
| 44 | @@ -7,6 +7,24 @@ |
| 45 | #include "glk.h" |
| 46 | #include "glkterm.h" |
| 47 | |
| 48 | +#ifdef __ANDROID__ |
| 49 | +time_t timegm (struct tm *tm) { |
| 50 | + time_t ret; |
| 51 | + char *tz; |
| 52 | + |
| 53 | + tz = getenv("TZ"); |
| 54 | + setenv("TZ", "", 1); |
| 55 | + tzset(); |
| 56 | + ret = mktime(tm); |
| 57 | + if (tz) |
| 58 | + setenv("TZ", tz, 1); |
| 59 | + else |
| 60 | + unsetenv("TZ"); |
| 61 | + tzset(); |
| 62 | + return ret; |
| 63 | +} |
| 64 | +#endif |
| 65 | + |
| 66 | /* This file is copied directly from the cheapglk package. |
| 67 | (Except that warning string constants are changed to L"..." constants.) */ |
| 68 | |
| 69 | diff -u -r ../../glkterm/gtncursesw.c ./gtncursesw.c |
| 70 | --- ../../glkterm/gtncursesw.c 2012-10-14 19:21:09.000000000 +0200 |
| 71 | +++ ./gtncursesw.c 2014-02-15 13:43:48.000000000 +0100 |
| 72 | @@ -92,7 +92,7 @@ |
| 73 | #else /* LOCAL_NCURSESW */ |
| 74 | |
| 75 | #define _XOPEN_SOURCE_EXTENDED /* ncursesw *wch* and *wstr* functions */ |
| 76 | -#include <ncursesw/ncurses.h> |
| 77 | +#include <ncurses.h> |
| 78 | |
| 79 | int local_get_wch (wint_t *ch) |
| 80 | { |