implicit deps cause problems on 64-bit machines. The attached patch
makes for far fewer warnings from gcc-4.0, although there are still
several:
klicdb.c:126: warning: pointer targets in passing argument 1 of 'atoi' differ
in signedness
klicdb.c:252: warning: pointer targets in passing argument 1 of
'enter_functor' differ in signedness
klicdb.c:254: warning: pointer targets in passing argument 1 of
'enter_predicate' differ in signedness
bb.c:231: warning: assignment makes pointer from integer without a cast
generic.c:243: warning: function definition has qualified void return type
generic.c:243: warning: function return types not compatible due to 'volatile'
generic.c:243: warning: function return types not compatible due to 'volatile'
generic.c:243: warning: function return types not compatible due to 'volatile'
ggoal.c:81: warning: pointer targets in passing argument 1 of 'strlen' differ
in signedness
ggoal.c:91: warning: pointer targets in passing argument 1 of 'strlen' differ
in signedness
ggoal.c:228: warning: passing argument 1 of 'find_pred_ent' discards
qualifiers from pointer target type
gunix.c:1813: warning: pointer targets in passing argument 3 of 'accept'
differ in signedness
gunix.c:1871: warning: pointer targets in passing argument 3 of 'getsockname'
differ in signedness
io.c:25: warning: pointer targets in passing argument 2 of
'__builtin_strncpy' differ in signedness
faisus.c:173: warning: passing argument 2 of 'do_fail' from incompatible
pointer type
debug.c:314:25: warning: trigraph ??/ ignored, use -trigraphs to enable
faisus-t.c:173: warning: passing argument 2 of 'do_fail' from incompatible
pointer type
recsusp.c:66: warning: passing argument 1 of 'hash_pred' discards qualifiers
from pointer target type
debug-t.c:314:25: warning: trigraph ??/ ignored, use -trigraphs to enable
trace.c:292: warning: passing argument 1 of 'enter_pred_hash' discards
qualifiers from pointer target type
/build/lamont/klic-3.003/runtime/gunix.c:2543: warning: the use of `mktemp'
is dangerous, better use `mkstemp'
lamont
diff -ur t/klic-3.003/debian/changelog klic-3.003/debian/changelog
--- t/klic-3.003/debian/changelog 2005-07-23 14:23:00.000000000 -0600
+++ klic-3.003/debian/changelog 2005-07-23 13:59:07.000000000 -0600
@@ -1,3 +1,9 @@
+klic (3.003-2ubuntu1) breezy; urgency=low
+
+ * fix compile errors. Closes: Debian #300860
+
+ -- LaMont Jones <[EMAIL PROTECTED]> Sat, 23 Jul 2005 13:58:54 -0600
+
klic (3.003-2) unstable; urgency=low
* Change maintainer address.
diff -ur t/klic-3.003/compiler/klic.c klic-3.003/compiler/klic.c
--- t/klic-3.003/compiler/klic.c 1999-03-25 00:33:16.000000000 -0700
+++ klic-3.003/compiler/klic.c 2005-07-23 14:04:38.000000000 -0600
@@ -18,6 +18,7 @@
#ifdef USELOCKF
#include <fcntl.h>
#endif
+#include <stdlib.h>
#define KL1_TO_C_COMPILER KLIC_COMPILER
diff -ur t/klic-3.003/compiler/klicdb.c klic-3.003/compiler/klicdb.c
--- t/klic-3.003/compiler/klicdb.c 1999-03-25 00:33:16.000000000 -0700
+++ klic-3.003/compiler/klicdb.c 2005-07-23 14:04:45.000000000 -0600
@@ -16,8 +16,7 @@
#ifdef USELOCKF
#include <fcntl.h>
#endif
-
-extern void *malloc();
+#include <stdlib.h>
char *dbdir = 0;
char *initdbdir = 0;
diff -ur t/klic-3.003/include/klic/options.h klic-3.003/include/klic/options.h
--- t/klic-3.003/include/klic/options.h 1999-03-25 00:33:22.000000000 -0700
+++ klic-3.003/include/klic/options.h 2005-07-23 13:58:51.000000000 -0600
@@ -20,8 +20,6 @@
ARG_NOT_USED
};
-extern Const struct opttable opttable[];
-
char *parse_opts();
/* not copied when spawned */
diff -ur t/klic-3.003/runtime/alloc.c klic-3.003/runtime/alloc.c
--- t/klic-3.003/runtime/alloc.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/alloc.c 2005-07-23 14:06:08.000000000 -0600
@@ -7,8 +7,7 @@
#include <klic/basic.h>
#include <klic/struct.h>
#include <klic/primitives.h>
-
-extern char *malloc(), *realloc();
+#include <stdlib.h>
char *malloc_check(size)
unsigned long size;
diff -ur t/klic-3.003/runtime/asyncio.c klic-3.003/runtime/asyncio.c
--- t/klic-3.003/runtime/asyncio.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/asyncio.c 2005-07-23 14:12:25.000000000 -0600
@@ -19,6 +19,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
/*
void sigio_handler(allocp, sig)
@@ -169,7 +170,6 @@
init_sigio_handler()
{
static sigio_initiated = 0;
- extern char *malloc();
int k;
if (sigio_initiated)
return;
@@ -246,7 +246,6 @@
#ifdef USESIG
static asyncio_initiated = 0;
if (!asyncio_initiated) {
- extern char *malloc();
int k;
init_sigio_handler();
diff -ur t/klic-3.003/runtime/debug.c klic-3.003/runtime/debug.c
--- t/klic-3.003/runtime/debug.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/debug.c 2005-07-23 14:15:48.000000000 -0600
@@ -4,6 +4,7 @@
% (C)1996, 1997, 1998, 1999 Japan Information Processing Development Center
% (Read COPYRIGHT-JIPDEC for detailed information.)
----------------------------------------------------------- */
+#include <stdlib.h>
#include <stdio.h>
#include <setjmp.h>
#include <ctype.h>
diff -ur t/klic-3.003/runtime/gc.c klic-3.003/runtime/gc.c
--- t/klic-3.003/runtime/gc.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/gc.c 2005-07-23 14:10:21.000000000 -0600
@@ -12,6 +12,7 @@
#include <klic/functorstuffs.h>
#include <klic/gobj.h>
#include <klic/susp.h>
+#include <stdlib.h>
#ifdef DIST
#include <klic/interpe.h>
@@ -32,7 +33,7 @@
#endif
-extern char *malloc(), *malloc_check(), *realloc_check();
+extern char *malloc_check(), *realloc_check();
extern struct goalrec goal_queue_tail;
static Inline void flip_spaces()
diff -ur t/klic-3.003/runtime/gmvv.c klic-3.003/runtime/gmvv.c
--- t/klic-3.003/runtime/gmvv.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/gmvv.c 2005-07-23 14:16:37.000000000 -0600
@@ -9,6 +9,7 @@
Vector Objects
*/
+#include <strings.h>
#include <stdio.h>
#include <klic/gdobject.h>
#include <klic/g_vector.h>
diff -ur t/klic-3.003/runtime/io.c klic-3.003/runtime/io.c
--- t/klic-3.003/runtime/io.c 1999-03-29 03:43:12.000000000 -0700
+++ klic-3.003/runtime/io.c 2005-07-23 14:09:47.000000000 -0600
@@ -3,6 +3,7 @@
#include "atom.h"
#include "funct.h"
+#include <string.h>
#include <stdio.h>
#include <klic/gobj.h>
#include <klic/g_pointer.h>
diff -ur t/klic-3.003/runtime/kmain.c klic-3.003/runtime/kmain.c
--- t/klic-3.003/runtime/kmain.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/kmain.c 2005-07-23 14:14:44.000000000 -0600
@@ -22,6 +22,7 @@
#ifdef USESIG
#include <signal.h>
#endif
+#include <stdlib.h>
#ifdef SHM
#include <klic/shm.h>
diff -ur t/klic-3.003/runtime/options.c klic-3.003/runtime/options.c
--- t/klic-3.003/runtime/options.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/options.c 2005-07-23 14:17:01.000000000 -0600
@@ -5,6 +5,7 @@
% (Read COPYRIGHT-JIPDEC for detailed information.)
----------------------------------------------------------- */
#include <string.h>
+#include <stdio.h>
#include <klic/basic.h>
#include <klic/options.h>
static char *
diff -ur t/klic-3.003/runtime/otbl.c klic-3.003/runtime/otbl.c
--- t/klic-3.003/runtime/otbl.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/otbl.c 2005-07-23 14:09:10.000000000 -0600
@@ -11,6 +11,7 @@
#include <klic/struct.h>
#include <klic/g_basic.h>
#include <klic/g_methtab.h>
+#include <stdlib.h>
#define generic_deallocate(obj) (obj)->method_table->deallocate(obj)
@@ -31,7 +32,6 @@
static Inline struct object_table *
allocOtblBulk() {
int i;
- extern char *calloc();
struct object_table *ptr =
(struct object_table *)calloc(sizeof(struct object_table), OTBLBLKSIZE);
struct object_table *top = ptr;
diff -ur t/klic-3.003/runtime/pipedio.c klic-3.003/runtime/pipedio.c
--- t/klic-3.003/runtime/pipedio.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/pipedio.c 2005-07-23 14:21:02.000000000 -0600
@@ -10,6 +10,7 @@
#include <sys/socket.h>
#include <stdio.h>
#include <errno.h>
+#include <stdlib.h>
#include <string.h>
#include <termios.h>
#include <unistd.h>
diff -ur t/klic-3.003/runtime/random.c klic-3.003/runtime/random.c
--- t/klic-3.003/runtime/random.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/random.c 2005-07-23 14:07:42.000000000 -0600
@@ -17,6 +17,7 @@
#include <klic/susp.h>
#include <stdio.h>
+#include <strings.h>
#define GG_CLASS_NAME() random__numbers
#define GG_OBJ_TYPE struct random_number_generator
diff -ur t/klic-3.003/runtime/recsusp.c klic-3.003/runtime/recsusp.c
--- t/klic-3.003/runtime/recsusp.c 1999-03-25 00:33:32.000000000 -0700
+++ klic-3.003/runtime/recsusp.c 2005-07-23 14:17:35.000000000 -0600
@@ -7,9 +7,9 @@
#include <klic/basic.h>
#include <klic/struct.h>
#include <stdio.h>
+#include <stdlib.h>
#define SUSPTABLESIZE 256
-extern char *calloc(), *malloc();
struct susp_count_ent {
Const struct predicate *pred;
diff -ur t/klic-3.003/runtime/sched.c klic-3.003/runtime/sched.c
--- t/klic-3.003/runtime/sched.c 1999-03-25 00:33:33.000000000 -0700
+++ klic-3.003/runtime/sched.c 2005-07-23 14:16:15.000000000 -0600
@@ -8,6 +8,7 @@
#include <klic/struct.h>
#include <klic/alloc.h>
+#include <stdlib.h>
#include <stdio.h>
#ifdef DEBUGLIB
#include <klic/trace.h>
@@ -41,7 +42,6 @@
struct prioqrec *more_prioqrec()
{
unsigned long k;
- extern char *calloc();
struct prioqrec *bulk =
(struct prioqrec *)
calloc(PRIOQRECBULK, sizeof(struct prioqrec));
diff -ur t/klic-3.003/runtime/trace.c klic-3.003/runtime/trace.c
--- t/klic-3.003/runtime/trace.c 1999-03-25 00:33:33.000000000 -0700
+++ klic-3.003/runtime/trace.c 2005-07-23 14:01:56.000000000 -0600
@@ -19,6 +19,7 @@
#endif
#include <stdio.h>
#include <setjmp.h>
+#include <stdlib.h>
#include <klic/trace.h>
#include <klic/traceio.h>
@@ -33,8 +34,6 @@
extern char *realloc_check();
extern char *malloc_check();
-extern char *calloc();
-extern void free();
static struct trace_info_rec *trace_info_recs;
static long num_info_recs, info_rec_size;
@@ -526,7 +525,6 @@
declare_globals;
struct goalrec *qt, *before = qp_before;
unsigned int subgoals, k;
- struct goalrec **bsearch();
struct enqueue_trace_rec *tr;
struct trace_info_rec *info;