Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src
On Sat, 27 Sep 2008, Tom Spindler wrote:
> > Build strfile both as a host tool and as an installed program:
>
> If you're going to do this, please include the NBTOOL_H stuff;
> otherwise, I get fun compile errors:
Does this fix it?
--apb (Alan Barrett)
--- strfile.c 26 Sep 2008 13:46:48 -0000 1.27
+++ strfile.c 27 Sep 2008 15:45:22 -0000
@@ -32,8 +32,15 @@
* SUCH DAMAGE.
*/
-#ifdef __NetBSD__
+
+/* n.b.: this file is used at build-time - i.e. during build.sh. */
+
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
#include <sys/cdefs.h>
+
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1989, 1993\
The Regents of the University of California. All rights reserved.");
@@ -46,15 +53,13 @@
__RCSID("$NetBSD: strfile.c,v 1.27 2008/09/26 13:46:48 apb Exp $");
#endif
#endif /* not lint */
-#endif /* __NetBSD__ */
-
-/* n.b.: this file is used at build-time - i.e. during build.sh. */
# include <sys/types.h>
# include <sys/param.h>
# include <ctype.h>
# include <stdio.h>
# include <stdlib.h>
+# include <stdint.h>
# include <string.h>
# include <time.h>
# include <unistd.h>
@@ -153,26 +158,16 @@
STR *Firstch; /* first chars of each string */
-#ifdef __GNUC__
-#define NORETURN __dead
-#else
-#define NORETURN
-#endif
-
-#ifndef __dead /* not NetBSD, presumably */
-#define __dead ;
-#endif
-
void add_offset(FILE *, off_t);
int cmp_str(const void *, const void *);
-void die(const char *) NORETURN;
-void dieperror(const char *, char *) NORETURN;
+void die(const char *) __dead;
+void dieperror(const char *, char *) __dead;
void do_order(void);
void fwrite_be_offt(off_t, FILE *);
void getargs(int, char *[]);
int main(int, char *[]);
void randomize(void);
-void usage(void) NORETURN;
+void usage(void) __dead;
/*
Home |
Main Index |
Thread Index |
Old Index