Index: external/glibc-2.1.3.patch
===================================================================
RCS file: external/glibc-2.1.3.patch
diff -N external/glibc-2.1.3.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ external/glibc-2.1.3.patch	11 Aug 2006 10:48:49 -0000	1.1.2.1
@@ -0,0 +1,197 @@
+*** misc/glibc-2.1.3/posix/config.h	2006-08-11 12:26:56.627045000 +0200
+--- misc/build/glibc-2.1.3/posix/config.h	2005-09-06 16:21:33.000000000 +0200
+***************
+*** 1 ****
+! dummy
+--- 1,50 ----
+! /*************************************************************************
+!  *
+!  *  OpenOffice.org - a multi-platform office productivity suite
+!  *
+!  *  $RCSfile$
+!  *
+!  *  $Revision$
+!  *
+!  *  last change: $Author$ $Date$
+!  *
+!  *  The Contents of this file are made available subject to
+!  *  the terms of GNU Lesser General Public License Version 2.1.
+!  *
+!  *
+!  *    GNU Lesser General Public License Version 2.1
+!  *    =============================================
+!  *    Copyright 2005 by Sun Microsystems, Inc.
+!  *    901 San Antonio Road, Palo Alto, CA 94303, USA
+!  *
+!  *    This library is free software; you can redistribute it and/or
+!  *    modify it under the terms of the GNU Lesser General Public
+!  *    License version 2.1, as published by the Free Software Foundation.
+!  *
+!  *    This 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 this library; if not, write to the Free Software
+!  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+!  *    MA  02111-1307  USA
+!  *
+!  ************************************************************************/
+! 
+! #ifdef WNT
+! #include <stdlib.h>
+! #define getenv getenv
+! #endif
+! 
+! 
+! #if defined(MACOSX)
+! //Workaround for MACOS
+! #define getopt my_neues_getopt
+! #define opterr my_neues_opterr
+! #define optind my_neues_optind
+! #define optopt my_neues_optopt
+! #endif
+! 
+! 
+*** misc/glibc-2.1.3/posix/makefile.mk	2006-08-11 12:26:56.557768000 +0200
+--- misc/build/glibc-2.1.3/posix/makefile.mk	2006-08-10 17:38:30.000000000 +0200
+***************
+*** 1 ****
+! dummy
+--- 1,73 ----
+! #*************************************************************************
+! #
+! #   OpenOffice.org - a multi-platform office productivity suite
+! #
+! #   $RCSfile$
+! #
+! #   $Revision$
+! #
+! #   last change: $Author$ $Date$
+! #
+! #   The Contents of this file are made available subject to
+! #   the terms of GNU Lesser General Public License Version 2.1.
+! #
+! #
+! #     GNU Lesser General Public License Version 2.1
+! #     =============================================
+! #     Copyright 2005 by Sun Microsystems, Inc.
+! #     901 San Antonio Road, Palo Alto, CA 94303, USA
+! #
+! #     This library is free software; you can redistribute it and/or
+! #     modify it under the terms of the GNU Lesser General Public
+! #     License version 2.1, as published by the Free Software Foundation.
+! #
+! #     This 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 this library; if not, write to the Free Software
+! #     Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+! #     MA  02111-1307  USA
+! #
+! #*************************************************************************
+! 
+! PRJ=..$/..$/..$/..$/..
+! 
+! PRJNAME=external
+! TARGET=gnu_getopt
+! LIBTARGET=NO
+! 
+! EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
+! 
+! SOLARINC+=-I.. 
+! 
+! # --- Settings -----------------------------------------------------
+! 
+! .INCLUDE :  svpre.mk
+! .INCLUDE :  settings.mk
+! .INCLUDE :  sv.mk
+! 
+! CDEFS+=-DHAVE_STRING_H  -DHAVE_CONFIG_H
+! 
+! # --- Files --------------------------------------------------------
+! 
+! OBJFILES=	$(OBJ)$/getopt.obj		\
+! 			$(OBJ)$/getopt1.obj
+! 
+! LIB1TARGET=$(SLB)$/$(TARGET).lib
+! LIB1ARCHIV=$(LB)$/lib$(TARGET).a
+! LIB1OBJFILES=$(OBJFILES)
+! 
+! .IF "$(OS)"=="NETBSD"
+! TARGET2=gnu_readdir_r
+! OBJFILES+= $(OBJ)$/readdir_r.obj
+! LIB2TARGET=$(SLB)$/$(TARGET2).lib
+! LIB2ARCHIV=$(LB)$/lib$(TARGET2).a
+! LIB2OBJFILES= $(OBJ)$/readdir_r.obj
+! .ENDIF
+! 
+! # --- Targets ------------------------------------------------------
+! 
+! .INCLUDE :  target.mk
+*** misc/glibc-2.1.3/posix/readdir_r.c	2006-08-11 12:26:56.698676000 +0200
+--- misc/build/glibc-2.1.3/posix/readdir_r.c	2001-04-09 17:27:07.000000000 +0200
+***************
+*** 1 ****
+! dummy
+--- 1,56 ----
+! /* Copyright (C) 1991,92,93,94,95,96,97,98,99,2000 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 Library General Public License as
+!    published by the Free Software Foundation; either version 2 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
+!    Library General Public License for more details.
+! 
+!    You should have received a copy of the GNU Library General Public
+!    License along with the GNU C Library; see the file COPYING.LIB.  If not,
+!    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+!    Boston, MA 02111-1307, USA.  */
+! 
+! #include <errno.h>
+! #include <limits.h>
+! #include <stddef.h>
+! #include <string.h>
+! #include <dirent.h>
+! #include <unistd.h>
+! #include <sys/types.h>
+! #include <assert.h>
+! 
+! #ifndef __READDIR_R
+! # define __READDIR_R readdir_r
+! # define DIRENT_TYPE struct dirent
+! #endif
+! 
+! /* Read a directory entry from DIRP.  */
+! int
+! __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
+! {
+!   DIRENT_TYPE *dp;
+!   size_t reclen;
+! 
+!   errno = 0; 
+!   /* call our non-reentrant counterpart to get the information */
+!   dp = readdir(dirp);
+! 
+!   /* copy the result into entry */
+!   if (dp != NULL) {
+!     reclen = dp->d_reclen;           /* This might be NetBSD-specific 
+! 				      * Add #ifdef's if anything else needed */
+!     *result = memcpy(entry, dp, reclen); 
+!   } else {
+!     *result = NULL;
+!   }
+! 
+!   return dp != NULL ? 0 : errno ? errno : 0; 
+! }
+! 
+! 
Index: external/glibc/flist.cp
===================================================================
RCS file: external/glibc/flist.cp
diff -N external/glibc/flist.cp
--- external/glibc/flist.cp	18 Sep 2000 16:18:53 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-glibc-2.1.3/posix/getopt.c
-glibc-2.1.3/posix/getopt.h
-glibc-2.1.3/posix/getopt1.c
Index: external/glibc/flist.sd
===================================================================
RCS file: external/glibc/flist.sd
diff -N external/glibc/flist.sd
--- external/glibc/flist.sd	27 Aug 2001 19:46:51 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-config.h
-makefile.mk
-readdir_r.c
Index: external/glibc/makefile.mk
===================================================================
RCS file: /cvs/util/external/glibc/makefile.mk,v
retrieving revision 1.7
retrieving revision 1.7.30.1
diff -u -u -r1.7 -r1.7.30.1
--- external/glibc/makefile.mk	6 Sep 2005 14:21:33 -0000	1.7
+++ external/glibc/makefile.mk	11 Aug 2006 10:47:02 -0000	1.7.30.1
@@ -33,23 +33,32 @@
 #
 #*************************************************************************
 
-MAKEFILERC=yes
+PRJ=..
 
-.IF "$(USE_SHELL)" == "4nt"
-patchsuffix=btm
-.ELSE
-patchsuffix=sh
-.ENDIF
+PRJNAME=external
+TARGET=getopt
 
-ALL: patchinf \
-	ALLTAR
+# --- Settings -----------------------------------------------------
 
-patchinf:
-	@+glibcpatch.$(patchsuffix)
+.INCLUDE :	settings.mk
 
-clean:
-	@+rm -f patchinf
-	@+rm -f patcherror
+# --- Files --------------------------------------------------------
 
+TARFILE_NAME=glibc-2.1.3-stub
+TARFILE_ROOTDIR=glibc-2.1.3
+ADDITIONAL_FILES=posix$/makefile.mk posix$/config.h posix$/readdir_r.c
+
+PATCH_FILE_NAME=glibc-2.1.3.patch
+
+#CONFIGURE_DIR=glibc-2.1.3/posix
+CONFIGURE_ACTION=
+
+BUILD_DIR=posix
+BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : set_ext.mk
+.INCLUDE : target.mk
+.INCLUDE : tg_ext.mk
 
-.INCLUDE :  target.mk
Index: external/prj/build.lst
===================================================================
RCS file: /cvs/util/external/prj/build.lst,v
retrieving revision 1.12
retrieving revision 1.12.102.2
diff -u -u -r1.12 -r1.12.102.2
--- external/prj/build.lst	18 Jun 2003 12:44:11 -0000	1.12
+++ external/prj/build.lst	11 Aug 2006 10:58:09 -0000	1.12.102.2
@@ -1,9 +1,6 @@
-es      external :       soltools NULL
+es      external :       SO:external_so soltools NULL
 es	external					usr1 - all es_mkout NULL
-es	external\ado		nmake	-	w	es_ado NULL
+#es	external\ado		nmake	-	w	es_ado NULL
 es	external\glibc		nmake	-	all	es_glibc NULL
-es	external\glibc\rtufiles	nmake	-	all	es_glibcrtu es_glibc NULL
-es	external\gpc		nmake	-	u	es_gpc NULL
-es      external\gpc            nmake   -       w       es_gpc NULL
-es      external\w4w		nmake	-	u	es_w4w NULL
+es	external\gpc		nmake	-	all	es_gpc NULL
 es	external\gcc3_specific	nmake	-	u	es_gcc3 NULL
