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 2008 by Sun Microsystems, Inc.
11 + * OpenOffice.org - a multi-platform office productivity suite
13 + * $RCSfile: glibc-2.1.3.patch,v $
16 + * This file is part of OpenOffice.org.
18 + * OpenOffice.org is free software: you can redistribute it and/or modify
19 + * it under the terms of the GNU Lesser General Public License version 3
20 + * only, as published by the Free Software Foundation.
22 + * OpenOffice.org is distributed in the hope that it will be useful,
23 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 + * GNU Lesser General Public License version 3 for more details
26 + * (a copy is included in the LICENSE file that accompanied this code).
28 + * You should have received a copy of the GNU Lesser General Public License
29 + * version 3 along with OpenOffice.org. If not, see
30 + * <http://www.openoffice.org/license.html>
31 + * for a copy of the LGPLv3 License.
33 + ************************************************************************/
37 +#define getenv getenv
42 +//Workaround for MACOS
43 +#define getopt my_neues_getopt
44 +#define opterr my_neues_opterr
45 +#define optind my_neues_optind
46 +#define optopt my_neues_optopt
50 --- misc/glibc-2.1.3/posix/getopt.h Sun Aug 27 16:11:33 2000
51 +++ misc/build/glibc-2.1.3/posix/getopt.h Mon Mar 31 09:42:01 2008
53 # endif /* __GNU_LIBRARY__ */
55 # ifndef __need_getopt
57 +extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts,
58 + const struct option *__longopts, int *__longind);
59 +extern int getopt_long_only (int ___argc, char *const *___argv,
60 + const char *__shortopts,
61 + const struct option *__longopts, int *__longind);
63 +/* Internal only. Users should not call this directly. */
64 +extern int _getopt_internal (int ___argc, char *const *___argv,
65 + const char *__shortopts,
66 + const struct option *__longopts, int *__longind,
69 extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
70 const struct option *__longopts, int *__longind);
71 extern int getopt_long_only (int __argc, char *const *__argv,
73 const char *__shortopts,
74 const struct option *__longopts, int *__longind,
78 #else /* not __STDC__ */
80 --- misc/glibc-2.1.3/posix/makefile.mk Mon Mar 31 09:43:50 2008
81 +++ misc/build/glibc-2.1.3/posix/makefile.mk Mon Mar 31 09:43:38 2008
84 +#*************************************************************************
86 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
88 +# Copyright 2008 by Sun Microsystems, Inc.
90 +# OpenOffice.org - a multi-platform office productivity suite
92 +# $RCSfile: glibc-2.1.3.patch,v $
96 +# This file is part of OpenOffice.org.
98 +# OpenOffice.org is free software: you can redistribute it and/or modify
99 +# it under the terms of the GNU Lesser General Public License version 3
100 +# only, as published by the Free Software Foundation.
102 +# OpenOffice.org is distributed in the hope that it will be useful,
103 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
104 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
105 +# GNU Lesser General Public License version 3 for more details
106 +# (a copy is included in the LICENSE file that accompanied this code).
108 +# You should have received a copy of the GNU Lesser General Public License
109 +# version 3 along with OpenOffice.org. If not, see
110 +# <http://www.openoffice.org/license.html>
111 +# for a copy of the LGPLv3 License.
113 +#*************************************************************************
115 +PRJ=..$/..$/..$/..$/..
121 +EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
125 +# --- Settings -----------------------------------------------------
127 +.INCLUDE : settings.mk
129 +CDEFS+=-DHAVE_STRING_H -DHAVE_CONFIG_H
131 +# --- Files --------------------------------------------------------
133 +OBJFILES= $(OBJ)$/getopt.obj \
134 + $(OBJ)$/getopt1.obj
136 +LIB1TARGET=$(SLB)$/$(TARGET).lib
137 +LIB1ARCHIV=$(LB)$/lib$(TARGET).a
138 +LIB1OBJFILES=$(OBJFILES)
140 +.IF "$(OS)"=="NETBSD"
141 +TARGET2=gnu_readdir_r
142 +OBJFILES+= $(OBJ)$/readdir_r.obj
143 +LIB2TARGET=$(SLB)$/$(TARGET2).lib
144 +LIB2ARCHIV=$(LB)$/lib$(TARGET2).a
145 +LIB2OBJFILES= $(OBJ)$/readdir_r.obj
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;