diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-07-22 19:45:28 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-07-22 19:45:28 +1000 |
commit | 1515a837ec65ee6fe34ff2c3dffac04531672eac (patch) | |
tree | 04aa90516142c331d42002a2653a524ad10f2a6d | |
parent | ec88bf12f4f525f1859a9d5fdbb5d38f193c744e (diff) | |
download | jimtcl-1515a837ec65ee6fe34ff2c3dffac04531672eac.zip jimtcl-1515a837ec65ee6fe34ff2c3dffac04531672eac.tar.gz jimtcl-1515a837ec65ee6fe34ff2c3dffac04531672eac.tar.bz2 |
Help Jim Tcl build on Haiku
Don't use -Werror
Prefer user CFLAGS over default options
Haiku needs -lnetwork for networking functions
Haiku does not have -lm
Haiku does not have SIGIO
Silence some warnings
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | auto.def | 11 | ||||
-rw-r--r-- | jim-aio.c | 2 | ||||
-rw-r--r-- | jim-pack.c | 4 | ||||
-rw-r--r-- | jim-sdl.c | 2 | ||||
-rw-r--r-- | jim-signal.c | 2 | ||||
-rw-r--r-- | jim-sqlite.c | 2 | ||||
-rw-r--r-- | jim-sqlite3.c | 2 | ||||
-rw-r--r-- | jim.c | 8 |
9 files changed, 23 insertions, 14 deletions
diff --git a/Makefile.in b/Makefile.in index 7932f32..e8b545e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -18,7 +18,7 @@ exec_prefix ?= @exec_prefix@ prefix ?= @prefix@ install_jim = @install_jim@ -CPPFLAGS += -D_GNU_SOURCE -Wall -Werror $(OPTIM) -I. +CPPFLAGS += -D_GNU_SOURCE -Wall $(OPTIM) -I. ifneq (@srcdir@,.) CPPFLAGS += -I@srcdir@ VPATH := @srcdir@ @@ -112,7 +112,7 @@ $(LIBJIM): $(OBJS) $(C_EXT_OBJS) endif %.so: jim-%.c - $(CC) $(CFLAGS) $(CPPFLAGS) $(SHOBJ_CFLAGS) -c -o $*.o $^ + $(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o $*.o $^ $(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ $*.o $(SH_LIBJIM) $(LDLIBS) Tcl.html: jim_tcl.txt @@ -64,10 +64,17 @@ cc-check-types "long long" cc-check-includes sys/socket.h netinet/in.h arpa/inet.h netdb.h cc-check-includes sys/un.h dlfcn.h unistd.h crt_externs.h +# Haiku needs -lnetwork +if {[cc-check-function-in-lib inet_ntop network]} { + if {[get-define lib_inet_ntop] ne ""} { + cc-with {-libs -lnetwork} + } +} + cc-check-functions ualarm sysinfo lstat fork vfork system select cc-check-functions backtrace geteuid mkstemp realpath strptime gettimeofday cc-check-functions regcomp waitpid sigaction sys_signame sys_siglist -cc-check-functions syslog opendir readlink sleep usleep pipe inet_ntop getaddrinfo +cc-check-functions syslog opendir readlink sleep usleep pipe getaddrinfo define TCL_LIBRARY [get-define prefix]/lib/jim @@ -132,7 +139,7 @@ if {[opt-bool maintainer]} { if {[opt-bool math full]} { msg-result "Enabling math functions" define JIM_MATH_FUNCTIONS - define-append LIBS -lm + cc-check-function-in-lib sin m } if {[opt-bool ipv6 full]} { msg-result "Enabling IPv6" @@ -724,7 +724,7 @@ static int aio_cmd_buffering(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { AioFile *af = Jim_CmdPrivData(interp); - static const char *options[] = { + static const char * const options[] = { "none", "line", "full", @@ -201,7 +201,7 @@ static void JimSetBitsIntLittleEndian(unsigned char *bitvec, jim_wide value, int static int Jim_UnpackCmd(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { int option; - static const char const *options[] = { "-intbe", "-intle", "-uintbe", "-uintle", "-str", NULL }; + static const char * const options[] = { "-intbe", "-intle", "-uintbe", "-uintle", "-str", NULL }; enum { OPT_INTBE, OPT_INTLE, OPT_UINTBE, OPT_UINTLE, OPT_STR, }; jim_wide pos; jim_wide width; @@ -280,7 +280,7 @@ static int Jim_UnpackCmd(Jim_Interp *interp, int argc, Jim_Obj *const *argv) static int Jim_PackCmd(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { int option; - static const char const *options[] = { "-intle", "-intbe", "-str", NULL }; + static const char * const options[] = { "-intle", "-intbe", "-str", NULL }; enum { OPT_LE, OPT_BE, OPT_STR }; jim_wide pos = 0; jim_wide width; @@ -56,7 +56,7 @@ static int JimSdlHandlerCommand(Jim_Interp *interp, int argc, Jim_Obj *const *ar { JimSdlSurface *jss = Jim_CmdPrivData(interp); int option; - const char *options[] = { + static const char * const options[] = { "free", "flip", "pixel", "rectangle", "box", "line", "aaline", "circle", "aacircle", "fcircle", NULL }; diff --git a/jim-signal.c b/jim-signal.c index c539aa3..7520aac 100644 --- a/jim-signal.c +++ b/jim-signal.c @@ -68,7 +68,9 @@ const char *Jim_SignalId(int sig) CHECK_SIG(SIGHUP); CHECK_SIG(SIGILL); CHECK_SIG(SIGINT); +#ifdef SIGIO CHECK_SIG(SIGIO); +#endif CHECK_SIG(SIGKILL); CHECK_SIG(SIGPIPE); CHECK_SIG(SIGPROF); diff --git a/jim-sqlite.c b/jim-sqlite.c index a628a99..122b548 100644 --- a/jim-sqlite.c +++ b/jim-sqlite.c @@ -130,7 +130,7 @@ static int JimSqliteHandlerCommand(Jim_Interp *interp, int argc, Jim_Obj *const { JimSqliteHandle *sh = Jim_CmdPrivData(interp); int option; - const char *options[] = { + static const char * const options[] = { "close", "query", "lastid", "changes", NULL }; enum diff --git a/jim-sqlite3.c b/jim-sqlite3.c index 96ff940..d621de2 100644 --- a/jim-sqlite3.c +++ b/jim-sqlite3.c @@ -130,7 +130,7 @@ static int JimSqliteHandlerCommand(Jim_Interp *interp, int argc, Jim_Obj *const { JimSqliteHandle *sh = Jim_CmdPrivData(interp); int option; - const char *options[] = { + static const char * const options[] = { "close", "query", "lastid", "changes", NULL }; enum @@ -11971,7 +11971,7 @@ static int Jim_LsetCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *arg /* [lsort] */ static int Jim_LsortCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const argv[]) { - const char *options[] = { + static const char * const options[] = { "-ascii", "-nocase", "-increasing", "-decreasing", "-command", "-integer", "-index", NULL }; enum @@ -12093,7 +12093,7 @@ static int Jim_AppendCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *a static int Jim_DebugCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { #ifdef JIM_DEBUG_COMMAND - const char *options[] = { + static const char * const options[] = { "refcount", "objcount", "objects", "invstr", "scriptlen", "exprlen", "exprbc", "show", NULL @@ -13332,7 +13332,7 @@ static int Jim_DictCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *arg { Jim_Obj *objPtr; int option; - const char *options[] = { + static const char * const options[] = { "create", "get", "set", "unset", "exists", "keys", "merge", "size", "with", NULL }; enum @@ -13448,7 +13448,7 @@ static int Jim_DictCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *arg /* [subst] */ static int Jim_SubstCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { - const char *options[] = { + static const char * const options[] = { "-nobackslashes", "-nocommands", "-novariables", NULL }; enum |