static char sccsid[] = "@(#)alias.c 8.3 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/alias.c,v 1.18 2004/04/06 20:06:51 markm Exp $");
*/
static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/eval.c,v 1.42 2004/04/06 20:06:51 markm Exp $");
*/
static char sccsid[] = "@(#)exec.c 8.4 (Berkeley) 6/8/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/exec.c,v 1.24.2.1 2004/09/30 04:41:55 des Exp $");
*/
static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/expand.c,v 1.46 2004/04/06 20:06:51 markm Exp $");
*/
static char sccsid[] = "@(#)input.c 8.3 (Berkeley) 6/9/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/input.c,v 1.22 2004/04/06 20:06:51 markm Exp $");
*/
static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/jobs.c,v 1.67 2004/04/06 20:06:51 markm Exp $");
*/
static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/miscbltin.c,v 1.30 2004/04/06 20:06:51 markm Exp $");
*/
static char sccsid[] = "@(#)mkinit.c 8.2 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/mkinit.c,v 1.17 2004/04/06 20:06:51 markm Exp $");
*/
#include <unistd.h>
#include <errno.h>
-#ifdef __minix
-#define __unused
-#endif
-
/*
* OUTFILE is the name of the output file. Output is initially written
* to the file OUTTEMP, which is then moved to OUTFILE.
static char sccsid[] = "@(#)mksyntax.c 8.2 (Berkeley) 5/4/95";
#endif /* not lint */
#endif
+#include <sys/cdefs.h>
/*
__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.23 2004/04/06 20:06:51 markm Exp $");
*/
#include <string.h>
#include "parser.h"
-#ifdef __minix
-#define __unused
-#endif
-
struct synclass {
char *name;
char *comment;
static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/parser.c,v 1.51.2.1 2005/03/03 03:43:20 obrien Exp $");
*/
#endif
#ifdef __minix
-#define __unused
-
typedef long quad_t; /* XXX */
typedef unsigned long u_quad_t; /* XXX */
#endif
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
-/*
#include <sys/cdefs.h>
+/*
__FBSDID("$FreeBSD: src/bin/sh/var.c,v 1.26.2.1 2004/09/30 04:41:55 des Exp $");
*/
* SUCH DAMAGE.
*/
-#if 0
#include <sys/cdefs.h>
+#if 0
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1988, 1993\
The Regents of the University of California. All rights reserved.");
#define _ERR_H_
#ifdef __minix
-#define __BEGIN_DECLS
-#define __dead
-#define __END_DECLS
-#define __attribute__(x)
#define _BSD_VA_LIST_ va_list
#include <stdarg.h>
#else
* _BSD_VA_LIST_ from <machine/ansi.h> and use it.
*/
#include <machine/ansi.h>
-#include <sys/cdefs.h>
#endif
+#include <sys/cdefs.h>
__BEGIN_DECLS
__dead void err(int, const char *, ...)
#ifndef _GETOPT_H_
#define _GETOPT_H_
-#ifdef __minix
-#define __BEGIN_DECLS
-#define __END_DECLS
-#else
#include <sys/cdefs.h>
-#endif
#include <unistd.h>
/*
#ifndef _STDINT_H
#define _STDINT_H
+#include <sys/cdefs.h>
#ifndef _MINIX__TYPES_H
#include <minix/types.h>
#endif
#endif /* !__cplusplus || __STDC_LIMIT_MACROS */
-#ifndef __CONCAT
-#define __CONCAT(x,y) x ## y
-#endif
-
/* Constants of the proper type. */
#define INT8_C(c) c
#define INT16_C(c) c
#define __predict_false(exp) (exp)
#endif
+/*
+ * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
+ * require it.
+ */
+#if __GNUC_PREREQ__(4, 1)
+#define __offsetof(type, field) __builtin_offsetof(type, field)
+#else
+#ifndef __cplusplus
+#define __offsetof(type, field) ((size_t)(&((type *)0)->field))
+#else
+#define __offsetof(type, field) \
+ (__offsetof__ (reinterpret_cast <size_t> \
+ (&reinterpret_cast <const volatile char &> \
+ (static_cast<type *> (0)->field))))
+#endif
+#endif
+#define __rangeof(type, start, end) \
+ (__offsetof(type, end) - __offsetof(type, start))
+
/*
* Compiler-dependent macros to declare that functions take printf-like
* or scanf-like arguments. They are null except for versions of gcc
#ifndef _SYS_QUEUE_H_
#define _SYS_QUEUE_H_
-/* Minix doesn't have this file.
#include <sys/cdefs.h>
-*/
-
-/* Minix does needs this declaration from sys/cdefs.h though. */
-#define __offsetof(type, field) ((size_t)(&((type *)0)->field))
/*
* This file defines four types of data structures: singly-linked lists,
*/
#ifdef __minix
-#define __P(x) x
#define _DIAGASSERT assert
-#define __UNCONST(x) ((void *) (x))
#else
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"