Index: trunk/src/emx/include/386/setjmp.h
===================================================================
--- trunk/src/emx/include/386/setjmp.h	(revision 1505)
+++ trunk/src/emx/include/386/setjmp.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* $Id$ */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: adjusted for LIBC runtime.
+ */
+
 /*-
  * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>.
@@ -33,9 +39,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- * @changed bird: adjusted for LIBC runtime.
- */
-
 #ifndef _MACHINE_SETJMP_H_
 #define	_MACHINE_SETJMP_H_
Index: trunk/src/emx/include/386/stdarg.h
===================================================================
--- trunk/src/emx/include/386/stdarg.h	(revision 1505)
+++ trunk/src/emx/include/386/stdarg.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* $Id$ */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: EMXisms.
+ */
 /*-
  * Copyright (c) 2002 David E. O'Brien.  All rights reserved.
@@ -34,9 +39,4 @@
  *	@(#)stdarg.h	8.1 (Berkeley) 6/10/93
  * $FreeBSD: src/sys/i386/include/stdarg.h,v 1.18 2002/11/27 16:28:18 obrien Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changed bird: EMXisms.
  */
 
Index: trunk/src/emx/include/a_out.h
===================================================================
--- trunk/src/emx/include/a_out.h	(revision 1505)
+++ trunk/src/emx/include/a_out.h	(revision 1506)
@@ -1,3 +1,7 @@
-/* a_out.h -- changed for emx by Eberhard Mattes -- Sep 1998 */
+/* a_out.h,v 1.5 2004/09/14 22:27:31 bird Exp */
+/** @file
+ * GNU
+ * @changed For emx by Eberhard Mattes -- Sep 1998
+ */
 
 #ifndef __A_OUT_GNU_H__
Index: trunk/src/emx/include/a_out_stab.h
===================================================================
--- trunk/src/emx/include/a_out_stab.h	(revision 1505)
+++ trunk/src/emx/include/a_out_stab.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* a_out_stab.h,v 1.2 2004/09/14 22:27:31 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* Table of DBX symbol codes for the GNU system.
    Copyright 1988, 1991, 1992, 1993, 1994, 1996, 1998
Index: trunk/src/emx/include/alloca.h
===================================================================
--- trunk/src/emx/include/alloca.h	(revision 1505)
+++ trunk/src/emx/include/alloca.h	(revision 1506)
@@ -1,6 +1,18 @@
-/* alloca.h (emx+gcc) */
+/* alloca.h,v 1.2 2004/09/14 22:27:31 bird Exp */
+/** @file
+ * EMX
+ */
 
 #ifndef _ALLOCA_H
 #define _ALLOCA_H
+
+#include <sys/cdefs.h>
+#include <stddef.h>
+
+#undef alloca
+
+__BEGIN_DECLS
+void *alloca(size_t);
+__END_DECLS
 
 #if !defined (alloca)
Index: trunk/src/emx/include/ansidecl.h
===================================================================
--- trunk/src/emx/include/ansidecl.h	(revision 1505)
+++ trunk/src/emx/include/ansidecl.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* ansidecl.h,v 1.2 2004/09/14 22:27:31 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* ANSI and traditional C compatability macros
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -158,5 +163,5 @@
 #define VA_CLOSE(AP)		} va_end(AP); }
 #define VA_FIXEDARG(AP, T, N)	struct Qdmy
- 
+
 #undef const
 #undef volatile
Index: trunk/src/emx/include/ar.h
===================================================================
--- trunk/src/emx/include/ar.h	(revision 1505)
+++ trunk/src/emx/include/ar.h	(revision 1506)
@@ -1,21 +1,72 @@
-/* ar.h (emx+gcc) */
+/* ar.h,v 1.2 2004/09/14 22:27:31 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ */
 
-#ifndef _AR_H
-#define _AR_H
+/*-
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Hugh Smith at The University of Guelph.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)ar.h	8.2 (Berkeley) 1/21/94
+ */
 
-#define ARMAG  "!<arch>\n"
-#define SARMAG 8
-#define ARFMAG "`\n"
+#ifndef _AR_H_
+#define	_AR_H_
 
-struct ar_hdr
-{
-  char ar_name[16];
-  char ar_date[12];
-  char ar_uid[6];
-  char ar_gid[6];
-  char ar_mode[8];
-  char ar_size[10];
-  char ar_fmag[2];
+/* Pre-4BSD archives had these magic numbers in them. */
+#define	OARMAG1	0177555
+#define	OARMAG2	0177545
+
+#define	ARMAG		"!<arch>\n"	/* ar "magic number" */
+#define	SARMAG		8		/* strlen(ARMAG); */
+
+#define	AR_EFMT1	"#1/"		/* extended format #1 */
+
+struct ar_hdr {
+	char ar_name[16];		/* name */
+	char ar_date[12];		/* modification time */
+	char ar_uid[6];			/* user id */
+	char ar_gid[6];			/* group id */
+	char ar_mode[8];		/* octal file permissions */
+	char ar_size[10];		/* size in bytes */
+#define	ARFMAG	"`\n"
+	char ar_fmag[2];		/* consistency check */
 };
 
-#endif /* not _AR_H */
+#endif /* !_AR_H_ */
Index: trunk/src/emx/include/argz.h
===================================================================
--- trunk/src/emx/include/argz.h	(revision 1505)
+++ trunk/src/emx/include/argz.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* argz.h,v 1.3 2004/09/14 22:27:31 bird Exp */
+/** @file
+ * GLIBC v2.3.2
+ */
+
 /* Routines for dealing with '\0' separated arg vectors.
    Copyright (C) 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
@@ -18,7 +23,4 @@
    02111-1307 USA.  */
 
-/** @file
- * GLIBC v2.3.2
- */
 
 #ifndef _ARGZ_H
Index: trunk/src/emx/include/assert.h
===================================================================
--- trunk/src/emx/include/assert.h	(revision 1505)
+++ trunk/src/emx/include/assert.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* assert.h (emx+gcc) */
+/* assert.h,v 1.2 2004/09/14 22:27:31 bird Exp */
+/** @file
+ * EMX
+ */
 
 #if defined (__cplusplus)
Index: trunk/src/emx/include/conio.h
===================================================================
--- trunk/src/emx/include/conio.h	(revision 1505)
+++ trunk/src/emx/include/conio.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* conio.h (emx+gcc) */
+/* conio.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * EMX
+ */
 
 #ifndef _CONIO_H
Index: trunk/src/emx/include/curses.h
===================================================================
--- trunk/src/emx/include/curses.h	(revision 1505)
+++ trunk/src/emx/include/curses.h	(revision 1506)
@@ -1,1 +1,7 @@
+/* curses.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * BSD
+ * @see bsd/curses.h
+ */
+
 #include <bsd/curses.h>
Index: trunk/src/emx/include/db.h
===================================================================
--- trunk/src/emx/include/db.h	(revision 1505)
+++ trunk/src/emx/include/db.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* db.h,v 1.5 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -35,8 +40,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- */
-
 #ifndef _DB_H_
 #define	_DB_H_
Index: trunk/src/emx/include/demangle.h
===================================================================
--- trunk/src/emx/include/demangle.h	(revision 1505)
+++ trunk/src/emx/include/demangle.h	(revision 1506)
@@ -1,6 +1,11 @@
+/* demangle.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* Defs for interface to demanglers.
    Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
    Free Software Foundation, Inc.
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -120,8 +125,8 @@
 set_cplus_marker_for_demangling PARAMS ((int ch));
 
-extern enum demangling_styles 
+extern enum demangling_styles
 cplus_demangle_set_style PARAMS ((enum demangling_styles style));
 
-extern enum demangling_styles 
+extern enum demangling_styles
 cplus_demangle_name_to_style PARAMS ((const char *name));
 
Index: trunk/src/emx/include/dirent.h
===================================================================
--- trunk/src/emx/include/dirent.h	(revision 1505)
+++ trunk/src/emx/include/dirent.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* dirent.h,v 1.4 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changes bird: Merged in EMX stuff and internal LIBC stuff.
+ */
+
 /*-
  * Copyright (c) 1989, 1993
@@ -33,9 +39,4 @@
  *	@(#)dirent.h	8.2 (Berkeley) 7/28/94
  * $FreeBSD: src/include/dirent.h,v 1.13 2002/09/10 18:12:16 mike Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changes bird: Merged in EMX stuff and internal LIBC stuff.
  */
 
Index: trunk/src/emx/include/dos.h
===================================================================
--- trunk/src/emx/include/dos.h	(revision 1505)
+++ 	(revision )
@@ -1,69 +1,0 @@
-/* dos.h (emx+gcc) */
-
-#ifndef _DOS_H
-#define _DOS_H
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-#if !defined (_REGS)
-#define _REGS
-
-struct _dwordregs
-{
-  unsigned int eax;
-  unsigned int ebx;
-  unsigned int ecx;
-  unsigned int edx;
-  unsigned int esi;
-  unsigned int edi;
-  unsigned int eflags;
-};
-
-struct _wordregs
-{
-  unsigned short ax, h_ax;
-  unsigned short bx, h_bx;
-  unsigned short cx, h_cx;
-  unsigned short dx, h_dx;
-  unsigned short si, h_si;
-  unsigned short di, h_di;
-  unsigned short flags, h_flags;
-};
-
-struct _byteregs
-{
-  unsigned char al, ah, h_al, h_ah;
-  unsigned char bl, bh, h_bl, h_bh;
-  unsigned char cl, ch, h_cl, h_ch;
-  unsigned char dl, dh, h_dl, h_dh;
-};
-
-union REGS
-{
-  struct _dwordregs e;
-  struct _wordregs  x;
-  struct _byteregs  h;
-};
-
-struct SREGS
-{
-  unsigned int cs;
-  unsigned int ds;
-  unsigned int es;
-  unsigned int fs;
-  unsigned int gs;
-  unsigned int ss;
-};
-
-#endif
-
-int _int86 (int, __const__ union REGS *, union REGS *);
-void _segread (struct SREGS *);
-
-#if defined (__cplusplus)
-}
-#endif
-
-#endif /* not _DOS_H */
Index: trunk/src/emx/include/dyn-string.h
===================================================================
--- trunk/src/emx/include/dyn-string.h	(revision 1505)
+++ trunk/src/emx/include/dyn-string.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* dyn-string.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* An abstract string datatype.
    Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
@@ -4,5 +9,5 @@
 
 This file is part of GCC.
-   
+
 GCC is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -88,5 +93,5 @@
 extern int dyn_string_append_cstr       PARAMS ((dyn_string_t, const char *));
 extern int dyn_string_append_char       PARAMS ((dyn_string_t, int));
-extern int dyn_string_substring         PARAMS ((dyn_string_t, 
+extern int dyn_string_substring         PARAMS ((dyn_string_t,
 						 dyn_string_t, int, int));
 extern int dyn_string_eq                PARAMS ((dyn_string_t, dyn_string_t));
Index: trunk/src/emx/include/err.h
===================================================================
--- trunk/src/emx/include/err.h	(revision 1505)
+++ trunk/src/emx/include/err.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* err.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*-
  * Copyright (c) 1993
@@ -35,8 +40,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- */
-
 #ifndef _ERR_H_
 #define	_ERR_H_
Index: trunk/src/emx/include/errno.h
===================================================================
--- trunk/src/emx/include/errno.h	(revision 1505)
+++ trunk/src/emx/include/errno.h	(revision 1506)
@@ -1,3 +1,7 @@
-/* errno.h (emx+gcc) */
+/* errno.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @see sys/errno.h
+ */
 
 #ifndef _ERRNO_H
Index: trunk/src/emx/include/error.h
===================================================================
--- trunk/src/emx/include/error.h	(revision 1505)
+++ trunk/src/emx/include/error.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* error.h,v 1.3 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * GLIBC v2.3.2
+ */
+
 /* Declaration for error-reporting function
    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
@@ -18,8 +23,4 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
-
-/** @file
- * GLIBC v2.3.2
- */
 
 #ifndef _ERROR_H
Index: trunk/src/emx/include/fcntl.h
===================================================================
--- trunk/src/emx/include/fcntl.h	(revision 1505)
+++ trunk/src/emx/include/fcntl.h	(revision 1506)
@@ -1,3 +1,8 @@
-/* fcntl.h (emx+gcc) */
+/* fcntl.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * EMX
+ * @see sys/fcntl.h
+ */
+
 
 #ifndef _FCNTL_H
Index: trunk/src/emx/include/features.h
===================================================================
--- trunk/src/emx/include/features.h	(revision 1505)
+++ trunk/src/emx/include/features.h	(revision 1506)
@@ -1,20 +1,3 @@
-/* Copyright (C) 1991-1993,1995-2000,2001,2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
+/* features.h,v 1.8 2004/09/14 22:27:32 bird Exp */
 /** @file
  * GLIBC v2.3.2
@@ -29,4 +12,22 @@
  *                from bitching.
  */
+
+/* Copyright (C) 1991-1993,1995-2000,2001,2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
 
 #ifndef	_FEATURES_H
Index: trunk/src/emx/include/fibheap.h
===================================================================
--- trunk/src/emx/include/fibheap.h	(revision 1505)
+++ trunk/src/emx/include/fibheap.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* fibheap.h,v 1.2 2004/09/14 22:27:32 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* A Fibonacci heap datatype.
    Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
@@ -4,5 +9,5 @@
 
 This file is part of GCC.
-   
+
 GCC is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by
@@ -34,6 +39,6 @@
 
    ExtractMin: O(lg n) amortized. O(n) worst case.
-   DecreaseKey: O(1) amortized.  O(lg n) worst case. 
-   Insert: O(2) amortized. O(1) actual.  
+   DecreaseKey: O(1) amortized.  O(lg n) worst case.
+   Insert: O(2) amortized. O(1) actual.
    Union: O(1) amortized. O(1) actual.  */
 
Index: trunk/src/emx/include/fix-args.h
===================================================================
--- trunk/src/emx/include/fix-args.h	(revision 1505)
+++ 	(revision )
@@ -1,38 +1,0 @@
-/*----------------------------------------------------------------------*
- * Bounds Checking for GCC.						*
- * Copyright (C) 1995 Richard W.M. Jones <rwmj@doc.ic.ac.uk>.		*
- *----------------------------------------------------------------------*
- * This program is free software; you can redistribute it and/or modify	*
- * it under the terms of the GNU General Public License as published by	*
- * the Free Software Foundation; either version 2 of the License, or	*
- * (at your option) any later version.					*
- *									*
- * This program is distributed in the hope that it will be useful,	*
- * but WITHOUT ANY WARRANTY; without even the implied warranty of	*
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the	*
- * GNU General Public License for more details.				*
- *									*
- * You should have received a copy of the GNU General Public License	*
- * along with this program; if not, write to the Free Software		*
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.		*
- *----------------------------------------------------------------------*
- * Modified for emx by Eberhard Mattes, Jun 1998			*
- *----------------------------------------------------------------------*/
-
-#ifndef _FIX_ARGS_H_
-#define _FIX_ARGS_H_
-
-#ifdef __BOUNDS_CHECKING_ON
-
-extern int __bounds_debug_no_checking;
-
-#define va_arg(AP,TYPE) \
-  ({int __t = __bounds_debug_no_checking; \
-  TYPE __r; \
-  __bounds_debug_no_checking = 1; \
-  __r = __std_va_arg(AP,TYPE); \
-  __bounds_debug_no_checking = __t; \
-  __r;})
-
-#endif /* __BOUNDS_CHECKING_ON */
-#endif /* _FIX_ARGS_H_ */
Index: trunk/src/emx/include/float.h
===================================================================
--- trunk/src/emx/include/float.h	(revision 1505)
+++ trunk/src/emx/include/float.h	(revision 1506)
@@ -1,4 +1,7 @@
-/* float.h (emx+gcc)
- * (bird: this file must be used over the one from GCC!)
+/* float.h,v 1.5 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * EMX + GCC
+ *
+ * @remark Must be used instead of the GCC one.
  */
 
@@ -6,7 +9,6 @@
 #define _FLOAT_H
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
+#include <sys/cdefs.h>
+
 
 #define FLT_RADIX	2		/* b */
@@ -117,16 +119,13 @@
 #define SW_STACKOVERFLOW        0x0200
 
+__BEGIN_DECLS
 unsigned _clear87 (void);
 unsigned _control87 (unsigned, unsigned);
 void _fpreset (void);
 unsigned _status87 (void);
+__END_DECLS
 
 #endif /* !defined (_OMIT_387_STUFF) */
 #endif
 
-
-#if defined (__cplusplus)
-}
-#endif
-
 #endif /* not _FLOAT_H */
Index: trunk/src/emx/include/floatformat.h
===================================================================
--- trunk/src/emx/include/floatformat.h	(revision 1505)
+++ trunk/src/emx/include/floatformat.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* floatformat.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* IEEE floating point support declarations, for GDB, the GNU Debugger.
    Copyright 1991, 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
Index: trunk/src/emx/include/fnmatch.h
===================================================================
--- trunk/src/emx/include/fnmatch.h	(revision 1505)
+++ trunk/src/emx/include/fnmatch.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* fnmatch.h,v 1.3 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * GNU, -liberty.
+ * @todo    Update the fnmatch code in LIBC to match this file.
+ */
+
 /* Copyright 1991, 1992, 1993, 1996 Free Software Foundation, Inc.
 
Index: trunk/src/emx/include/ftw.h
===================================================================
--- trunk/src/emx/include/ftw.h	(revision 1505)
+++ trunk/src/emx/include/ftw.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* ftw.h (emx+gcc) */
+/* $Id: */
+/** @file
+ * EMX
+ */
 
 #ifndef _FTW_H
Index: trunk/src/emx/include/getopt.h
===================================================================
--- trunk/src/emx/include/getopt.h	(revision 1505)
+++ trunk/src/emx/include/getopt.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* getopt.h,v 1.6 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: Added two GNU apis for libiberty.
+ */
+
 /*	$NetBSD: getopt.h,v 1.4 2000/07/07 10:43:54 ad Exp $	*/
 /*	$FreeBSD: src/include/getopt.h,v 1.1 2002/09/29 04:14:30 eric Exp $ */
@@ -38,8 +44,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- * @changed bird: Added two GNU apis for libiberty.
- */
 
 #ifndef _GETOPT_H_
Index: trunk/src/emx/include/glob.h
===================================================================
--- trunk/src/emx/include/glob.h	(revision 1505)
+++ trunk/src/emx/include/glob.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* glob.h,v 1.3 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*
  * Copyright (c) 1989, 1993
@@ -36,8 +41,4 @@
  *	@(#)glob.h	8.1 (Berkeley) 6/2/93
  * $FreeBSD: src/include/glob.h,v 1.7 2002/07/17 04:58:09 mikeh Exp $
- */
-
-/** @file
- * FreeBSD 5.1
  */
 
Index: trunk/src/emx/include/gmon.h
===================================================================
--- trunk/src/emx/include/gmon.h	(revision 1505)
+++ trunk/src/emx/include/gmon.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* gmon.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * BSD
+ */
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -70,5 +74,5 @@
      *		calls	$0,(r0)
      *
-     *	which is separated by only three bytes, thus HASHFRACTION is 
+     *	which is separated by only three bytes, thus HASHFRACTION is
      *	calculated as:
      *
Index: trunk/src/emx/include/gnu/termcap.h
===================================================================
--- trunk/src/emx/include/gnu/termcap.h	(revision 1505)
+++ trunk/src/emx/include/gnu/termcap.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* $Id: $ */
+/** @file
+ * GNU.
+ */
 /* Declarations for termcap library.
    Copyright (C) 1991, 1992 Free Software Foundation, Inc.
Index: trunk/src/emx/include/graph.h
===================================================================
--- trunk/src/emx/include/graph.h	(revision 1505)
+++ 	(revision )
@@ -1,81 +1,0 @@
-/* graph.h (emx+gcc) */
-
-#ifndef _GRAPH_H
-#define _GRAPH_H
-
-#if defined (__cplusplus)
-extern "C" {
-#endif
-
-/* g_mode() and g_modeset() arguments (MODE) */
-
-#define G_MODE_OFF         0    /* Back to previous mode                    */
-
-#define G_MODE_EGA_C      16    /* EGA 640x200 16 colors                    */
-#define G_MODE_EGA_E      17    /* EGA 640x350 16/64 colors                 */
-
-#define G_MODE_VGA_H      24    /* VGA 640x480 16 colors                    */
-#define G_MODE_VGA_L      26    /* VGA 320x200 256 colors                   */
-
-#define G_SET_KEEP         0     /* No change                               */
-
-/* g_wmode() arguments */
-
-#define G_NORM 0                /* Normal write mode */
-#define G_AND  1                /* `AND' mode        */
-#define G_OR   2                /* `OR' mode         */
-#define G_XOR  3                /* `XOR' mode        */
-
-/* Fill or draw outline */
-
-#define G_OUTLINE      0             /* Draw outline */
-#define G_FILL         1             /* Fill         */
-
-/* EGA colors */
-
-#define G_BLACK        0
-#define G_BLUE         1
-#define G_GREEN        2
-#define G_CYAN         3
-#define G_RED          4
-#define G_MAGENTA      5
-#define G_YELLOW       6
-#define G_BROWN        6
-#define G_WHITE        7
-
-#define G_INTENSITY    8
-
-/* Screen dimensions */
-
-extern int g_xsize;             /* Screen width             */
-extern int g_ysize;             /* Screen height            */
-extern int g_colors;            /* Number of colors         */
-
-
-void g_box (int x0, int y0, int x1, int y1, int color, int fill_flag);
-void g_clear (int color);
-void g_clip (int x0, int y0, int x1, int y1);
-void g_ellipse (int cx, int cy, int rx, int ry, int color, int fill_flag);
-int g_get (int x, int y);
-void g_hline (int y, int x0, int x1, int color);
-void g_line (int x0, int y0, int x1,int y1, int color);
-void g_lock (void);
-int g_mode (int mode);
-int g_modeset (int mode, int flag);
-void g_polygon (__const__ int *x, __const__ int *y, int n, int color,
-    int fill_flag);
-void g_set (int x, int y, int color);
-void g_triangle (int x0, int y0, int x1, int y1, int x2, int y2, int color,
-    int fill_flag);
-void g_unlock (void);
-void g_unlockall (void);
-void g_vgapal (__const__ char *pal, int first, int n, int wait_flag);
-void g_vline (int x, int y0, int y1,int color);
-void g_waitv (void);
-void g_wmode (int wmode);
-
-#if defined (__cplusplus)
-}
-#endif
-
-#endif /* not _GRAPH_H */
Index: trunk/src/emx/include/grp.h
===================================================================
--- trunk/src/emx/include/grp.h	(revision 1505)
+++ trunk/src/emx/include/grp.h	(revision 1506)
@@ -1,58 +1,99 @@
-/* grp.h (emx+gcc) */
+/* grp.h,v 1.3 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ * @changed bird: path
+ */
+
+/*-
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)grp.h	8.2 (Berkeley) 1/21/94
+ * $FreeBSD: src/include/grp.h,v 1.18 2003/04/17 14:15:25 nectar Exp $
+ */
 
 #ifndef _GRP_H_
-#define _GRP_H_
-#define _GRP_H
+#define	_GRP_H_
 
 #include <sys/cdefs.h>
 #include <sys/_types.h>
 
-__BEGIN_DECLS
+#define	_PATH_GROUP		"/@unixroot/etc/group"
 
-#ifndef _POSIX_SOURCE
-#define	_PATH_GROUP		"/etc/group"
+#if !defined(_GID_T_DECLARED) && !defined(_GID_T)   /* bird */
+typedef	__gid_t		gid_t;
+#define	_GID_T_DECLARED
+#define	_GID_T                                      /* bird */
 #endif
 
-#if !defined(_GID_T_DECLARED) && !defined(_GID_T)
-typedef	__gid_t gid_t;
-#define	_GID_T_DECLARED
-#define	_GID_T
+#if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird */
+typedef __size_t	size_t;
+#define _SIZE_T_DECLARED
+#define _SIZE_T                                     /* bird */
 #endif
 
-#if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T)
-typedef __size_t size_t;
-#define _SIZE_T_DECLARED
-#define _SIZE_T
-#endif
-
-
-struct group
-{
-  char *gr_name;
-  char *gr_passwd;
-  gid_t gr_gid;
-  char **gr_mem;
+struct group {
+	char	*gr_name;		/* group name */
+	char	*gr_passwd;		/* group password */
+	gid_t	gr_gid;			/* group id */
+	char	**gr_mem;		/* group members */
 };
 
-struct group   *getgrgid (gid_t);
-struct group   *getgrnam (const char *);
-
+__BEGIN_DECLS
 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
-struct group   *getgrent(void);
-int             setgrent(void);
-void            endgrent(void);
-void            setgrfile(const char *);
-int             setgroupent(int);
-int             getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
-int             getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
+void		 endgrent(void);
+struct group	*getgrent(void);
 #endif
-
+struct group	*getgrgid(gid_t);
+struct group	*getgrnam(const char *);
 #if __BSD_VISIBLE
-const char     *group_from_gid(gid_t, int);
-int             getgrent_r(struct group *, char *, size_t, struct group **);
-int             setgroupent(int);
+const char	*group_from_gid(gid_t, int);
 #endif
-
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
+/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */
+int		 setgrent(void);
+int		 getgrgid_r(gid_t, struct group *, char *, size_t,
+		    struct group **);
+int		 getgrnam_r(const char *, struct group *, char *, size_t,
+		    struct group **);
+#endif
+#if __BSD_VISIBLE
+int		 getgrent_r(struct group *, char *, size_t, struct group **);
+int		 setgroupent(int);
+#endif
 __END_DECLS
 
-#endif /* not _GRP_H_ */
+#endif /* !_GRP_H_ */
Index: trunk/src/emx/include/hashtab.h
===================================================================
--- trunk/src/emx/include/hashtab.h	(revision 1505)
+++ trunk/src/emx/include/hashtab.h	(revision 1506)
@@ -1,3 +1,8 @@
-/* An expandable hash tables datatype.  
+/* hashtab.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
+/* An expandable hash tables datatype.
    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@cygnus.com).
@@ -57,5 +62,5 @@
    the hash table.  */
 typedef void (*htab_del) PARAMS ((void *));
-  
+
 /* Function called by htab_traverse for each live element.  The first
    arg is the slot of the element (which can be passed to htab_clear_slot
Index: trunk/src/emx/include/iconv.h
===================================================================
--- trunk/src/emx/include/iconv.h	(revision 1505)
+++ trunk/src/emx/include/iconv.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* iconv.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * IGCC
+ */
 /* OS/2 iconv() implementation through OS/2 Unicode API
    Copyright (C) 2001 Free Software Foundation, Inc.
Index: trunk/src/emx/include/ieee.h
===================================================================
--- trunk/src/emx/include/ieee.h	(revision 1505)
+++ trunk/src/emx/include/ieee.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* ieee.h */
+/* ieee.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * EMX
+ */
 
 #define	_IEEE		1
Index: trunk/src/emx/include/inttypes.h
===================================================================
--- trunk/src/emx/include/inttypes.h	(revision 1505)
+++ trunk/src/emx/include/inttypes.h	(revision 1506)
@@ -1,2 +1,9 @@
+/* inttypes.h,v 1.3 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ *
+ * @todo  Implement all the functions in this header.
+ */
+
 /*-
  * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org>
@@ -27,10 +34,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- *
- * @todo  Implement all the functions in this header.
- */
-
 #ifndef _INTTYPES_H_
 #define	_INTTYPES_H_
Index: trunk/src/emx/include/io.h
===================================================================
--- trunk/src/emx/include/io.h	(revision 1505)
+++ trunk/src/emx/include/io.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* io.h (emx+gcc) */
+/* io.h,v 1.10 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * EMX
+ */
 
 #ifndef _IO_H
Index: trunk/src/emx/include/iso646.h
===================================================================
--- trunk/src/emx/include/iso646.h	(revision 1505)
+++ trunk/src/emx/include/iso646.h	(revision 1506)
@@ -1,17 +1,49 @@
-/* iso646.h */
+/* iso646.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ */
 
-#if !defined (__cplusplus)
+/*-
+ * Copyright (c) 1998 Alex Nash
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/include/iso646.h,v 1.4 2002/09/18 22:23:59 mike Exp $
+ */
 
-#define and     &&
-#define and_eq  &=
-#define bitand  &
-#define bitor   |
-#define compl   ~
-#define not     !
-#define not_eq  !=
-#define or      ||
-#define or_eq   |=
-#define xor     ^
-#define xor_eq  ^=
+#ifndef _ISO646_H_
+#define	_ISO646_H_
 
-#endif
+#define	and	&&
+#define	and_eq	&=
+#define	bitand	&
+#define	bitor	|
+#define	compl	~
+#define	not	!
+#define	not_eq	!=
+#define	or	||
+#define	or_eq	|=
+#define	xor	^
+#define	xor_eq	^=
+
+#endif /* !_ISO646_H_ */
Index: trunk/src/emx/include/libgen.h
===================================================================
--- trunk/src/emx/include/libgen.h	(revision 1505)
+++ trunk/src/emx/include/libgen.h	(revision 1506)
@@ -1,19 +1,54 @@
-#ifndef _LIBGEN_H
-#define _LIBGEN_H
+/* libgen.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ */
 
-#if defined (__cplusplus)
-extern "C" {
+/*	$OpenBSD: libgen.h,v 1.4 1999/05/28 22:00:22 espie Exp $	*/
+/*	$FreeBSD: src/include/libgen.h,v 1.2 2002/03/23 17:24:53 imp Exp $	*/
+
+/*
+ * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _LIBGEN_H_
+#define _LIBGEN_H_
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
+
+char	*basename(const char *);
+char	*dirname(const char *);
+#if 0
+char	*regcmp(const char *, ...);
+char	*regex(const char *, const char *, ...);
+
+extern char *__loc1;
 #endif
 
-/* Return directory part of PATH or "." if none is available.  */
-extern char *dirname (char *pathname);
+__END_DECLS
 
-/* Return final component of PATH. */
-#undef basename
-extern char *basename (char *pathname);
-
-#if defined (__cplusplus)
-}
-#endif
-
-#endif /* libgen.h */
+#endif /* _LIBGEN_H_ */
Index: trunk/src/emx/include/libiberty.h
===================================================================
--- trunk/src/emx/include/libiberty.h	(revision 1505)
+++ trunk/src/emx/include/libiberty.h	(revision 1506)
@@ -1,6 +1,11 @@
+/* libiberty.h,v 1.2 2004/09/14 22:27:33 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* Function declarations for libiberty.
 
    Copyright 2001, 2002 Free Software Foundation, Inc.
-   
+
    Note - certain prototypes declared in this header file are for
    functions whoes implementation copyright does not belong to the
@@ -24,5 +29,5 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.
-   
+
    Written by Cygnus Support, 1994.
 
Index: trunk/src/emx/include/limits.h
===================================================================
--- trunk/src/emx/include/limits.h	(revision 1505)
+++ trunk/src/emx/include/limits.h	(revision 1506)
@@ -1,2 +1,11 @@
+/* limits.h,v 1.3 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: made some minor adjustments.
+ * @remark  Most of the values here aren't really absolute maximum values.
+ *          Take care to check the specification before changing anything.
+ * @todo    Review and make adjustments.
+ */
+
 /*-
  * Copyright (c) 1988, 1993
@@ -33,12 +42,4 @@
  *	@(#)limits.h	8.2 (Berkeley) 1/4/94
  * $FreeBSD: src/include/limits.h,v 1.16 2003/04/29 13:35:58 kan Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changed bird: made some minor adjustments.
- * @remark  Most of the values here aren't really absolute maximum values.
- *          Take care to check the specification before changing anything.
- * @todo    Review and make adjustments.
  */
 
Index: trunk/src/emx/include/locale.h
===================================================================
--- trunk/src/emx/include/locale.h	(revision 1505)
+++ trunk/src/emx/include/locale.h	(revision 1506)
@@ -1,2 +1,9 @@
+/* $Id; $ */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: removed unsupported values and added comments to lconv.
+ * @changed bird: Changed the LC_* values to match those unidef.h sets.
+ */
+
 /*
  * Copyright (c) 1991, 1993
@@ -33,10 +40,4 @@
  *	@(#)locale.h	8.1 (Berkeley) 6/2/93
  * $FreeBSD: src/include/locale.h,v 1.7 2002/10/09 09:19:27 tjr Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changed bird: removed unsupported values and added comments to lconv.
- * @changed bird: Changed the LC_* values to match those unidef.h sets.
  */
 
Index: trunk/src/emx/include/malloc.h
===================================================================
--- trunk/src/emx/include/malloc.h	(revision 1505)
+++ trunk/src/emx/include/malloc.h	(revision 1506)
@@ -1,3 +1,7 @@
-/* malloc.h (emx+gcc) */
+/* malloc.h,v 1.7 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * EMX
+ * @todo    Merge with stdlib.h.
+ */
 
 #ifndef _MALLOC_H
Index: trunk/src/emx/include/math.h
===================================================================
--- trunk/src/emx/include/math.h	(revision 1505)
+++ trunk/src/emx/include/math.h	(revision 1506)
@@ -1,3 +1,7 @@
-/* math.h (emx+gcc) */
+/* math.h,v 1.5 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * EMX
+ * @todo This needs C99 attention!
+ */
 
 #ifndef _MATH_H
Index: trunk/src/emx/include/md5.h
===================================================================
--- trunk/src/emx/include/md5.h	(revision 1505)
+++ trunk/src/emx/include/md5.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* md5.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* md5.h - Declaration of functions and data types used for MD5 sum
    computing library functions.
Index: trunk/src/emx/include/memory.h
===================================================================
--- trunk/src/emx/include/memory.h	(revision 1505)
+++ trunk/src/emx/include/memory.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* memory.h,v 1.3 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*
  * Copyright (c) 1988, 1993
@@ -34,8 +39,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- */
-
 #include <string.h>
 
Index: trunk/src/emx/include/mpool.h
===================================================================
--- trunk/src/emx/include/mpool.h	(revision 1505)
+++ trunk/src/emx/include/mpool.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* mpool.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -33,8 +38,4 @@
  *	@(#)mpool.h	8.2 (Berkeley) 7/14/94
  * $FreeBSD: src/include/mpool.h,v 1.9 2002/03/23 17:24:53 imp Exp $
- */
-
-/** @file
- * FreeBSD 5.1
  */
 
Index: trunk/src/emx/include/ndbm.h
===================================================================
--- trunk/src/emx/include/ndbm.h	(revision 1505)
+++ trunk/src/emx/include/ndbm.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* ndbm.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*-
  * Copyright (c) 1990, 1993
@@ -36,8 +41,4 @@
  *	@(#)ndbm.h	8.1 (Berkeley) 6/2/93
  * $FreeBSD: src/include/ndbm.h,v 1.4 2002/03/23 17:24:53 imp Exp $
- */
-
-/** @file
- * FreeBSD 5.1
  */
 
Index: trunk/src/emx/include/netdb.h
===================================================================
--- trunk/src/emx/include/netdb.h	(revision 1505)
+++ trunk/src/emx/include/netdb.h	(revision 1506)
@@ -1,4 +1,12 @@
-/*- Modified for emx by hv and em 1994-1997
- *- Modified for gcc by bird 2003
+/* netdb.h,v 1.8 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * BSD
+ *
+ * @changed Modified for emx by hv and em 1994-1997
+ * @changed Modified for gcc by bird 2003
+ */
+
+/* netdb.h,v 1.8 2004/09/14 22:27:34 bird Exp */
+/*-
  *
  * Copyright (c) 1980, 1983, 1988 Regents of the University of California.
@@ -34,5 +42,5 @@
  *
  *	from: @(#)netdb.h	5.15 (Berkeley) 4/3/91
- *	netdb.h,v 1.7 2004/09/12 19:40:25 bird Exp
+ *	netdb.h,v 1.8 2004/09/14 22:27:34 bird Exp
  */
 
@@ -64,9 +72,9 @@
 
 
-#define	_PATH_HEQUIV	"/mptn/etc/hosts.equiv"
-#define	_PATH_HOSTS	"/mptn/etc/hosts"
-#define	_PATH_NETWORKS	"/mptn/etc/networks"
-#define	_PATH_PROTOCOLS	"/mptn/etc/protocols"
-#define	_PATH_SERVICES	"/mptn/etc/services"
+#define	_PATH_HEQUIV	"/@unixroot/etc/hosts.equiv"
+#define	_PATH_HOSTS	"/@unixroot/etc/hosts"
+#define	_PATH_NETWORKS	"/@unixroot/etc/networks"
+#define	_PATH_PROTOCOLS	"/@unixroot/etc/protocols"
+#define	_PATH_SERVICES	"/@unixroot/etc/services"
 
 #ifdef TCPV40HDRS
Index: trunk/src/emx/include/nl_types.h
===================================================================
--- trunk/src/emx/include/nl_types.h	(revision 1505)
+++ trunk/src/emx/include/nl_types.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* nl_types.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*-
  * Copyright 1990, by Alfalfa Software Incorporated, Cambridge, Massachusetts.
Index: trunk/src/emx/include/nss.h
===================================================================
--- trunk/src/emx/include/nss.h	(revision 1505)
+++ trunk/src/emx/include/nss.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* nss.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ */
+
 /*-
  * Copyright (c) 2003 Networks Associates Technology, Inc.
Index: trunk/src/emx/include/nsswitch.h
===================================================================
--- trunk/src/emx/include/nsswitch.h	(revision 1505)
+++ trunk/src/emx/include/nsswitch.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* nsswitch.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ */
+
 /*	$NetBSD: nsswitch.h,v 1.6 1999/01/26 01:04:07 lukem Exp $	*/
 /*	$FreeBSD: src/include/nsswitch.h,v 1.3 2003/04/17 14:14:21 nectar Exp $ */
@@ -47,5 +52,5 @@
 
 #ifndef _PATH_NS_CONF
-#define _PATH_NS_CONF	"/etc/nsswitch.conf"
+#define _PATH_NS_CONF	"/@unixroot/etc/nsswitch.conf"
 #endif
 
@@ -104,5 +109,5 @@
 /*
  * ns_dtab `method' function signature.
- */ 
+ */
 typedef int (*nss_method)(void *_retval, void *_mdata, va_list _ap);
 
@@ -130,5 +135,5 @@
 #define NS_FILES_CB(F,C)	{ NSSRC_FILES,	F,	C },
 #define NS_COMPAT_CB(F,C)	{ NSSRC_COMPAT,	F,	C },
- 
+
 #ifdef HESIOD
 #   define NS_DNS_CB(F,C)	{ NSSRC_DNS,	F,	C },
@@ -183,5 +188,5 @@
 		       nss_module_unregister_fn *);
 
-/* 
+/*
  * Many NSS interfaces follow the getXXnam, getXXid, getXXent pattern.
  * Developers are encouraged to use nss_lookup_type where approriate.
Index: trunk/src/emx/include/objalloc.h
===================================================================
--- trunk/src/emx/include/objalloc.h	(revision 1505)
+++ trunk/src/emx/include/objalloc.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* objalloc.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* objalloc.h -- routines to allocate memory for objects
    Copyright 1997, 2001 Free Software Foundation, Inc.
Index: trunk/src/emx/include/obstack.h
===================================================================
--- trunk/src/emx/include/obstack.h	(revision 1505)
+++ trunk/src/emx/include/obstack.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* obstack.h,v 1.2 2004/09/14 22:27:34 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* obstack.h - object stack macros
    Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
Index: trunk/src/emx/include/os2.h
===================================================================
--- trunk/src/emx/include/os2.h	(revision 1505)
+++ trunk/src/emx/include/os2.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* os2.h (emx+gcc) */
+/* os2.h,v 1.3 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * EMX
+ */
 
 #ifndef _OS2_H
Index: trunk/src/emx/include/os2emx.h
===================================================================
--- trunk/src/emx/include/os2emx.h	(revision 1505)
+++ trunk/src/emx/include/os2emx.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* os2emx.h (emx+gcc) */
+/* os2emx.h,v 1.19 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * EMX
+ */
 
 #ifndef _OS2EMX_H
Index: trunk/src/emx/include/os2thunk.h
===================================================================
--- trunk/src/emx/include/os2thunk.h	(revision 1505)
+++ trunk/src/emx/include/os2thunk.h	(revision 1506)
@@ -1,6 +1,13 @@
-/* os2thunk.h (emx+gcc) */
+/* os2thunk.h,v 1.4 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * EMX
+ */
 
 #ifndef _OS2THUNK_H
 #define _OS2THUNK_H
+
+#include <sys/cdefs.h>
+
+__BEGIN_DECLS
 
 typedef unsigned long _far16ptr;
@@ -61,3 +68,5 @@
 #define _THUNK_PTR_STRUCT_OK(ptr) _THUNK_PTR_SIZE_OK ((ptr), sizeof (*(ptr)))
 
+__END_DECLS
+
 #endif /* not _OS2THUNK_H */
Index: trunk/src/emx/include/os2tk.h
===================================================================
--- trunk/src/emx/include/os2tk.h	(revision 1505)
+++ trunk/src/emx/include/os2tk.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* os2tk.h (emx+gcc) */
+/* os2tk.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * EMX
+ */
 
 #ifndef __OS2_H__
Index: trunk/src/emx/include/partition.h
===================================================================
--- trunk/src/emx/include/partition.h	(revision 1505)
+++ trunk/src/emx/include/partition.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* partition.h,v 1.3 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* List implementation of a partition of consecutive integers.
    Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Index: trunk/src/emx/include/paths.h
===================================================================
--- trunk/src/emx/include/paths.h	(revision 1505)
+++ trunk/src/emx/include/paths.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* paths.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ * @changed bird: /@unixroot
+ */
+
 /*
  * Copyright (c) 1989, 1993
@@ -41,59 +47,59 @@
 
 /* Default search path. */
-#define	_PATH_DEFPATH	"/usr/bin:/bin"
+#define	_PATH_DEFPATH	"/@unixroot/usr/bin:/@unixroot/bin"
 /* All standard utilities path. */
 #define	_PATH_STDPATH \
-	"/usr/bin:/bin:/usr/sbin:/sbin:"
+	"/@unixroot/usr/bin:/@unixroot/bin:/@unixroot/usr/sbin:/@unixroot/sbin:"
 /* Locate system binaries */
 #define _PATH_SYSPATH	\
-	"/sbin:/usr/sbin"
+	"/@unixroot/sbin:/@unixroot/usr/sbin"
 
-#define	_PATH_AUTHCONF	"/etc/auth.conf"
-#define	_PATH_BSHELL	"/bin/sh"
-#define	_PATH_CAPABILITY	"/etc/capability"
-#define	_PATH_CAPABILITY_DB	"/etc/capability.db"
-#define	_PATH_CONSOLE	"/dev/console"
-#define	_PATH_CP	"/bin/cp"
-#define	_PATH_CSHELL	"/bin/csh"
-#define	_PATH_DEFTAPE	"/dev/sa0"
-#define	_PATH_DEVNULL	"/dev/null"
-#define	_PATH_DEVZERO	"/dev/zero"
-#define	_PATH_DRUM	"/dev/drum"
-#define	_PATH_ETC	"/etc"
-#define	_PATH_FTPUSERS	"/etc/ftpusers"
-#define	_PATH_HALT	"/sbin/halt"
-#define	_PATH_IFCONFIG	"/sbin/ifconfig"
-#define	_PATH_KMEM	"/dev/kmem"
-#define	_PATH_LIBMAP_CONF	"/etc/libmap.conf"
-#define	_PATH_LOCALE	"/usr/share/locale"
-#define	_PATH_LOGIN	"/usr/bin/login"
-#define	_PATH_MAILDIR	"/var/mail"
-#define	_PATH_MAN	"/usr/share/man"
-#define	_PATH_MDCONFIG	"/sbin/mdconfig"
-#define	_PATH_MEM	"/dev/mem"
-#define	_PATH_MKSNAP_FFS	"/sbin/mksnap_ffs"
-#define	_PATH_MOUNT	"/sbin/mount"
-#define	_PATH_NEWFS	"/sbin/newfs"
-#define	_PATH_NOLOGIN	"/var/run/nologin"
-#define	_PATH_RCP	"/bin/rcp"
-#define	_PATH_REBOOT	"/sbin/reboot"
-#define	_PATH_RLOGIN	"/usr/bin/rlogin"
-#define	_PATH_RM	"/bin/rm"
-#define	_PATH_RSH	"/usr/bin/rsh"
-#define	_PATH_SENDMAIL	"/usr/sbin/sendmail"
-#define	_PATH_SHELLS	"/etc/shells"
-#define	_PATH_TTY	"/dev/tty"
+#define	_PATH_AUTHCONF	"/@unixroot/etc/auth.conf"
+#define	_PATH_BSHELL	"/@unixroot/bin/sh"
+#define	_PATH_CAPABILITY	"/@unixroot/etc/capability"
+#define	_PATH_CAPABILITY_DB	"/@unixroot/etc/capability.db"
+#define	_PATH_CONSOLE	"/@unixroot/dev/console"
+#define	_PATH_CP	"/@unixroot/bin/cp"
+#define	_PATH_CSHELL	"/@unixroot/bin/csh"
+#define	_PATH_DEFTAPE	"/@unixroot/dev/sa0"
+#define	_PATH_DEVNULL	"/@unixroot/dev/null"
+#define	_PATH_DEVZERO	"/@unixroot/dev/zero"
+#define	_PATH_DRUM	"/@unixroot/dev/drum"
+#define	_PATH_ETC	"/@unixroot/etc"
+#define	_PATH_FTPUSERS	"/@unixroot/etc/ftpusers"
+#define	_PATH_HALT	"/@unixroot/sbin/halt"
+#define	_PATH_IFCONFIG	"/@unixroot/sbin/ifconfig"
+#define	_PATH_KMEM	"/@unixroot/dev/kmem"
+#define	_PATH_LIBMAP_CONF	"/@unixroot/etc/libmap.conf"
+#define	_PATH_LOCALE	"/@unixroot/usr/share/locale"
+#define	_PATH_LOGIN	"/@unixroot/usr/bin/login"
+#define	_PATH_MAILDIR	"/@unixroot/var/mail"
+#define	_PATH_MAN	"/@unixroot/usr/share/man"
+#define	_PATH_MDCONFIG	"/@unixroot/sbin/mdconfig"
+#define	_PATH_MEM	"/@unixroot/dev/mem"
+#define	_PATH_MKSNAP_FFS	"/@unixroot/sbin/mksnap_ffs"
+#define	_PATH_MOUNT	"/@unixroot/sbin/mount"
+#define	_PATH_NEWFS	"/@unixroot/sbin/newfs"
+#define	_PATH_NOLOGIN	"/@unixroot/var/run/nologin"
+#define	_PATH_RCP	"/@unixroot/bin/rcp"
+#define	_PATH_REBOOT	"/@unixroot/sbin/reboot"
+#define	_PATH_RLOGIN	"/@unixroot/usr/bin/rlogin"
+#define	_PATH_RM	"/@unixroot/bin/rm"
+#define	_PATH_RSH	"/@unixroot/usr/bin/rsh"
+#define	_PATH_SENDMAIL	"/@unixroot/usr/sbin/sendmail"
+#define	_PATH_SHELLS	"/@unixroot/etc/shells"
+#define	_PATH_TTY	"/@unixroot/dev/tty"
 #define	_PATH_UNIX	"don't use _PATH_UNIX"
-#define	_PATH_VI	"/usr/bin/vi"
-#define	_PATH_WALL	"/usr/bin/wall"
+#define	_PATH_VI	"/@unixroot/usr/bin/vi"
+#define	_PATH_WALL	"/@unixroot/usr/bin/wall"
 
 /* Provide trailing slash, since mostly used for building pathnames. */
-#define	_PATH_DEV	"/dev/"
-#define	_PATH_TMP	"/tmp/"
-#define	_PATH_VARDB	"/var/db/"
-#define	_PATH_VARRUN	"/var/run/"
-#define	_PATH_VARTMP	"/var/tmp/"
-#define	_PATH_YP	"/var/yp/"
-#define	_PATH_UUCPLOCK	"/var/spool/lock/"
+#define	_PATH_DEV	"/@unixroot/dev/"
+#define	_PATH_TMP	"/@unixroot/tmp/"
+#define	_PATH_VARDB	"/@unixroot/var/db/"
+#define	_PATH_VARRUN	"/@unixroot/var/run/"
+#define	_PATH_VARTMP	"/@unixroot/var/tmp/"
+#define	_PATH_YP	"/@unixroot/var/yp/"
+#define	_PATH_UUCPLOCK	"/@unixroot/var/spool/lock/"
 
 /* How to get the correct name of the kernel. */
@@ -104,35 +110,35 @@
 #ifdef RESCUE
 #undef	_PATH_DEFPATH
-#define	_PATH_DEFPATH	"/rescue:/usr/bin:/bin"
+#define	_PATH_DEFPATH	"/@unixroot/rescue:/@unixroot/usr/bin:/@unixroot/bin"
 #undef	_PATH_STDPATH
-#define	_PATH_STDPATH	"/rescue:/usr/bin:/bin:/usr/sbin:/sbin"
+#define	_PATH_STDPATH	"/@unixroot/rescue:/@unixroot/usr/bin:/@unixroot/bin:/@unixroot/usr/sbin:/@unixroot/sbin"
 #undef	_PATH_SYSPATH
-#define	_PATH_SYSPATH	"/rescue:/sbin:/usr/sbin"
+#define	_PATH_SYSPATH	"/@unixroot/rescue:/@unixroot/sbin:/@unixroot/usr/sbin"
 #undef	_PATH_BSHELL
-#define	_PATH_BSHELL	"/rescue/sh"
+#define	_PATH_BSHELL	"/@unixroot/rescue/sh"
 #undef	_PATH_CP
-#define	_PATH_CP	"/rescue/cp"
+#define	_PATH_CP	"/@unixroot/rescue/cp"
 #undef	_PATH_CSHELL
-#define	_PATH_CSHELL	"/rescue/csh"
+#define	_PATH_CSHELL	"/@unixroot/rescue/csh"
 #undef	_PATH_HALT
-#define	_PATH_HALT	"/rescue/halt"
+#define	_PATH_HALT	"/@unixroot/rescue/halt"
 #undef	_PATH_IFCONFIG
-#define	_PATH_IFCONFIG	"/rescue/ifconfig"
+#define	_PATH_IFCONFIG	"/@unixroot/rescue/ifconfig"
 #undef	_PATH_MDCONFIG
-#define	_PATH_MDCONFIG	"/rescue/mdconfig"
+#define	_PATH_MDCONFIG	"/@unixroot/rescue/mdconfig"
 #undef	_PATH_MOUNT
-#define	_PATH_MOUNT	"/rescue/mount"
+#define	_PATH_MOUNT	"/@unixroot/rescue/mount"
 #undef	_PATH_NEWFS
-#define	_PATH_NEWFS	"/rescue/newfs"
+#define	_PATH_NEWFS	"/@unixroot/rescue/newfs"
 #undef	_PATH_RCP
-#define	_PATH_RCP	"/rescue/rcp"
+#define	_PATH_RCP	"/@unixroot/rescue/rcp"
 #undef	_PATH_REBOOT
-#define	_PATH_REBOOT	"/rescue/reboot"
+#define	_PATH_REBOOT	"/@unixroot/rescue/reboot"
 #undef	_PATH_RM
-#define	_PATH_RM	"/rescue/rm"
+#define	_PATH_RM	"/@unixroot/rescue/rm"
 #undef	_PATH_VI
-#define	_PATH_VI	"/rescue/vi"
+#define	_PATH_VI	"/@unixroot/rescue/vi"
 #undef	_PATH_WALL
-#define	_PATH_WALL	"/rescue/wall"
+#define	_PATH_WALL	"/@unixroot/rescue/wall"
 #endif /* RESCUE */
 
Index: trunk/src/emx/include/process.h
===================================================================
--- trunk/src/emx/include/process.h	(revision 1505)
+++ trunk/src/emx/include/process.h	(revision 1506)
@@ -1,3 +1,7 @@
-/* process.h (emx+gcc) */
+/* process.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * EMX
+ * @see sys/process.h
+ */
 
 #ifndef _PROCESS_H
Index: trunk/src/emx/include/protocol/rwhod.h
===================================================================
--- trunk/src/emx/include/protocol/rwhod.h	(revision 1505)
+++ trunk/src/emx/include/protocol/rwhod.h	(revision 1506)
@@ -1,2 +1,3 @@
+/* $Id$ */
 #ifndef _PROTOCOL_RWHOD_H_
 #define _PROTOCOL_RWHOD_H_
Index: trunk/src/emx/include/protocols/rwhod.h
===================================================================
--- trunk/src/emx/include/protocols/rwhod.h	(revision 1505)
+++ trunk/src/emx/include/protocols/rwhod.h	(revision 1506)
@@ -1,2 +1,3 @@
+/* $Id$ */
 /*
  * Copyright (c) 1983, 1993
@@ -74,5 +75,5 @@
 #define	WHODTYPE_STATUS	1		/* host status */
 
-#define	_PATH_RWHODIR	"/var/rwho"
+#define	_PATH_RWHODIR	"/@unixroot/var/rwho"
 
 #endif /*!TCPV40HDRS*/
Index: trunk/src/emx/include/pwd.h
===================================================================
--- trunk/src/emx/include/pwd.h	(revision 1505)
+++ trunk/src/emx/include/pwd.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* pwd.h,v 1.4 2004/09/14 22:27:35 bird Exp */
+/**
+ * FreeBSD 5.2
+ * @changed bird: some EMXisms.
+ */
+
 /*-
  * Copyright (c) 1989, 1993
@@ -40,9 +46,4 @@
  */
 
-/**
- * FreeBSD 5.2
- * @changed bird: some EMXisms.
- */
-
 #ifndef _PWD_H_
 #define	_PWD_H_
@@ -77,16 +78,16 @@
 
 
-#define _PATH_PWD		"/etc"
-#define	_PATH_PASSWD		"/etc/passwd"
+#define _PATH_PWD		"/@unixroot/etc"
+#define	_PATH_PASSWD		"/@unixroot/etc/passwd"
 #define	_PASSWD			"passwd"
-#define	_PATH_MASTERPASSWD	"/etc/master.passwd"
+#define	_PATH_MASTERPASSWD	"/@unixroot/etc/master.passwd"
 #define	_MASTERPASSWD		"master.passwd"
 
-#define	_PATH_MP_DB		"/etc/pwd.db"
+#define	_PATH_MP_DB		"/@unixroot/etc/pwd.db"
 #define	_MP_DB			"pwd.db"
-#define	_PATH_SMP_DB		"/etc/spwd.db"
+#define	_PATH_SMP_DB		"/@unixroot/etc/spwd.db"
 #define	_SMP_DB			"spwd.db"
 
-#define	_PATH_PWD_MKDB		"/usr/sbin/pwd_mkdb"
+#define	_PATH_PWD_MKDB		"/@unixroot/usr/sbin/pwd_mkdb"
 
 /* Historically, the keys in _PATH_MP_DB/_PATH_SMP_DB had the format
Index: trunk/src/emx/include/regex.h
===================================================================
--- trunk/src/emx/include/regex.h	(revision 1505)
+++ trunk/src/emx/include/regex.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* regex.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
 /*-
  * Copyright (c) 1992 Henry Spencer.
@@ -37,8 +41,4 @@
  *	@(#)regex.h	8.2 (Berkeley) 1/3/94
  * $FreeBSD: src/include/regex.h,v 1.6 2002/10/03 18:12:03 mike Exp $
- */
-
-/** @file
- * FreeBSD 5.1
  */
 
Index: trunk/src/emx/include/regexp.h
===================================================================
--- trunk/src/emx/include/regexp.h	(revision 1505)
+++ trunk/src/emx/include/regexp.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* regexp.h,v 1.3 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ */
+
 /*
  * Copyright (c) 1986 by University of Toronto.
@@ -39,8 +44,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- */
-
 #ifndef	_REGEXP_H_
 #define	_REGEXP_H_
Index: trunk/src/emx/include/resolv.h
===================================================================
--- trunk/src/emx/include/resolv.h	(revision 1505)
+++ trunk/src/emx/include/resolv.h	(revision 1506)
@@ -1,5 +1,9 @@
-/* Modified for EMX by hv 1994,1996
- * Modified for gcc by bird 2003
- *
+/* resolv.h,v 1.5 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * BSD
+ * @changed EM: For EMX by hv 1994,1996
+ * @changed bird: For IGCC.
+ */
+/*
  * Copyright (c) 1983, 1987, 1989 The Regents of the University of California.
  * All rights reserved.
@@ -34,5 +38,5 @@
  *
  *	from: @(#)resolv.h	5.15 (Berkeley) 4/3/91
- *	resolv.h,v 1.4 2003/07/11 11:39:47 bird Exp
+ *	resolv.h,v 1.5 2004/09/14 22:27:35 bird Exp
  */
 
@@ -70,5 +74,5 @@
 
 #ifndef _PATH_RESCONF
-#define _PATH_RESCONF        "/mptn/etc/resolv.conf"
+#define _PATH_RESCONF        "/@unixroot/etc/resolv.conf"
 #endif
 #endif /* TCPV40HDRS */
Index: trunk/src/emx/include/safe-ctype.h
===================================================================
--- trunk/src/emx/include/safe-ctype.h	(revision 1505)
+++ trunk/src/emx/include/safe-ctype.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* safe-ctype.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * GNU, -liberty
+ */
+
 /* <ctype.h> replacement macros.
 
Index: trunk/src/emx/include/search.h
===================================================================
--- trunk/src/emx/include/search.h	(revision 1505)
+++ trunk/src/emx/include/search.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* search.h,v 1.3 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: _SIZE_T
+ */
 /*-
  * Written by J.T. Conklin <jtc@netbsd.org>
@@ -5,9 +10,4 @@
  *	$NetBSD: search.h,v 1.12 1999/02/22 10:34:28 christos Exp $
  * $FreeBSD: src/include/search.h,v 1.10 2002/10/16 14:29:23 robert Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changed bird: _SIZE_T
  */
 
Index: trunk/src/emx/include/setjmp.h
===================================================================
--- trunk/src/emx/include/setjmp.h	(revision 1505)
+++ trunk/src/emx/include/setjmp.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* setjmp.h,v 1.3 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: @todo'ed the functions LIBC doesn't implement.
+ */
 /*-
  * Copyright (c) 1990, 1993
@@ -40,9 +45,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- * @changed bird: @todo'ed the functions LIBC doesn't implement.
- */
-
 #ifndef _SETJMP_H_
 #define _SETJMP_H_
Index: trunk/src/emx/include/sgtty.h
===================================================================
--- trunk/src/emx/include/sgtty.h	(revision 1505)
+++ trunk/src/emx/include/sgtty.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* sgtty.h (emx+gcc) */
+/* sgtty.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * EMX
+ */
 
 /* empty */
Index: trunk/src/emx/include/share.h
===================================================================
--- trunk/src/emx/include/share.h	(revision 1505)
+++ trunk/src/emx/include/share.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* share.h (emx+gcc) */
+/* share.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * EMX. VAC legacy.
+ */
 
 #ifndef _SHARE_H
Index: trunk/src/emx/include/socks.h
===================================================================
--- trunk/src/emx/include/socks.h	(revision 1505)
+++ trunk/src/emx/include/socks.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* socks.h,v 1.3 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * BSD
+ */
 /*-----------------------------------------------------------------
 Copyright (c) 1989 Regents of the University of California.
Index: trunk/src/emx/include/sort.h
===================================================================
--- trunk/src/emx/include/sort.h	(revision 1505)
+++ trunk/src/emx/include/sort.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* sort.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
 /* Sorting algorithms.
    Copyright (C) 2000 Free Software Foundation, Inc.
@@ -4,5 +8,5 @@
 
 This file is part of GCC.
-   
+
 GCC is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by
@@ -45,4 +49,4 @@
 
 
-   
-   
+
+
Index: trunk/src/emx/include/spawn.h
===================================================================
--- trunk/src/emx/include/spawn.h	(revision 1505)
+++ trunk/src/emx/include/spawn.h	(revision 1506)
@@ -1,2 +1,7 @@
+/** @file
+ * GLIBC 2.3.2
+ * @changed bird: we don't have sched.h or the GLIBC standard definitions.
+ */
+
 /* Definitions for POSIX spawn interface.
    Copyright (C) 2000 Free Software Foundation, Inc.
@@ -18,14 +23,9 @@
    02111-1307 USA.  */
 
-/** @file
- * GLIBC 2.3.2
- * @changed bird: we don't have features.h, sched.h or the GLIBC standard definitions.
- */
-
 #ifndef	_SPAWN_H
 #define	_SPAWN_H	1
 
+#include <features.h>
 #ifndef __EMX__                         /* bird */
-#include <features.h>
 #include <sched.h>
 #endif                                  /* bird */
Index: trunk/src/emx/include/splay-tree.h
===================================================================
--- trunk/src/emx/include/splay-tree.h	(revision 1505)
+++ trunk/src/emx/include/splay-tree.h	(revision 1506)
@@ -1,8 +1,12 @@
-/* A splay-tree datatype.  
+/* splay-tree.h,v 1.2 2004/09/14 22:27:35 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+/* A splay-tree datatype.
    Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
    Contributed by Mark Mitchell (mark@markmitchell.com).
 
 This file is part of GCC.
-   
+
 GCC is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License as published by
@@ -23,5 +27,5 @@
 
      Lewis, Harry R. and Denenberg, Larry.  Data Structures and Their
-     Algorithms.  Harper-Collins, Inc.  1991.  
+     Algorithms.  Harper-Collins, Inc.  1991.
 
    The major feature of splay trees is that all basic tree operations
@@ -121,5 +125,5 @@
                                                 void *));
 extern void splay_tree_delete           PARAMS((splay_tree));
-extern splay_tree_node splay_tree_insert          
+extern splay_tree_node splay_tree_insert
 		                        PARAMS((splay_tree,
 					        splay_tree_key,
@@ -127,5 +131,5 @@
 extern void splay_tree_remove		PARAMS((splay_tree,
 						splay_tree_key));
-extern splay_tree_node splay_tree_lookup   
+extern splay_tree_node splay_tree_lookup
                                         PARAMS((splay_tree,
 					        splay_tree_key));
@@ -147,5 +151,5 @@
 extern int splay_tree_compare_pointers  PARAMS((splay_tree_key,
 						splay_tree_key));
-					       
+					
 #ifdef __cplusplus
 }
Index: trunk/src/emx/include/stdint.h
===================================================================
--- trunk/src/emx/include/stdint.h	(revision 1505)
+++ trunk/src/emx/include/stdint.h	(revision 1506)
@@ -1,4 +1,6 @@
+/* stdint.h,v 1.2 2004/09/14 22:27:36 bird Exp */
 /** @file
  * FreeBSD 5.1
+ * @see sys/stdint.h
  */
 #include <sys/stdint.h>
Index: trunk/src/emx/include/stdio.h
===================================================================
--- trunk/src/emx/include/stdio.h	(revision 1505)
+++ trunk/src/emx/include/stdio.h	(revision 1506)
@@ -1,2 +1,9 @@
+/* stdio.h,v 1.13 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: EMX isms + LIBC implementation specifics.
+ * @chagned bird: Made quite a few @todos on function which aren't implemented.
+ */
+
 /*-
  * Copyright (c) 1990, 1993
@@ -36,10 +43,4 @@
  *	@(#)stdio.h	8.5 (Berkeley) 4/29/95
  * $FreeBSD: src/include/stdio.h,v 1.51 2003/01/13 08:41:47 tjr Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changed bird: EMX isms + LIBC implementation specifics.
- * @chagned bird: Made quite a few @todos on function which aren't implemented.
  */
 
@@ -503,5 +504,5 @@
 #endif
 
-#endif /* bird: Skip FreeBSD sepcific LIBC stuff. */
+#endif /* bird: Skip FreeBSD specific LIBC stuff. */
 
 
Index: trunk/src/emx/include/stdlib.h
===================================================================
--- trunk/src/emx/include/stdlib.h	(revision 1505)
+++ trunk/src/emx/include/stdlib.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* stdlib.h,v 1.24 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: EMXifications and OS2ifications.
+ */
+
 /*-
  * Copyright (c) 1990, 1993
@@ -33,9 +39,4 @@
  *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95
  * $FreeBSD: src/include/stdlib.h,v 1.48 2003/03/12 20:29:58 das Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changed bird: EMXifications and OS2ifications.
  */
 
Index: trunk/src/emx/include/string.h
===================================================================
--- trunk/src/emx/include/string.h	(revision 1505)
+++ trunk/src/emx/include/string.h	(revision 1506)
@@ -1,2 +1,9 @@
+/* string.h,v 1.13 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: EMXifications.
+ * @changed bird: GNU extension(s).
+ */
+
 /*-
  * Copyright (c) 1990, 1993
@@ -33,10 +40,4 @@
  *	@(#)string.h	8.1 (Berkeley) 6/2/93
  * $FreeBSD: src/include/string.h,v 1.18 2002/10/14 20:38:40 mike Exp $
- */
-
-/** @file
- * FreeBSD 5.1
- * @changed bird: EMXifications.
- * @changed bird: GNU extension(s).
  */
 
Index: trunk/src/emx/include/stringlist.h
===================================================================
--- trunk/src/emx/include/stringlist.h	(revision 1505)
+++ trunk/src/emx/include/stringlist.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* stringlist.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ */
 /*	$NetBSD: stringlist.h,v 1.2 1997/01/17 06:11:36 lukem Exp $	*/
 
@@ -35,5 +39,5 @@
 
 #ifndef _STRINGLIST_H
-#define _STRINGLIST_H 
+#define _STRINGLIST_H
 #include <sys/cdefs.h>
 #include <sys/types.h>
Index: trunk/src/emx/include/strings.h
===================================================================
--- trunk/src/emx/include/strings.h	(revision 1505)
+++ trunk/src/emx/include/strings.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* strings.h,v 1.3 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: EMXifications.
+ */
+
 /*-
  * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
@@ -27,9 +33,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- * @changed bird: EMXifications.
- */
-
 #ifndef _STRINGS_H_
 #define	_STRINGS_H_
Index: trunk/src/emx/include/symcat.h
===================================================================
--- trunk/src/emx/include/symcat.h	(revision 1505)
+++ trunk/src/emx/include/symcat.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* symcat.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
 /* Symbol concatenation utilities.
 
@@ -12,5 +16,5 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
- 
+
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
@@ -45,5 +49,5 @@
    works for __STDC__, not for traditional C which will still resolve
    to "foo".  */
-#define XSTRING(s) STRINGX(s) 
+#define XSTRING(s) STRINGX(s)
 
 #endif /* SYM_CAT_H */
Index: trunk/src/emx/include/sys/errno.h
===================================================================
--- trunk/src/emx/include/sys/errno.h	(revision 1505)
+++ trunk/src/emx/include/sys/errno.h	(revision 1506)
@@ -1,2 +1,8 @@
+/* $Id: $ */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: errno wrapper and added comments about defines which have moved.
+ */
+
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -40,9 +46,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- * @changed bird: errno wrapper and added comments about defines which have moved.
- */
-
 #ifndef _SYS_ERRNO_H_
 #define _SYS_ERRNO_H_
Index: trunk/src/emx/include/sys/fcntl.h
===================================================================
--- trunk/src/emx/include/sys/fcntl.h	(revision 1505)
+++ trunk/src/emx/include/sys/fcntl.h	(revision 1506)
@@ -1,2 +1,14 @@
+/* $Id: $ */
+/** @file
+ * FreeBSD 5.1 + EMX
+ *
+ * @changed bird: EMX isms.
+ * @changed bird: Removed (non KERNEL) stuff we don't implement and added
+ *          EMX specific stuff.
+ * @todo    Consider implementing the flags and commands we don't currently
+ *          include.
+ */
+
+
 /*-
  * Copyright (c) 1983, 1990, 1993
@@ -40,14 +52,4 @@
  */
 
-/** @file
- * FreeBSD 5.1 + EMX
- *
- * @changed bird: EMX isms.
- * @changed bird: Removed (non KERNEL) stuff we don't implement and added
- *          EMX specific stuff.
- * @todo    Consider implementing the flags and commands we don't currently
- *          include.
- */
-
 #ifndef _SYS_FCNTL_H_
 #define	_SYS_FCNTL_H_
Index: trunk/src/emx/include/sys/process.h
===================================================================
--- trunk/src/emx/include/sys/process.h	(revision 1505)
+++ trunk/src/emx/include/sys/process.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* sys/process.h (emx+gcc) */
+/* $Id: $ */
+/** @file
+ * EMX
+ */
 
 #ifndef _SYS_PROCESS_H
Index: trunk/src/emx/include/sys/syslog.h
===================================================================
--- trunk/src/emx/include/sys/syslog.h	(revision 1505)
+++ trunk/src/emx/include/sys/syslog.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* $Id: $ */
+/** @file
+ * FreeBSD 5.1
+ */
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -35,13 +39,9 @@
  */
 
-/** @file
- * FreeBSD 5.1
- */
-
 #ifndef _SYS_SYSLOG_H_
 #define _SYS_SYSLOG_H_
 
-#define	_PATH_LOG	"/var/run/log"
-#define	_PATH_OLDLOG	"/dev/log"	/* backward compatibility */
+#define	_PATH_LOG	"/@unixroot/var/run/log"
+#define	_PATH_OLDLOG	"/@unixroot/dev/log"	/* backward compatibility */
 
 /*
Index: trunk/src/emx/include/sys/termio.h
===================================================================
--- trunk/src/emx/include/sys/termio.h	(revision 1505)
+++ trunk/src/emx/include/sys/termio.h	(revision 1506)
@@ -1,10 +1,9 @@
-/* sys/termio.h (emx+gcc) */
-
+/* $Id: $ */
+/** @file
+ * EMX
+ */
 #ifndef _SYS_TERMIO_H
 #define _SYS_TERMIO_H
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
 
 /* Request codes */
@@ -150,7 +149,3 @@
 };
 
-#if defined (__cplusplus)
-}
-#endif
-
 #endif /* not _SYS_TERMIO_H */
Index: trunk/src/emx/include/sys/termios.h
===================================================================
--- trunk/src/emx/include/sys/termios.h	(revision 1505)
+++ trunk/src/emx/include/sys/termios.h	(revision 1506)
@@ -1,10 +1,12 @@
-/* sys/termios.h (emx+gcc) */
+/* $Id$ */
+/** @file
+ * EMX.
+ */
 
 #ifndef _SYS_TERMIOS_H_
 #define _SYS_TERMIOS_H_
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
+#include <sys/cdefs.h>
+
 
 /* tcsetattr() */
@@ -139,5 +141,5 @@
 };
 
-
+__BEGIN_DECLS
 speed_t cfgetispeed (__const__ struct termios *);
 speed_t cfgetospeed (__const__ struct termios *);
@@ -154,8 +156,5 @@
 int	cfsetspeed (struct termios *, speed_t);
 #endif /* !_POSIX_SOURCE */
-
-#if defined (__cplusplus)
-}
-#endif
+__END_DECLS
 
 #endif /* not _SYS_TERMIOS_H_ */
Index: trunk/src/emx/include/sys/ulimit.h
===================================================================
--- trunk/src/emx/include/sys/ulimit.h	(revision 1505)
+++ 	(revision )
@@ -1,12 +1,0 @@
-/* sys/ulimit.h (emx+gcc) */
-
-#ifndef _SYS_ULIMIT_H
-#define _SYS_ULIMIT_H
-
-#define UL_GFILLIM      1
-#define UL_SFILLIM      2
-#define UL_GMEMLIM      3
-#define UL_NOFILES      4
-#define UL_OBJREST      81
-
-#endif /* not _SYS_ULIMIT_H */
Index: trunk/src/emx/include/sys/utime.h
===================================================================
--- trunk/src/emx/include/sys/utime.h	(revision 1505)
+++ trunk/src/emx/include/sys/utime.h	(revision 1506)
@@ -1,3 +1,7 @@
-
+/* $Id: $ */
+/** @file
+ * FreeBSD 5.1
+ * @changed bird: the usual emx stuff.
+ */
 /*-
  * Copyright (c) 1990, 1993
@@ -36,9 +40,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- * @changed bird: the usual emx stuff.
- */
-
 #ifndef	_UTIME_H_
 #define	_UTIME_H_
Index: trunk/src/emx/include/syslog.h
===================================================================
--- trunk/src/emx/include/syslog.h	(revision 1505)
+++ trunk/src/emx/include/syslog.h	(revision 1506)
@@ -1,3 +1,3 @@
-/* symlink */
+/* syslog.h,v 1.2 2004/09/14 22:27:36 bird Exp */
 /** @file
  * @see sys/syslog.h.
Index: trunk/src/emx/include/termcap.h
===================================================================
--- trunk/src/emx/include/termcap.h	(revision 1505)
+++ trunk/src/emx/include/termcap.h	(revision 1506)
@@ -1,1 +1,6 @@
+/* termcap.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * GNU
+ * @see gnu/termcap.h
+ */
 #include <gnu/termcap.h>
Index: trunk/src/emx/include/termio.h
===================================================================
--- trunk/src/emx/include/termio.h	(revision 1505)
+++ trunk/src/emx/include/termio.h	(revision 1506)
@@ -1,4 +1,7 @@
-/* termio.h (emx+gcc) */
-
+/* termio.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * EMX
+ * @see sys/termio.h
+ */
 #ifndef _TERMIO_H
 #define _TERMIO_H
Index: trunk/src/emx/include/termios.h
===================================================================
--- trunk/src/emx/include/termios.h	(revision 1505)
+++ trunk/src/emx/include/termios.h	(revision 1506)
@@ -1,1 +1,6 @@
+/* termios.h,v 1.4 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * EMX
+ * @see sys/termios.h.
+ */
 #include <sys/termios.h>
Index: trunk/src/emx/include/ternary.h
===================================================================
--- trunk/src/emx/include/ternary.h	(revision 1505)
+++ trunk/src/emx/include/ternary.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* ternary.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* ternary.h - Ternary Search Trees
    Copyright 2001 Free Software Foundation, Inc.
@@ -34,5 +39,5 @@
 ternary_node;
 
-/* Insert string S into tree P, associating it with DATA. 
+/* Insert string S into tree P, associating it with DATA.
    Return the data in the tree associated with the string if it's
    already there, and replace is 0.
@@ -42,5 +47,5 @@
 			    PTR data, int replace));
 
-/* Delete the ternary search tree rooted at P. 
+/* Delete the ternary search tree rooted at P.
    Does NOT delete the data you associated with the strings. */
 void ternary_cleanup PARAMS ((ternary_tree p));
Index: trunk/src/emx/include/time.h
===================================================================
--- trunk/src/emx/include/time.h	(revision 1505)
+++ trunk/src/emx/include/time.h	(revision 1506)
@@ -1,2 +1,18 @@
+/** @file
+ * FreeBSD 5.1
+ *
+ * @changed EMX isms.
+ * @changed Removed timezone() function as it clashes with the timezone
+ *          variable defined in EMX and OGBSI6.
+ * @changed Changed CLK_TCK and CLOCKS_PER_SEC to 100.
+ * @changed Commented out tm_gmtoff and tm_zone in struct tm as LIBC doesn't
+ *          implement these yet.
+ *
+ * @todo    Implement tm_gmtoff and tm_zone members in struct tm.
+ * @todo    Implement clock_getres(), clock_gettime(), clock_settime(), nanosleep().
+ *          asctime_r(), ctime_r(), gmtime_r() and localtime_r() which are defined in
+ *          various POSIX standard revisions.
+ * @todo    Implement tzsetwall(), timelocal(), timegm() which are BSD specific.
+ */
 /*
  * Copyright (c) 1989, 1993
@@ -43,21 +59,4 @@
  */
 
-/** @file
- * FreeBSD 5.1
- *
- * @changed EMX isms.
- * @changed Removed timezone() function as it clashes with the timezone
- *          variable defined in EMX and OGBSI6.
- * @changed Changed CLK_TCK and CLOCKS_PER_SEC to 100.
- * @changed Commented out tm_gmtoff and tm_zone in struct tm as LIBC doesn't
- *          implement these yet.
- *
- * @todo    Implement tm_gmtoff and tm_zone members in struct tm.
- * @todo    Implement clock_getres(), clock_gettime(), clock_settime(), nanosleep().
- *          asctime_r(), ctime_r(), gmtime_r() and localtime_r() which are defined in
- *          various POSIX standard revisions.
- * @todo    Implement tzsetwall(), timelocal(), timegm() which are BSD specific.
- */
-
 #ifndef _TIME_H_
 #define	_TIME_H_
Index: trunk/src/emx/include/types.h
===================================================================
--- trunk/src/emx/include/types.h	(revision 1505)
+++ trunk/src/emx/include/types.h	(revision 1506)
@@ -1,3 +1,6 @@
-/* toolkit compatibility. */
+/* types.h,v 1.4 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * IGCC, OS/2 Tcpip compataility.
+ */
 #ifndef __TYPES_H_
 #define __TYPES_H_
@@ -14,5 +17,5 @@
 
 #include <errno.h>
-/*#include <nerrno.h> */
+#include <nerrno.h>
 #include <sys/time.h>
 #include <utils.h>
Index: trunk/src/emx/include/uconv.h
===================================================================
--- trunk/src/emx/include/uconv.h	(revision 1505)
+++ trunk/src/emx/include/uconv.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* uconv.h,v 1.3 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * IGCC.
+ */
 /*
  * Legalesy-free Unicode API interface for OS/2
@@ -14,9 +18,8 @@
 #define __UCONV_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <unidef.h>
+#include <sys/cdefs.h>
 
-#include <unidef.h>
+__BEGIN_DECLS
 
 /* Substitution options */
@@ -128,7 +131,5 @@
 #define UCONV_NOTIMPLEMENTED    ULS_NOTIMPLEMENTED
 
-#ifdef __cplusplus
-}
-#endif
+__END_DECLS
 
 #endif /* __UCONV_H__ */
Index: trunk/src/emx/include/ulimit.h
===================================================================
--- trunk/src/emx/include/ulimit.h	(revision 1505)
+++ trunk/src/emx/include/ulimit.h	(revision 1506)
@@ -1,20 +1,57 @@
-/* ulimit.h (emx+gcc) */
+/* ulimit.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ * @changed bird: Added EMX and Linux defines.
+ */
+/*-
+ * Copyright (c) 2002 Kyle Martin <mkm@ieee.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/include/ulimit.h,v 1.4 2003/01/08 01:18:13 tjr Exp $
+ */
 
-#ifndef _ULIMIT_H
-#define _ULIMIT_H
+#ifndef _ULIMIT_H_
+#define	_ULIMIT_H_
 
-#include <sys/ulimit.h>
+#include <sys/cdefs.h>
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
+#define	UL_GETFSIZE	1
+#define	UL_SETFSIZE	2
 
-long ulimit (int, ...);
+/* bird: emx start */
+#define UL_GFILLIM      UL_GETFSIZE
+#define UL_SFILLIM      UL_SETFSIZE
+#define UL_GMEMLIM      3
+#define UL_NOFILES      4
+#define UL_OBJREST      81
+/* GNU/Linux compatability. */
+#define __UL_GETMAXBRK  UL_GMEMLIM
+#define __UL_GETOPENMAX	UL_NOFILES
+/* bird: emx end */
 
-long _ulimit (int, ...);
+__BEGIN_DECLS
+long	ulimit(int, ...);
+__END_DECLS
 
-#if defined (__cplusplus)
-}
-#endif
-
-#endif /* not _ULIMIT_H */
+#endif /* !_ULIMIT_H_ */
Index: trunk/src/emx/include/ulserr.h
===================================================================
--- trunk/src/emx/include/ulserr.h	(revision 1505)
+++ trunk/src/emx/include/ulserr.h	(revision 1506)
@@ -4,5 +4,5 @@
 #ifndef ulserr_h__
 #define ulserr_h__
-#warning Please, don not use ulserr.h. You should be using ulserrno.h!
+#warning Please, do not use ulserr.h. You should be using ulserrno.h!
 #include <ulserrno.h>
 #endif /* ulserr_h__ */
Index: trunk/src/emx/include/ulserrno.h
===================================================================
--- trunk/src/emx/include/ulserrno.h	(revision 1505)
+++ trunk/src/emx/include/ulserrno.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* ulserrno.h,v 1.3 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * IGCC.
+ */
 /*
  * Legalesy-free Unicode API interface for OS/2
Index: trunk/src/emx/include/ulsitem.h
===================================================================
--- trunk/src/emx/include/ulsitem.h	(revision 1505)
+++ trunk/src/emx/include/ulsitem.h	(revision 1506)
@@ -1,2 +1,6 @@
+/* ulsitem.h,v 1.3 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * IGCC.
+ */
 /*
  * Legalesy-free Unicode API interface for OS/2
Index: trunk/src/emx/include/umalloc.h
===================================================================
--- trunk/src/emx/include/umalloc.h	(revision 1505)
+++ trunk/src/emx/include/umalloc.h	(revision 1506)
@@ -1,3 +1,7 @@
-/* umalloc.h (emx+gcc) */
+/* umalloc.h,v 1.4 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * EMX.
+ */
+
 
 #ifndef _UMALLOC_H
@@ -7,7 +11,5 @@
 #include <sys/_types.h>
 
-#if defined (__cplusplus)
-extern "C" {
-#endif
+__BEGIN_DECLS
 
 #if !defined (_SIZE_T)
@@ -99,7 +101,5 @@
 void *_utmalloc (Heap_t, size_t);
 
-#if defined (__cplusplus)
-}
-#endif
+__END_DECLS
 
 #endif /* not _UMALLOC_H */
Index: trunk/src/emx/include/unchecke.h
===================================================================
--- trunk/src/emx/include/unchecke.h	(revision 1505)
+++ 	(revision )
@@ -1,86 +1,0 @@
-/*----------------------------------------------------------------------*
- * Bounds Checking for GCC.						*
- * Copyright (C) 1995 Richard W.M. Jones <rwmj@doc.ic.ac.uk>.		*
- *----------------------------------------------------------------------*
- * This program is free software; you can redistribute it and/or modify	*
- * it under the terms of the GNU General Public License as published by	*
- * the Free Software Foundation; either version 2 of the License, or	*
- * (at your option) any later version.					*
- *									*
- * This program is distributed in the hope that it will be useful,	*
- * but WITHOUT ANY WARRANTY; without even the implied warranty of	*
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the	*
- * GNU General Public License for more details.				*
- *									*
- * You should have received a copy of the GNU General Public License	*
- * along with this program; if not, write to the Free Software		*
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.		*
- *----------------------------------------------------------------------*
- * File:
- *	run-includes/unchecked.h
- * Summary:
- *	Macros to allow per-pointer and per-use unchecked pointers.
- * Other notes:
- *	
- * Author      	Date		Notes
- * RWMJ		23/1/95		Initial implementation.
- * RWMJ         17/6/95         Added miscellaneous features.
- *----------------------------------------------------------------------*/
-
-#ifndef _bounds_unchecked_h
-#define _bounds_unchecked_h
-
-#if defined(__GNUC__) && defined(__BOUNDS_CHECKING_ON)
-
-/* Make pointer operations unchecked on each use.
-*/
-#define UNCHECKED_PTR_DIFF(p,q) ((ptrdiff_t)(((unsigned)(p))-((unsigned)(q))/sizeof (*p)))
-#define UNCHECKED_PTR_PLUS_INT(p,i) ((typeof(p))((unsigned)(p))+(i)*(sizeof *p))
-#define UNCHECKED_PTR_MINUS_INT(p,i) ((typeof(p))((unsigned)(p))-(i)*(sizeof *p))
-
-/* How to switch checking off over a region of the program. You will need
- * 'DEBUG_FEATURES' set in the library. You do:
- *     ..
- *    BOUNDS_CHECKING_OFF;
- *     .. strange pointer operations here ..
- *    BOUNDS_CHECKING_ON;
- */
-#define BOUNDS_CHECKING_OFF do {extern int __bounds_debug_no_checking; \
-                                __bounds_debug_no_checking = 1;} while(0)
-#define BOUNDS_CHECKING_ON  do {extern int __bounds_debug_no_checking; \
-                                __bounds_debug_no_checking = 0;} while(0)
-
-/* Switch bounds checking off in a single statement. You do:
- *    BOUNDS_CHECKING_OFF_DURING (stmt);
- * This works for most 'ordinary' statements, ie. not returns, or gotos, etc.
- * For expressions, use:
- *    BOUNDS_CHECKING_OFF_IN_EXPR (expr)
- */
-#define BOUNDS_CHECKING_OFF_DURING(stmt) \
-  do { extern int __bounds_debug_no_checking; \
-       __bounds_debug_no_checking = 1; \
-       stmt; \
-       __bounds_debug_no_checking = 0; \
-  } while (0)
-#define BOUNDS_CHECKING_OFF_IN_EXPR(expr) \
-  ({ extern int __bounds_debug_no_checking; \
-     typeof(expr) __value; \
-     __bounds_debug_no_checking = 1; \
-     __value = (expr); \
-     __bounds_debug_no_checking = 0; \
-     __value; })
-
-#else /* not __GNUC__ or not __BOUNDS_CHECKING_ON */
-
-#define UNCHECKED_PTR_DIFF(p,q) ((p)-(q))
-#define UNCHECKED_PTR_PLUS_INT(p,i) ((p)+(i))
-#define UNCHECKED_PTR_MINUS_INT(p,i) ((p)-(i))
-
-#define BOUNDS_CHECKING_OFF
-#define BOUNDS_CHECKING_ON
-
-#define BOUNDS_CHECKING_OFF_DURING(stmt) stmt
-#define BOUNDS_CHECKING_OFF_IN_EXPR(expr) expr
-
-#endif /* __GNUC__, __BOUNDS_CHECKING_ON */
-#endif /* _bounds_unchecked_h */
Index: trunk/src/emx/include/unidef.h
===================================================================
--- trunk/src/emx/include/unidef.h	(revision 1505)
+++ trunk/src/emx/include/unidef.h	(revision 1506)
@@ -14,8 +14,5 @@
 #define __UNIDEF_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
+#include <sys/cdefs.h>
 #include <stddef.h>
 #include <time.h>
@@ -243,6 +240,6 @@
 
 
+__BEGIN_DECLS
 /* Locale Management Function Prototypes */
-
 int APIENTRY UniCreateLocaleObject (int locale_spec_type, const void *locale_spec,
   LocaleObject *locale_object_ptr);
@@ -362,8 +359,5 @@
 int APIENTRY UniQueryCountryName (UniChar *country, UniChar *isolang, UniChar **infoitem);
 
-
-#ifdef __cplusplus
-}
-#endif
+__END_DECLS
 
 #endif /* __UNIDEF_H__ */
Index: trunk/src/emx/include/unikbd.h
===================================================================
--- trunk/src/emx/include/unikbd.h	(revision 1505)
+++ trunk/src/emx/include/unikbd.h	(revision 1506)
@@ -1,3 +1,3 @@
-/* unikbd.h,v 1.1 2003/05/27 16:03:42 bird Exp */
+/* unikbd.h,v 1.2 2004/09/14 22:27:36 bird Exp */
 /** @file
  * Legalesy-free Unicode API interface for OS/2
@@ -14,11 +14,9 @@
 #define __UNIKBD_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
 
 /*******************************************************************************
 *   Header Files                                                               *
 *******************************************************************************/
+#include <sys/cdefs.h>
 #include <unidef.h>
 
@@ -341,4 +339,5 @@
 *   Internal Functions                                                         *
 *******************************************************************************/
+__BEGIN_DECLS
 APIRET KBDLINK UniCreateKeyboard(KHAND * phKeyboard, const KBDNAME * puszName, ULONG ulMode);
 APIRET KBDLINK UniDestroyKeyboard(KHAND hKeyboard);
@@ -349,9 +348,7 @@
 APIRET KBDLINK UniTranslateDeadkey(KHAND hKeyboard, VDKEY usDead, UniChar ucIn, UniChar * pucOut, VDKEY * pusDeadKey);
 APIRET KBDLINK UniUntranslateKey(KHAND hKeyboard, UniChar uc, VDKEY vdkey, VSCAN * pscan, ULONG * eshift);
-
-#ifdef __cplusplus
-}
+__END_DECLS
+
 #endif
-#endif
-
-
+
+
Index: trunk/src/emx/include/unistd.h
===================================================================
--- trunk/src/emx/include/unistd.h	(revision 1505)
+++ trunk/src/emx/include/unistd.h	(revision 1506)
@@ -1,2 +1,12 @@
+/* $Id: */
+/** @file
+ * EMX/FreeBSD 5.1
+ *
+ * @changed Commented out stuff which isn't implemented, TCPIP stuff at bottom.
+ * @todo    Several man-years.. ;) Serious, complete the FreeBSD 5.1 merge and
+ *          implement all the functions. Currently there is a bunch of POSIX
+ *          #defines missing.
+ */
+
 /*-
  * Copyright (c) 1991, 1993, 1994
@@ -35,13 +45,4 @@
  */
 
-/** @file
- * EMX/FreeBSD 5.1
- *
- * @changed Commented out stuff which isn't implemented, TCPIP stuff at bottom.
- * @todo    Several man-years.. ;) Serious, complete the FreeBSD 5.1 merge and
- *          implement all the functions. Currently there is a bunch of POSIX
- *          #defines missing.
- */
-
 #ifndef _UNISTD_H_
 #define _UNISTD_H_
Index: trunk/src/emx/include/utils.h
===================================================================
--- trunk/src/emx/include/utils.h	(revision 1505)
+++ trunk/src/emx/include/utils.h	(revision 1506)
@@ -1,5 +1,11 @@
-/* emx/gcc */
+/* utils.h,v 1.6 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * OS/2 TCPIP
+ */
+
 #ifndef _UTILS_H_
 #define _UTILS_H_
+
+#include <sys/cdefs.h>
 
 #ifndef TCPCALL
@@ -27,7 +33,5 @@
 #endif
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+__BEGIN_DECLS
 
 #if !defined(_SIZE_T_DECLARED) && !defined(_SIZE_T) /* bird: emx */
@@ -40,7 +44,5 @@
 int strncasecmp (__const__ char *, __const__ char *, size_t);
 
-#ifdef __cplusplus
-}
-#endif
+__END_DECLS
 
 /* MIN/MAX */
Index: trunk/src/emx/include/utime.h
===================================================================
--- trunk/src/emx/include/utime.h	(revision 1505)
+++ trunk/src/emx/include/utime.h	(revision 1506)
@@ -1,6 +1,6 @@
-/* utime.h (emx+gcc) */
-
-#ifndef _UTIME_H
-#define _UTIME_H
+/* utime.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.1
+ * @see sys/utime.h
+ */
 #include <sys/utime.h>
-#endif /* not _UTIME_H */
Index: trunk/src/emx/include/varargs.h
===================================================================
--- trunk/src/emx/include/varargs.h	(revision 1505)
+++ trunk/src/emx/include/varargs.h	(revision 1506)
@@ -1,33 +1,71 @@
-/* varargs.h (emx+gcc) */
+/* varargs.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * FreeBSD 5.2
+ */
+/*-
+ * Copyright (c) 1990, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)varargs.h	8.2 (Berkeley) 3/22/94
+ * $FreeBSD: src/sys/i386/include/varargs.h,v 1.8 1999/08/28 00:44:27 peter Exp $
+ */
 
-#ifndef _VARARGS_H
-#define _VARARGS_H
+#ifndef _VARARGS_H_
+#define	_VARARGS_H_
 
-#if !defined (NULL)
-#if defined (__cplusplus)
-#define NULL 0
+typedef char *va_list;
+
+#define	__va_size(type) \
+	(((sizeof(type) + sizeof(int) - 1) / sizeof(int)) * sizeof(int))
+
+#ifdef __GNUC__
+#define	va_alist	__builtin_va_alist
+#endif
+#if __GNUC__ > 1
+#define	va_dcl	int va_alist; ...
 #else
-#define NULL ((void *)0)
-#endif
+#define	va_dcl	int va_alist;
 #endif
 
-#define _VA_LIST
+#define	va_start(ap) \
+	((ap) = (va_list)&va_alist)
 
-#define _VA_ROUND(type) ((sizeof (type) + 3) & -4)
+#define	va_arg(ap, type) \
+	(*(type *)((ap) += __va_size(type), (ap) - __va_size(type)))
 
-#define va_alist __builtin_va_alist
-#define va_dcl int __builtin_va_alist;
-#define va_list char *
+#define	va_end(ap)
 
-#define va_start(alist) alist = (char *)&__builtin_va_alist
-#define va_end(alist) (alist = 0, (void)0)
-#define __std_va_arg(alist,t) (alist += _VA_ROUND (t), \
-                               *((t *)(alist - _VA_ROUND (t))))
-
-#ifdef __BOUNDS_CHECKING_ON
-#include <fix-args.h>
-#else
-#define va_arg(alist,t) __std_va_arg(alist,t)
-#endif
-
-#endif /* not _VARARGS_H */
+#endif /* !_VARARGS_H_ */
Index: trunk/src/emx/include/xregex.h
===================================================================
--- trunk/src/emx/include/xregex.h	(revision 1505)
+++ trunk/src/emx/include/xregex.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* xregex.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* This file redefines all regex external names before including
    a renamed copy of glibc's regex.h.  */
@@ -5,5 +10,5 @@
 #define _XREGEX_H 1
 
-#  define regfree xregfree 
+#  define regfree xregfree
 #  define regexec xregexec
 #  define regcomp xregcomp
Index: trunk/src/emx/include/xregex2.h
===================================================================
--- trunk/src/emx/include/xregex2.h	(revision 1505)
+++ trunk/src/emx/include/xregex2.h	(revision 1506)
@@ -1,2 +1,7 @@
+/* xregex2.h,v 1.2 2004/09/14 22:27:36 bird Exp */
+/** @file
+ * GNU, -liberty.
+ */
+
 /* Definitions for data structures and routines for the regular
    expression library, version 0.12.
Index: trunk/src/emx/src/lib/misc/basename.c
===================================================================
--- trunk/src/emx/src/lib/misc/basename.c	(revision 1505)
+++ trunk/src/emx/src/lib/misc/basename.c	(revision 1506)
@@ -1,53 +1,86 @@
 /*
-    Locale support implementation through OS/2 Unicode API.
-    Copyright (c) 2003 InnoTek Systemberatung GmbH
-
-    For conditions of distribution and use, see the file COPYING.
-
-    Standard XPG basename() implementation.
-    Returns a pointer to the last component of a pathname.
-    If pathname ends with a slash, it is removed.
-    If pathname is NULL or empty, "." is returned.
-    If pathname consist only of slashes, "/" is returned.
-*/
+ * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
 
 #include "libc-alias.h"
+#if 0
+#ifndef lint
+static char rcsid[] = "$OpenBSD: basename.c,v 1.4 1999/05/30 17:10:30 espie Exp $";
+#endif /* not lint */
+#endif
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/lib/libc/gen/basename.c,v 1.7 2002/12/30 01:41:14 marcel Exp $");
+
+#include <errno.h>
 #include <libgen.h>
+#include <stdlib.h>
 #include <string.h>
-#include <ctype.h>
+#include <sys/param.h>
 
-char *_STD(basename) (char *pathname); /* header is messing with the name redefinition. */
+char *
+_STD(basename)(path)
+	const char *path;
+{
+	static char *bname = NULL;
+	const char *endp, *startp;
 
-char *_STD(basename) (char *pathname)
-{
-  char *x;
-  char *oldpath = pathname;
+ 	if (bname == NULL) {
+		bname = (char *)malloc(MAXPATHLEN);
+		if (bname == NULL)
+			return(NULL);
+	}
 
-  if (!pathname || !*pathname)
-    return ".";
+	/* Empty or NULL string gets treated as "." */
+	if (path == NULL || *path == '\0') {
+		(void)strcpy(bname, ".");
+		return(bname);
+	}
 
-  /* Skip drive specifier, if any */
-  if (isalpha (pathname [0]) && (pathname [1] == ':'))
-    pathname += 2;
+	/* Strip trailing slashes */
+	endp = path + strlen(path) - 1;
+	while (endp > path && (*endp == '/' || *endp == '\\'))
+		endp--;
 
-  x = strchr (pathname, 0);
-  /* Remove all trailing slashes */
-  while ((x [-1] == '/' || x [-1] == '\\') && (x > pathname))
-    *--x = 0;
-  if (x == pathname)
-  {
-    /* If pathname contains a drive letter, returns DRIVE:/, not just "/" */
-    if (oldpath != pathname)
-    {
-      *x++ = '/';
-      *x = 0;
-      return oldpath;
-    }
-    return "/";
-  }
+	/* All slashes becomes "/" */
+	if (endp == path && (*endp == '/' || *endp == '\\')) {
+		(void)strcpy(bname, "/");
+		return(bname);
+	}
 
-  while ((x > pathname) && (x [-1] != '/') && (x [-1] != '\\'))
-    x--;
+	/* Find the start of the base */
+	startp = endp;
+	while (startp > path && *(startp - 1) != '/' && *(startp - 1) != '\\' && *(startp - 1) != ':')
+		startp--;
 
-  return x;
+	if (endp - startp + 2 > MAXPATHLEN) {
+		errno = ENAMETOOLONG;
+		return(NULL);
+	}
+	(void)strncpy(bname, startp, endp - startp + 1);
+	bname[endp - startp + 1] = '\0';
+	return(bname);
 }
+
Index: trunk/src/emx/src/lib/misc/dirname.c
===================================================================
--- trunk/src/emx/src/lib/misc/dirname.c	(revision 1505)
+++ trunk/src/emx/src/lib/misc/dirname.c	(revision 1506)
@@ -1,36 +1,89 @@
+/* $Id$ */
 /*
-    Locale support implementation through OS/2 Unicode API.
-    Copyright (c) 2003 InnoTek Systemberatung GmbH
-
-    For conditions of distribution and use, see the file COPYING.
-
-    Standard XPG dirname() implementation.
-    This function complements the XPG basename() function. If path is
-    NULL, a empty string, or does not contain slashes (forward or backward),
-    "." is returned. Otherwise it returns a pointer to the directory part
-    of the pathname; the last slash in the pathname is replaced with zero.
-*/
+ * Copyright (c) 1997 Todd C. Miller <Todd.Miller@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
 
 #include "libc-alias.h"
+#if 0
+#ifndef lint
+static char rcsid[] = "$OpenBSD: dirname.c,v 1.4 1999/05/30 17:10:30 espie Exp $";
+#endif /* not lint */
+#endif
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD: src/lib/libc/gen/dirname.c,v 1.7 2002/12/30 01:41:14 marcel Exp $");
+
+#include <errno.h>
 #include <libgen.h>
+#include <stdlib.h>
 #include <string.h>
+#include <sys/param.h>
 
-char *_STD(dirname) (char *pathname)
+char *
+_STD(dirname)(path)
+	const char *path;
 {
-  char *x;
+	static char *bname = NULL;
+	const char *endp;
 
-  if (!pathname || !*pathname)
-    return ".";
+	if (bname == NULL) {
+		bname = (char *)malloc(MAXPATHLEN);
+		if (bname == NULL)
+			return(NULL);
+	}
 
-  x = strchr (pathname, 0);
-  while ((x > pathname) && (x [-1] != '/') && (x [-1] != '\\') && (x [-1] != ':'))
-    x--;
-  while ((x > pathname) && ((x [-1] == '/') || (x [-1] == '\\')))
-    x--;
+	/* Empty or NULL string gets treated as "." */
+	if (path == NULL || *path == '\0') {
+		(void)strcpy(bname, ".");
+		return(bname);
+	}
 
-  if (x == pathname)
-    return ".";
+	/* Strip trailing slashes */
+	endp = path + strlen(path) - 1;
+	while (endp > path && (*endp == '/' || *endp == '\\'))
+		endp--;
 
-  *x = 0;
-  return pathname;
+	/* Find the start of the dir */
+	while (endp > path && *endp != '/' && *endp != '/' && *endp != ':')
+		endp--;
+
+	/* Either the dir is "/" or there are no slashes */
+	if (endp == path) {
+		(void)strcpy(bname, *endp == '/' || *endp == '\\' ? "/" : ".");
+		return(bname);
+	} else {
+		do {
+			endp--;
+		} while (endp > path && (*endp == '/' || *endp == '\\'));
+	}
+
+	if (endp - path + 2 > MAXPATHLEN) {
+		errno = ENAMETOOLONG;
+		return(NULL);
+	}
+	(void)strncpy(bname, path, endp - path + 1);
+	bname[endp - path + 1] = '\0';
+	return(bname);
 }
Index: trunk/src/emx/src/lib/sys/pathrewrite.c
===================================================================
--- trunk/src/emx/src/lib/sys/pathrewrite.c	(revision 1505)
+++ trunk/src/emx/src/lib/sys/pathrewrite.c	(revision 1506)
@@ -207,10 +207,22 @@
 
 
+/*
+ * Unix root.
+ */
+/** The unixroot directory. */
+static char                 gszUnixRoot[260];
+/** /@unixroot/ -> ${UNIXROOT} rewrite rules */
+static __LIBC_PATHREWRITE   gBltinRule_unixroot =
+{   __LIBC_PRWF_CASE_SENSITIVE | __LIBC_PRWF_TYPE_DIR,      "/@unixroot",  10, gszUnixRoot, 0 };
+
+
 /*******************************************************************************
 *   Internal Functions                                                         *
 *******************************************************************************/
 static void __libc_pathRewriteDeleteDir(PDIRECTORY pDir);
-void __libc_pathRewriteInit(void);
+static void __libc_pathRewriteInit(void);
 /* static void __libc_pathRewriteTerm(void); */
+
+_CRT_INIT1(__libc_pathRewriteInit)
 
 /**
@@ -218,8 +230,30 @@
  * @remark  Cannot be static as GCC will optimize it away then.
  */
-void __libc_pathRewriteInit(void)
-{
+static void __libc_pathRewriteInit(void)
+{
+    static void *pfnDummy = __libc_pathRewriteInit;
     LIBCLOG_ENTER("\n");
     const char *psz;
+
+    /*
+     * Extra unix features.
+     */
+    if (1)
+    {
+        /*
+         * Check for unixroot.
+         */
+        psz = getenv("UNIXROOT");
+        if (psz)
+        {
+            size_t cch = strlen(psz);
+            if (cch < sizeof(gszUnixRoot) - 1)
+            {
+                memcpy(gszUnixRoot, psz, cch + 1);
+                gBltinRule_unixroot.cchTo = cch;
+                __libc_PathRewriteAdd(&gBltinRule_unixroot, 1);
+            }
+        }
+    }
 
     /*
@@ -321,5 +355,5 @@
             memcpy(szSym, pszSym, pszSymEnd - pszSym);
             szSym[pszSymEnd - pszSym] = '\0';
-            rc = DosQueryProcAddr(hmod, 0, (PSZ)szSym, (PFN*)&pfnRewriter);
+            rc = DosQueryProcAddr(hmod, 0, (PSZ)szSym, (PFN*)(void *)&pfnRewriter);
             if (!rc)
             {
@@ -341,6 +375,6 @@
 
     LIBCLOG_RETURN_VOID();
+    pfnDummy = pfnDummy;
 }
-_CRT_INIT1(__libc_pathRewriteInit);
 
 
