You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Hyde <bh...@gensym.com> on 1997/11/13 16:08:09 UTC
porting == fear
Since enabling 40 plus random unused prototypes with slight
testing frightens me, this backs up and does something more
delicate. - ben
---
Back away from enabling all of SUNOS_LIB_PROTOTYPES, instead
prototype only the things we require in util.c.
> cvs diff -u
cvs server: Diffing .
Index: conf.h
===================================================================
RCS file: /cvs/apachen/src/main/conf.h,v
retrieving revision 1.158
diff -u -r1.158 conf.h
--- conf.h 1997/11/12 23:26:14 1.158
+++ conf.h 1997/11/13 15:03:43
@@ -117,7 +117,6 @@
#define USE_FLOCK_SERIALIZED_ACCEPT
#define NEED_DIFFTIME
#define HAVE_SYSLOG
-#define SUNOS_LIB_PROTOTYPES
#elif defined(SOLARIS2)
#undef HAVE_GMTOFF
@@ -919,7 +918,8 @@
/* Prototypes needed to get a clean compile with gcc -Wall.
* Believe it or not, these do have to be declared, at least on SunOS,
* because they aren't mentioned in the relevant system headers.
- * Sun Quality Software. Gotta love it.
+ * Sun Quality Software. Gotta love it. This section is not
+ * currently (13Nov97) used.
*/
int getopt(int, char **, char *);
Index: util.c
===================================================================
RCS file: /cvs/apachen/src/main/util.c,v
retrieving revision 1.76
diff -u -r1.76 util.c
--- util.c 1997/11/11 19:52:19 1.76
+++ util.c 1997/11/13 15:03:48
@@ -67,7 +67,15 @@
#include "httpd.h"
#include "http_conf_globals.h" /* for user_id & group_id */
#include "http_log.h"
+#if defined(SUNOS4)
#include <stdio.h>
+extern int fgetc(FILE *);
+extern char *fgets(char *s, int, FILE*);
+extern int fclose(FILE *);
+#else
+#include <stdio.h>
+#endif
+
const char month_snames[12][4] =
{
Re: porting == fear
Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Thu, Nov 13, 1997 at 10:08:09AM -0400, Ben Hyde wrote:
> Back away from enabling all of SUNOS_LIB_PROTOTYPES, instead
> prototype only the things we require in util.c.
> +#if defined(SUNOS4)
> #include <stdio.h>
> +extern int fgetc(FILE *);
> +extern char *fgets(char *s, int, FILE*);
> +extern int fclose(FILE *);
> +#else
> +#include <stdio.h>
> +#endif
How about
> #include <stdio.h>
> +#if defined(SUNOS4)
> +extern int fgetc(FILE *);
> +extern char *fgets(char *s, int, FILE*);
> +extern int fclose(FILE *);
> +#define strtoul strtol
> +#endif
? The <stdio.h> is always included, and you might want the
strtoul() redefine.
+1 on concept, anyway.
Martin
--
| S I E M E N S | <Ma...@mch.sni.de> | Siemens Nixdorf
| ------------- | Voice: +49-89-636-46021 | Informationssysteme AG
| N I X D O R F | FAX: +49-89-636-44994 | 81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request