summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-11-17 09:18:11 -0800
committerPetr Baudis <pasky@ucw.cz>2009-11-18 10:09:03 +0100
commitc086031db01cc10bafe55864b1185c111a30198e (patch)
treedac400906810e634fec4779352035aff9945ff1d /locale
parent22bdb3aa5b2cd760fd3bf1ee6c46c61e23457876 (diff)
downloadglibc-c086031db01cc10bafe55864b1185c111a30198e.tar.gz
glibc-c086031db01cc10bafe55864b1185c111a30198e.tar.xz
glibc-c086031db01cc10bafe55864b1185c111a30198e.zip
Fix _NC_LOCALE_NAME definition.
(cherry picked from commit 4fb9241e4edbe238de8ba251f4448e31e8b1baf4)
Diffstat (limited to 'locale')
-rw-r--r--locale/Makefile6
-rw-r--r--locale/langinfo.h3
2 files changed, 5 insertions, 4 deletions
diff --git a/locale/Makefile b/locale/Makefile
index d9ab1947e7..2d645daa2f 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,1992,1995-2003,2005 Free Software Foundation, Inc.
+# Copyright (C) 1991,1992,1995-2003,2005,2009 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@ distribute	= localeinfo.h categories.def iso-639.def iso-3166.def \
 routines	= setlocale findlocale loadlocale loadarchive \
 		  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
 		  newlocale duplocale freelocale uselocale
-tests		= tst-C-locale
+tests		= tst-C-locale tst-locname
 categories	= ctype messages monetary numeric time paper name \
 		  address telephone measurement identification collate
 aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
@@ -104,7 +104,7 @@ CFLAGS-charmap-dir.c = -Wno-write-strings
 
 # This makes sure -DNOT_IN_libc is passed for all these modules.
 cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
-			        $(locale-modules) $(lib-modules))
+				$(locale-modules) $(lib-modules))
 lib := nonlib
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
diff --git a/locale/langinfo.h b/locale/langinfo.h
index c940c743aa..0a53365071 100644
--- a/locale/langinfo.h
+++ b/locale/langinfo.h
@@ -568,7 +568,8 @@ enum
 
 /* This macro produces an item you can pass to `nl_langinfo' or
    `nl_langinfo_l' to get the name of the locale in use for CATEGORY.  */
-#define _NL_LOCALE_NAME(category)	_NL_ITEM ((category), -1)
+#define _NL_LOCALE_NAME(category)	_NL_ITEM ((category),		      \
+						  _NL_ITEM_INDEX (-1))
 #ifdef __USE_GNU
 # define NL_LOCALE_NAME(category)	_NL_LOCALE_NAME (category)
 #endif