aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in4
-rw-r--r--auto.def11
-rw-r--r--jim-aio.c2
-rw-r--r--jim-pack.c4
-rw-r--r--jim-sdl.c2
-rw-r--r--jim-signal.c2
-rw-r--r--jim-sqlite.c2
-rw-r--r--jim-sqlite3.c2
-rw-r--r--jim.c8
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
diff --git a/auto.def b/auto.def
index eb2f892..8da61b8 100644
--- a/auto.def
+++ b/auto.def
@@ -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"
diff --git a/jim-aio.c b/jim-aio.c
index e39e60d..fc48700 100644
--- a/jim-aio.c
+++ b/jim-aio.c
@@ -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",
diff --git a/jim-pack.c b/jim-pack.c
index f517a92..f8d2ca0 100644
--- a/jim-pack.c
+++ b/jim-pack.c
@@ -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;
diff --git a/jim-sdl.c b/jim-sdl.c
index f32621a..00d876d 100644
--- a/jim-sdl.c
+++ b/jim-sdl.c
@@ -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
diff --git a/jim.c b/jim.c
index a4848a5..95b268f 100644
--- a/jim.c
+++ b/jim.c
@@ -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