Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



On Mon, Jan 05, 2009 at 06:11:43AM +0000, Takehiko NOZAKI wrote:
> 
> Module Name:  src
> Committed By: tnozaki
> Date:         Mon Jan  5 06:11:43 UTC 2009
> 
> Modified Files:
>       src/lib/libc/locale: fix_grouping.c iswctype_sb.c rune.h
>       src/lib/libc/stdio: fparseln.c
>       src/lib/libc/string: wcscmp.c wcsncmp.c wmemcmp.c
>       src/tools/compat: configure configure.ac nbtool_config.h.in
>       src/usr.bin/mklocale: Makefile lex.l yacc.y
> Added Files:
>       src/lib/libc/locale: runetype_local.h
> Removed Files:
>       src/lib/libc/locale: runetype.h
> 
> Log Message:
> 
> 2. reworking cross build breakage under FreeBSD/MacOS X.
> FreeBSD/MacOS X still have public /usr/include/runetype.h
> derived from 4.4BSD-Lite.  so i renamed out private header from
> src/lib/libc/locale/runetype.h to src/lib/libc/locale/runetype_local.h
> to solve this problems.

The build of the tools is still broken on OS X 10.4.11 as follows:

---- cut here ----
    compile  mklocale/mklocaledb.lo
/Volumes/NetBSD-current/src/tools/mklocale/../../usr.bin/mklocale/mklocaledb.c: 
In function 'mklocaledb':
/Volumes/NetBSD-current/src/tools/mklocale/../../usr.bin/mklocale/mklocaledb.c:261:
 error: 'FPARSELN_UNESCALL' undeclared (first use in this function)
/Volumes/NetBSD-current/src/tools/mklocale/../../usr.bin/mklocale/mklocaledb.c:261:
 error: (Each undeclared identifier is reported only once
/Volumes/NetBSD-current/src/tools/mklocale/../../usr.bin/mklocale/mklocaledb.c:261:
 error: for each function it appears in.)
/Volumes/NetBSD-current/src/tools/mklocale/../../usr.bin/mklocale/mklocaledb.c:261:
 warning: assignment makes pointer from integer without a cast

*** Failed target:  mklocaledb.lo
*** Failed command: cc -O -no-cpp-precomp 
-I/Users/jmmv/Projects/NetBSD/obj.amd64/Volumes/NetBSD-current/src/tools/compat 
-I/Users/jmmv/Projects/NetBSD/obj.amd64/Volumes/NetBSD-current/src/tools/compat/include
 -I/Volumes/NetBSD-current/src/tools/mklocale/../compat 
-DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -I. 
-I/Volumes/NetBSD-current/src/tools/mklocale/../../usr.bin/mklocale 
-I/Volumes/NetBSD-current/src/lib/libc/include 
-I/Volumes/NetBSD-current/src/lib/libc/locale 
-I/Volumes/NetBSD-current/src/lib/libc/citrus -DNBCHAR_MAX=127 -DHOSTPROG -c -o 
mklocaledb.lo.o 
/Volumes/NetBSD-current/src/tools/mklocale/../../usr.bin/mklocale/mklocaledb.c
*** Error code 1

Stop.
nbmake: stopped in /Volumes/NetBSD-current/src/tools/mklocale

*** Failed target:  dependall
*** Failed command: cd /Volumes/NetBSD-current/src/tools/mklocale; 
/Users/jmmv/Projects/NetBSD/tools.amd64/bin/nbmake realall
*** Error code 1

Stop.
nbmake: stopped in /Volumes/NetBSD-current/src/tools/mklocale
---- cut here ----

I've been able to make it work with the following patch:

---- cut here ----
Index: tools/compat/compat_defs.h
===================================================================
RCS file: /cvsroot/src/tools/compat/compat_defs.h,v
retrieving revision 1.67
diff -u -p -r1.67 compat_defs.h
--- tools/compat/compat_defs.h  20 Oct 2008 10:28:38 -0000      1.67
+++ tools/compat/compat_defs.h  5 Jan 2009 08:39:16 -0000
@@ -258,7 +258,7 @@ char *fgetln(FILE *, size_t *);
 int flock(int, int);
 #endif
 
-#if !HAVE_FPARSELN || defined(__NetBSD__)
+#if !HAVE_FPARSELN || BROKEN_FPARSELN || defined(__NetBSD__)
 # define FPARSELN_UNESCESC     0x01
 # define FPARSELN_UNESCCONT    0x02
 # define FPARSELN_UNESCCOMM    0x04
Index: tools/compat/fparseln.c
===================================================================
RCS file: tools/compat/fparseln.c
diff -N tools/compat/fparseln.c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ tools/compat/fparseln.c     5 Jan 2009 08:39:16 -0000
@@ -0,0 +1,36 @@
+/*     $NetBSD$        */
+
+/*-
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Julio M. Merino Vidal.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
+#include "../../lib/libc/stdio/fparseln.c"
---- cut here ----

But still, with this patch, I get the following warning during link time.
The cross-mklocale tool still seems to work, though.

---- cut here ----
       link  mklocale/mklocale
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: warning multiple definitions of 
symbol ___fix_locale_grouping_str
fix_grouping.lo definition of ___fix_locale_grouping_str in section 
(__TEXT,__text)
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libSystem.dylib(fix_grouping.So) 
definition of ___fix_locale_grouping_str
---- cut here ----

Is the patch correct?

-- 
Julio M. Merino Vidal <jmmv%NetBSD.org@localhost>


Home | Main Index | Thread Index | Old Index