From dfa5b392f7d5ec41f77e2a0477fb1f12aae00d2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Thu, 5 Dec 1996 19:47:51 -0800 Subject: [PATCH] some warnings on HP-UX removed Rev: src/error.h:1.5 Rev: src/hashtable.h:1.2 Rev: src/interpret.h:1.6 Rev: src/lex.h:1.2 Rev: src/port.h:1.8 Rev: src/program.h:1.5 Rev: src/svalue.h:1.4 Rev: src/time_stuff.h:1.2 --- src/error.h | 3 +++ src/hashtable.h | 6 ++++++ src/interpret.h | 3 +++ src/lex.h | 11 +++++++++++ src/port.h | 3 +++ src/program.h | 11 +++++++++++ src/svalue.h | 30 ++++++++++++++++++++++++++++++ src/time_stuff.h | 3 +++ 8 files changed, 70 insertions(+) diff --git a/src/error.h b/src/error.h index 4f137b6e91..ca8837024a 100644 --- a/src/error.h +++ b/src/error.h @@ -20,7 +20,10 @@ typedef void (*error_call)(void *); +#ifndef STRUCT_FRAME_DECLARED +#define STRUCT_FRAME_DECLARED struct frame; +#endif typedef struct ONERROR { diff --git a/src/hashtable.h b/src/hashtable.h index d8d0a70436..c5271c188e 100644 --- a/src/hashtable.h +++ b/src/hashtable.h @@ -11,12 +11,18 @@ #define AVERAGE_HASH_LENGTH 16 #define NEW_HASHTABLE_SIZE 4 +#ifndef STRUCT_HASH_ENTRY_DECLARED +#define STRUCT_HASH_ENTRY_DECLARED +#endif struct hash_entry { struct hash_entry *next; struct pike_string *s; }; +#ifndef STRUCT_HASH_TABLE_DECLARED +#define STRUCT_HASH_TABLE_DECLARED +#endif struct hash_table { INT32 mask; diff --git a/src/interpret.h b/src/interpret.h index 618d7b3de7..3ae4216792 100644 --- a/src/interpret.h +++ b/src/interpret.h @@ -9,6 +9,9 @@ #include "program.h" #include "config.h" +#ifndef STRUCT_FRAME_DECLARED +#define STRUCT_FRAME_DECLARED +#endif struct frame { unsigned char *pc; diff --git a/src/lex.h b/src/lex.h index 41d4ba9f72..f5ce12941d 100644 --- a/src/lex.h +++ b/src/lex.h @@ -31,9 +31,20 @@ struct instr #define ADD_RUNNED(X) #endif +#ifndef STRUCT_HASH_ENTRY_DECLARED +#define STRUCT_HASH_ENTRY_DECLARED struct hash_entry; +#endif + +#ifndef STRUCT_INPUTSTATE_DECLARED +#define STRUCT_INPUTSTATE_DECLARED struct inputstate; +#endif + +#ifndef STRUCT_HASH_TABLE_DECLARED +#define STRUCT_HASH_TABLE_DECLARED struct hash_table; +#endif extern struct instr instrs[]; extern struct hash_table *defines; diff --git a/src/port.h b/src/port.h index 115792a985..207f664478 100644 --- a/src/port.h +++ b/src/port.h @@ -8,7 +8,10 @@ #include "types.h" +#ifndef STRUCT_TIMEVAL_DECLARED +#define STRUCT_TIMEVAL_DECLARED struct timeval; +#endif #ifdef HAVE_ISSPACE #define ISSPACE(X) isspace(X) #else diff --git a/src/program.h b/src/program.h index 5849c82c5a..590861e5a8 100644 --- a/src/program.h +++ b/src/program.h @@ -38,9 +38,20 @@ extern char *lfun_names[]; +#ifndef STRUCT_SVALUE_DECLARED +#define STRUCT_SVALUE_DECLARED struct svalue; +#endif + +#ifndef STRUCT_MODULE_DECLARED +#define STRUCT_MODULE_DECLARED struct module; +#endif + +#ifndef STRUCT_OBJECT_DECLARED +#define STRUCT_OBJECT_DECLARED struct object; +#endif /* I need: * a) one type that can point to a callable function. diff --git a/src/svalue.h b/src/svalue.h index cbbbac02cb..3fe7aec8e2 100644 --- a/src/svalue.h +++ b/src/svalue.h @@ -8,13 +8,40 @@ #include "types.h" +#ifndef STRUCT_ARRAY_DECLARED +#define STRUCT_ARRAY_DECLARED struct array; +#endif + +#ifndef STRUCT_MAPPING_DECLARED +#define STRUCT_MAPPING_DECLARED struct mapping; +#endif + +#ifndef STRUCT_MULTISET_DECLARED +#define STRUCT_MULTISET_DECLARED struct multiset; +#endif + +#ifndef STRUCT_OBJECT_DECLARED +#define STRUCT_OBJECT_DECLARED struct object; +#endif + +#ifndef STRUCT_PROGRAM_DECLARED +#define STRUCT_PROGRAM_DECLARED struct program; +#endif + +#ifndef STRUCT_PIKE_STRING_DECLARED +#define STRUCT_PIKE_STRING_DECLARED struct pike_string; +#endif + +#ifndef STRUCT_CALLABLE_DECLARED +#define STRUCT_CALLABLE_DECLARED struct callable; +#endif struct processing { @@ -38,6 +65,9 @@ union anything union anything *short_lval; /* only used on stack */ }; +#ifndef STRUCT_SVALUE_DECLARED +#define STRUCT_SVALUE_DECLARED +#endif struct svalue { unsigned INT16 type; diff --git a/src/time_stuff.h b/src/time_stuff.h index 907aa613e3..f268a4154a 100644 --- a/src/time_stuff.h +++ b/src/time_stuff.h @@ -53,6 +53,9 @@ } while(0) #ifndef HAVE_STRUCT_TIMEVAL +#ifndef STRUCT_TIMEVAL_DECLARED +#define STRUCT_TIMEVAL_DECLARED +#endif struct timeval { long tv_sec; -- GitLab