1 --- misc/glibc-2.1.3/posix/config.h Mon Mar 31 09:43:50 2008
2 +++ misc/build/glibc-2.1.3/posix/config.h Mon Mar 31 09:43:26 2008
5 +/*************************************************************************
7 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9 + * Copyright 2000, 2010 Oracle and/or its affiliates.
11 + * OpenOffice.org - a multi-platform office productivity suite
13 + * This file is part of OpenOffice.org.
15 + * OpenOffice.org is free software: you can redistribute it and/or modify
16 + * it under the terms of the GNU Lesser General Public License version 3
17 + * only, as published by the Free Software Foundation.
19 + * OpenOffice.org is distributed in the hope that it will be useful,
20 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 + * GNU Lesser General Public License version 3 for more details
23 + * (a copy is included in the LICENSE file that accompanied this code).
25 + * You should have received a copy of the GNU Lesser General Public License
26 + * version 3 along with OpenOffice.org. If not, see
27 + * <http://www.openoffice.org/license.html>
28 + * for a copy of the LGPLv3 License.
30 + ************************************************************************/
34 +#define getenv getenv
39 +//Workaround for MACOS
40 +#define getopt my_neues_getopt
41 +#define opterr my_neues_opterr
42 +#define optind my_neues_optind
43 +#define optopt my_neues_optopt
47 --- misc/glibc-2.1.3/posix/getopt.h Sun Aug 27 16:11:33 2000
48 +++ misc/build/glibc-2.1.3/posix/getopt.h Mon Mar 31 09:42:01 2008
50 /* Many other libraries have conflicting prototypes for getopt, with
51 differences in the consts, in stdlib.h. To avoid compilation
52 errors, only prototype getopt for the GNU C library. */
53 -extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
54 +extern int getopt (int argc, char *const *argv, const char *shortopts);
55 # else /* not __GNU_LIBRARY__ */
57 # endif /* __GNU_LIBRARY__ */
59 # endif /* __GNU_LIBRARY__ */
61 # ifndef __need_getopt
62 -extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
63 +extern int getopt_long (int argc, char *const *argv, const char *shortopts,
64 const struct option *__longopts, int *__longind);
65 -extern int getopt_long_only (int __argc, char *const *__argv,
66 +extern int getopt_long_only (int argc, char *const *argv,
67 const char *__shortopts,
68 const struct option *__longopts, int *__longind);
70 /* Internal only. Users should not call this directly. */
71 -extern int _getopt_internal (int __argc, char *const *__argv,
72 +extern int _getopt_internal (int argc, char *const *argv,
73 const char *__shortopts,
74 const struct option *__longopts, int *__longind,
76 --- misc/glibc-2.1.3/posix/makefile.mk Mon Mar 31 09:43:50 2008
77 +++ misc/build/glibc-2.1.3/posix/makefile.mk Mon Mar 31 09:43:38 2008
80 +#*************************************************************************
82 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
84 +# Copyright 2000, 2010 Oracle and/or its affiliates.
86 +# OpenOffice.org - a multi-platform office productivity suite
88 +# This file is part of OpenOffice.org.
90 +# OpenOffice.org is free software: you can redistribute it and/or modify
91 +# it under the terms of the GNU Lesser General Public License version 3
92 +# only, as published by the Free Software Foundation.
94 +# OpenOffice.org is distributed in the hope that it will be useful,
95 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
96 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
97 +# GNU Lesser General Public License version 3 for more details
98 +# (a copy is included in the LICENSE file that accompanied this code).
100 +# You should have received a copy of the GNU Lesser General Public License
101 +# version 3 along with OpenOffice.org. If not, see
102 +# <http://www.openoffice.org/license.html>
103 +# for a copy of the LGPLv3 License.
105 +#*************************************************************************
107 +PRJ=..$/..$/..$/..$/..
113 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
117 +# --- Settings -----------------------------------------------------
119 +.INCLUDE : settings.mk
121 +CDEFS+=-DHAVE_STRING_H -DHAVE_CONFIG_H
123 +# --- Files --------------------------------------------------------
125 +.IF "$(HAVE_GETOPT)" != "YES"
126 +OBJFILES= $(OBJ)$/getopt.obj \
127 + $(OBJ)$/getopt1.obj
129 +LIB1TARGET=$(SLB)$/$(TARGET).lib
130 +LIB1ARCHIV=$(LB)$/lib$(TARGET).a
131 +LIB1OBJFILES=$(OBJFILES)
134 +.IF "$(HAVE_READDIR_R)" != "YES" && "$(OS)" != "WNT"
135 +TARGET2=gnu_readdir_r
136 +OBJFILES+= $(OBJ)$/readdir_r.obj
137 +LIB2TARGET=$(SLB)$/$(TARGET2).lib
138 +LIB2ARCHIV=$(LB)$/lib$(TARGET2).a
139 +LIB2OBJFILES= $(OBJ)$/readdir_r.obj
142 +.IF "$(HAVE_READDIR_R)" == "YES" && "$(HAVE_GETOPT)" == "YES"
144 + @echo "Nothing to do here.
147 +# --- Targets ------------------------------------------------------
149 +.INCLUDE : target.mk
150 --- misc/glibc-2.1.3/posix/readdir_r.c Mon Mar 31 09:43:50 2008
151 +++ misc/build/glibc-2.1.3/posix/readdir_r.c Mon Mar 31 09:42:01 2008
154 +/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
155 + This file is part of the GNU C Library.
157 + The GNU C Library is free software; you can redistribute it and/or
158 + modify it under the terms of the GNU Library General Public License as
159 + published by the Free Software Foundation; either version 2 of the
160 + License, or (at your option) any later version.
162 + The GNU C Library is distributed in the hope that it will be useful,
163 + but WITHOUT ANY WARRANTY; without even the implied warranty of
164 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
165 + Library General Public License for more details.
167 + You should have received a copy of the GNU Library General Public
168 + License along with the GNU C Library; see the file COPYING.LIB. If not,
169 + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
170 + Boston, MA 02111-1307, USA. */
178 +#include <sys/types.h>
182 +# define __READDIR_R readdir_r
183 +# define DIRENT_TYPE struct dirent
186 +/* Read a directory entry from DIRP. */
188 +__READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
194 + /* call our non-reentrant counterpart to get the information */
195 + dp = readdir(dirp);
197 + /* copy the result into entry */
199 + reclen = dp->d_reclen; /* This might be NetBSD-specific
200 + * Add #ifdef's if anything else needed */
201 + *result = memcpy(entry, dp, reclen);
206 + return dp != NULL ? 0 : errno ? errno : 0;