From: Bruno Haible Date: Tue, 9 Sep 2025 10:42:20 +0000 (+0200) Subject: iconv_open: Remove support for OSF/1. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1dc3886a84de03f9abacf2db9af6f856336bace8;p=thirdparty%2Fgnulib.git iconv_open: Remove support for OSF/1. * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Remove code for OSF/1. * lib/iconv_open.c (ICONV_FLAVOR_OSF): Remove macro. (rpl_iconv_open): Update comments. * lib/iconv_open-osf.gperf: Remove file. * modules/iconv_open (Files): Remove it. (Makefile.am): Remove rule for $(srcdir)/iconv_open-osf.h. Update BUILT_SOURCES, MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST accordingly. --- diff --git a/ChangeLog b/ChangeLog index 173805876c..813afae1e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2025-09-09 Bruno Haible + iconv_open: Remove support for OSF/1. + * m4/iconv_open.m4 (gl_FUNC_ICONV_OPEN): Remove code for OSF/1. + * lib/iconv_open.c (ICONV_FLAVOR_OSF): Remove macro. + (rpl_iconv_open): Update comments. + * lib/iconv_open-osf.gperf: Remove file. + * modules/iconv_open (Files): Remove it. + (Makefile.am): Remove rule for $(srcdir)/iconv_open-osf.h. Update + BUILT_SOURCES, MOSTLYCLEANFILES, MAINTAINERCLEANFILES, EXTRA_DIST + accordingly. + getprogname: Remove support for OSF/1. * lib/getprogname.c: Remove code for OSF/1. diff --git a/lib/iconv_open-osf.gperf b/lib/iconv_open-osf.gperf deleted file mode 100644 index 4b60ce211b..0000000000 --- a/lib/iconv_open-osf.gperf +++ /dev/null @@ -1,66 +0,0 @@ -/* Character set conversion. - Copyright (C) 2007, 2020-2025 Free Software Foundation, Inc. - - This file is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - This file is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see . */ - -struct mapping { int standard_name; const char vendor_name[10 + 1]; }; -%struct-type -%language=ANSI-C -%define slot-name standard_name -%define hash-function-name mapping_hash -%define lookup-function-name mapping_lookup -%readonly-tables -%global-table -%define word-array-name mappings -%pic -%% -# On OSF/1 5.1, look in /usr/lib/nls/loc/iconv. -ISO-8859-1, "ISO8859-1" -ISO-8859-2, "ISO8859-2" -ISO-8859-3, "ISO8859-3" -ISO-8859-4, "ISO8859-4" -ISO-8859-5, "ISO8859-5" -ISO-8859-6, "ISO8859-6" -ISO-8859-7, "ISO8859-7" -ISO-8859-8, "ISO8859-8" -ISO-8859-9, "ISO8859-9" -ISO-8859-15, "ISO8859-15" -CP437, "cp437" -CP775, "cp775" -CP850, "cp850" -CP852, "cp852" -CP855, "cp855" -CP857, "cp857" -CP861, "cp861" -CP862, "cp862" -CP865, "cp865" -CP866, "cp866" -CP869, "cp869" -CP874, "cp874" -CP949, "KSC5601" -CP1250, "cp1250" -CP1251, "cp1251" -CP1252, "cp1252" -CP1253, "cp1253" -CP1254, "cp1254" -CP1255, "cp1255" -CP1256, "cp1256" -CP1257, "cp1257" -CP1258, "cp1258" -EUC-JP, "eucJP" -EUC-KR, "eucKR" -EUC-TW, "eucTW" -BIG5, "big5" -SHIFT_JIS, "SJIS" -TIS-620, "TACTIS" diff --git a/lib/iconv_open.c b/lib/iconv_open.c index fce216bec2..e7ad73c9ea 100644 --- a/lib/iconv_open.c +++ b/lib/iconv_open.c @@ -34,7 +34,6 @@ #define ICONV_FLAVOR_AIX "iconv_open-aix.h" #define ICONV_FLAVOR_HPUX "iconv_open-hpux.h" #define ICONV_FLAVOR_IRIX "iconv_open-irix.h" -#define ICONV_FLAVOR_OSF "iconv_open-osf.h" #define ICONV_FLAVOR_SOLARIS "iconv_open-solaris.h" #define ICONV_FLAVOR_ZOS "iconv_open-zos.h" @@ -53,8 +52,6 @@ rpl_iconv_open (const char *tocode, const char *fromcode) #if REPLACE_ICONV_UTF /* Special handling of conversion between UTF-8 and UTF-{16,32}{BE,LE}. - Do this here, before calling the real iconv_open(), because OSF/1 5.1 - iconv() to these encoding inserts a BOM, which is wrong. We do not need to handle conversion between arbitrary encodings and UTF-{16,32}{BE,LE}, because the 'striconveh' module implements two-step conversion through UTF-8. @@ -115,8 +112,7 @@ rpl_iconv_open (const char *tocode, const char *fromcode) } /* Convert the encodings to upper case, because - 1. in the arguments of iconv_open() on AIX, HP-UX, and OSF/1 the case - matters, + 1. in the arguments of iconv_open() on AIX and HP-UX, the case matters, 2. it makes searching in the table faster. */ { const char *p = fromcode; diff --git a/m4/iconv_open.m4 b/m4/iconv_open.m4 index f3cae88266..ccd010bf20 100644 --- a/m4/iconv_open.m4 +++ b/m4/iconv_open.m4 @@ -1,5 +1,5 @@ # iconv_open.m4 -# serial 17 +# serial 18 dnl Copyright (C) 2007-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -29,7 +29,6 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN], aix*) iconv_flavor=ICONV_FLAVOR_AIX ;; irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;; hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;; - osf*) iconv_flavor=ICONV_FLAVOR_OSF ;; solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;; openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;; esac diff --git a/modules/iconv_open b/modules/iconv_open index b3ed95c40f..fd10e01b0a 100644 --- a/modules/iconv_open +++ b/modules/iconv_open @@ -6,7 +6,6 @@ lib/iconv_open.c lib/iconv_open-aix.gperf lib/iconv_open-hpux.gperf lib/iconv_open-irix.gperf -lib/iconv_open-osf.gperf lib/iconv_open-solaris.gperf lib/iconv_open-zos.gperf lib/iconv.c @@ -56,12 +55,6 @@ $(srcdir)/iconv_open-irix.h: $(srcdir)/iconv_open-irix.gperf < $(srcdir)/iconv_open-irix.h-t1 > $(srcdir)/iconv_open-irix.h-t2 \ && rm -f $(srcdir)/iconv_open-irix.h-t1 \ && mv $(srcdir)/iconv_open-irix.h-t2 $(srcdir)/iconv_open-irix.h -$(srcdir)/iconv_open-osf.h: $(srcdir)/iconv_open-osf.gperf - $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > $(srcdir)/iconv_open-osf.h-t1 \ - && sed -e 's|\([ "]\)[^ "]*/iconv_open-osf\.gperf\([ "]\)|\1iconv_open-osf.gperf\2|' \ - < $(srcdir)/iconv_open-osf.h-t1 > $(srcdir)/iconv_open-osf.h-t2 \ - && rm -f $(srcdir)/iconv_open-osf.h-t1 \ - && mv $(srcdir)/iconv_open-osf.h-t2 $(srcdir)/iconv_open-osf.h $(srcdir)/iconv_open-solaris.h: $(srcdir)/iconv_open-solaris.gperf $(V_GPERF)$(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t1 \ && sed -e 's|\([ "]\)[^ "]*/iconv_open-solaris\.gperf\([ "]\)|\1iconv_open-solaris.gperf\2|' \ @@ -74,15 +67,14 @@ $(srcdir)/iconv_open-zos.h: $(srcdir)/iconv_open-zos.gperf < $(srcdir)/iconv_open-zos.h-t1 > $(srcdir)/iconv_open-zos.h-t2 \ && rm -f $(srcdir)/iconv_open-zos.h-t1 \ && mv $(srcdir)/iconv_open-zos.h-t2 $(srcdir)/iconv_open-zos.h -BUILT_SOURCES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h +BUILT_SOURCES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-solaris.h iconv_open-zos.h MOSTLYCLEANFILES += iconv_open-aix.h-t1 iconv_open-aix.h-t2 \ iconv_open-hpux.h-t1 iconv_open-hpux.h-t2 \ iconv_open-irix.h-t1 iconv_open-irix.h-t2 \ - iconv_open-osf.h-t1 iconv_open-osf.h-t2 \ iconv_open-solaris.h-t1 iconv_open-solaris.h-t2 \ iconv_open-zos.h-t1 iconv_open-zos.h-t2 -MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h -EXTRA_DIST += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h iconv_open-zos.h +MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-solaris.h iconv_open-zos.h +EXTRA_DIST += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-solaris.h iconv_open-zos.h Include: #if HAVE_ICONV