OSDN Git Service

ldd.host: Fix compilation for STANDALONE support
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 8 May 2012 19:22:51 +0000 (21:22 +0200)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 8 May 2012 19:22:51 +0000 (21:22 +0200)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
utils/Makefile.in
utils/porting.h

index cca2c58..bb85be3 100644 (file)
@@ -52,24 +52,24 @@ UTILS_CONFIG_FLAGS-$(LDSO_STANDALONE_SUPPORT) += -D__LDSO_STANDALONE_SUPPORT__
 
 BUILD_CFLAGS-utils := \
     -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
-    -DUCLIBC_LDSO=$(UCLIBC_LDSO) \
+    -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
     $(UTILS_CONFIG_FLAGS-y)
-BUILD_CFLAGS-ldconfig.host := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-ldconfig.host := \
                                -DBUILDING_LINKAGE \
                                -I$(top_srcdir)ldso/include
-BUILD_CFLAGS-ldd.host      := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-ldd.host      := \
                                -DBUILDING_LINKAGE \
                                -I$(top_srcdir)ldso/include \
                                -include $(top_srcdir)include/elf.h
-BUILD_CFLAGS-locale.host   := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-locale.host   := \
                                -DNOT_IN_libc \
                                -I$(top_srcdir)utils/ \
                                -I.
-BUILD_CFLAGS-iconv.host    := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-iconv.host    := \
                        -include $(top_builddir)extra/locale/c8tables.h \
                        -I$(top_srcdir)libc/misc/wchar -DL_iconv_main
 
-BUILD_CFLAGS-getconf.host  := $(BUILD_CFLAGS-utils) \
+BUILD_CFLAGS-getconf.host  := \
                                -DGETCONF_DIR='"$(CURDIR)"'
 
 # Rules
index d4ead17..f1fdc70 100644 (file)
 #include <dmalloc.h>
 #endif
 
+#ifndef ARRAY_SIZE
+# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+#endif
+
 /* For SunOS */
 #ifndef PATH_MAX
 #define PATH_MAX _POSIX_PATH_MAX