RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Ralf S. Engelschall
Root: /v/rpm/cvs Email: rse@rpm5.org
Module: rpm Date: 21-Jan-2008 16:32:54
Branch: HEAD Handle: 2008012115325301
Modified files:
rpm CHANGES configure.ac
rpm/rpmio strtolocale.c
Log:
Allow to compile without <langinfo.h> and its nl_langinfo(3)
Summary:
Revision Changes Path
1.2085 +1 -0 rpm/CHANGES
2.280 +1 -0 rpm/configure.ac
1.7 +6 -0 rpm/rpmio/strtolocale.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2084 -r1.2085 CHANGES
--- rpm/CHANGES 20 Jan 2008 11:29:49 -0000 1.2084
+++ rpm/CHANGES 21 Jan 2008 15:32:53 -0000 1.2085
@@ -1,4 +1,5 @@
5.0.0 -> 5.1a1:
+ - rse: allow to compile without <langinfo.h> and its nl_langinfo(3)
- rse: provide RPM Lua function posix.glob(<pattern>)
- rse: make older C compiler happy by not declaring a variable in the middle of a block in rpmconstant/constant.c
- rse: let RPM Lua init procedure load all init scripts configured with new Autoconf option --with-path-rpmlua
@@ .
patch -p0 <<'@@ .'
Index: rpm/configure.ac
============================================================================
$ cvs diff -u -r2.279 -r2.280 configure.ac
--- rpm/configure.ac 20 Jan 2008 11:13:41 -0000 2.279
+++ rpm/configure.ac 21 Jan 2008 15:32:53 -0000 2.280
@@ -537,6 +537,7 @@
sys/param.h sys/mount.h sys/mntctl.h sys/vmount.h dnl
libio.h err.h mcheck.h limits.h libgen.h float.h dnl
glob.h poll.h netinet/in.h arpa/inet.h stdint.h inttypes.h dnl
+ langinfo.h dnl
])
dnl # GNU gettext support
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/strtolocale.c
============================================================================
$ cvs diff -u -r1.6 -r1.7 strtolocale.c
--- rpm/rpmio/strtolocale.c 16 Jul 2007 07:16:57 -0000 1.6
+++ rpm/rpmio/strtolocale.c 21 Jan 2008 15:32:54 -0000 1.7
@@ -3,7 +3,9 @@
*/
#include "system.h"
+#ifdef HAVE_LANGINFO_H
#include <langinfo.h>
+#endif
#ifdef HAVE_ICONV
#include <iconv.h>
#endif
@@ -24,7 +26,11 @@
const char *src;
if (locale_encoding == NULL) {
+#ifdef HAVE_LANGINFO_H
const char *encoding = nl_langinfo(CODESET);
+#else
+ const char *encoding = "char";
+#endif
locale_encoding = xmalloc(strlen(encoding) + 11);
sprintf(locale_encoding, "%s//TRANSLIT", encoding);
locale_encoding_is_utf8 = strcasecmp(encoding, "UTF-8") == 0;
@@ .
Received on Mon Jan 21 16:32:54 2008