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 # endif /* __GNU_LIBRARY__ */
52 # ifndef __need_getopt
54 +extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts,
55 + const struct option *__longopts, int *__longind);
56 +extern int getopt_long_only (int ___argc, char *const *___argv,
57 + const char *__shortopts,
58 + const struct option *__longopts, int *__longind);
60 +/* Internal only. Users should not call this directly. */
61 +extern int _getopt_internal (int ___argc, char *const *___argv,
62 + const char *__shortopts,
63 + const struct option *__longopts, int *__longind,
66 extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
67 const struct option *__longopts, int *__longind);
68 extern int getopt_long_only (int __argc, char *const *__argv,
70 const char *__shortopts,
71 const struct option *__longopts, int *__longind,
75 #else /* not __STDC__ */
77 --- misc/glibc-2.1.3/posix/makefile.mk Mon Mar 31 09:43:50 2008
78 +++ misc/build/glibc-2.1.3/posix/makefile.mk Mon Mar 31 09:43:38 2008
81 +#*************************************************************************
83 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
85 +# Copyright 2000, 2010 Oracle and/or its affiliates.
87 +# OpenOffice.org - a multi-platform office productivity suite
89 +# This file is part of OpenOffice.org.
91 +# OpenOffice.org is free software: you can redistribute it and/or modify
92 +# it under the terms of the GNU Lesser General Public License version 3
93 +# only, as published by the Free Software Foundation.
95 +# OpenOffice.org is distributed in the hope that it will be useful,
96 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
97 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
98 +# GNU Lesser General Public License version 3 for more details
99 +# (a copy is included in the LICENSE file that accompanied this code).
101 +# You should have received a copy of the GNU Lesser General Public License
102 +# version 3 along with OpenOffice.org. If not, see
103 +# <http://www.openoffice.org/license.html>
104 +# for a copy of the LGPLv3 License.
106 +#*************************************************************************
108 +PRJ=..$/..$/..$/..$/..
114 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
118 +# --- Settings -----------------------------------------------------
120 +.INCLUDE : settings.mk
122 +CDEFS+=-DHAVE_STRING_H -DHAVE_CONFIG_H
124 +# --- Files --------------------------------------------------------
126 +.IF "$(HAVE_GETOPT)" != "YES"
127 +OBJFILES= $(OBJ)$/getopt.obj \
128 + $(OBJ)$/getopt1.obj
130 +LIB1TARGET=$(SLB)$/$(TARGET).lib
131 +LIB1ARCHIV=$(LB)$/lib$(TARGET).a
132 +LIB1OBJFILES=$(OBJFILES)
135 +.IF "$(HAVE_READDIR_R)" != "YES" && "$(OS)" != "WNT"
136 +TARGET2=gnu_readdir_r
137 +OBJFILES+= $(OBJ)$/readdir_r.obj
138 +LIB2TARGET=$(SLB)$/$(TARGET2).lib
139 +LIB2ARCHIV=$(LB)$/lib$(TARGET2).a
140 +LIB2OBJFILES= $(OBJ)$/readdir_r.obj
143 +.IF "$(HAVE_READDIR_R)" == "YES" && "$(HAVE_GETOPT)" == "YES"
145 + @echo "Nothing to do here.
148 +# --- Targets ------------------------------------------------------
150 +.INCLUDE : target.mk
151 --- misc/glibc-2.1.3/posix/readdir_r.c Mon Mar 31 09:43:50 2008
152 +++ misc/build/glibc-2.1.3/posix/readdir_r.c Mon Mar 31 09:42:01 2008
155 +/* Copyright (C) 1991,92,93,94,95,96,97,98,99,2000 Free Software Foundation, Inc.
156 + This file is part of the GNU C Library.
158 + The GNU C Library is free software; you can redistribute it and/or
159 + modify it under the terms of the GNU Library General Public License as
160 + published by the Free Software Foundation; either version 2 of the
161 + License, or (at your option) any later version.
163 + The GNU C Library is distributed in the hope that it will be useful,
164 + but WITHOUT ANY WARRANTY; without even the implied warranty of
165 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
166 + Library General Public License for more details.
168 + You should have received a copy of the GNU Library General Public
169 + License along with the GNU C Library; see the file COPYING.LIB. If not,
170 + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
171 + Boston, MA 02111-1307, USA. */
179 +#include <sys/types.h>
183 +# define __READDIR_R readdir_r
184 +# define DIRENT_TYPE struct dirent
187 +/* Read a directory entry from DIRP. */
189 +__READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
195 + /* call our non-reentrant counterpart to get the information */
196 + dp = readdir(dirp);
198 + /* copy the result into entry */
200 + reclen = dp->d_reclen; /* This might be NetBSD-specific
201 + * Add #ifdef's if anything else needed */
202 + *result = memcpy(entry, dp, reclen);
207 + return dp != NULL ? 0 : errno ? errno : 0;