]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
iconv_open: Remove support for OSF/1.
authorBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:42:20 +0000 (12:42 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 9 Sep 2025 10:42:20 +0000 (12:42 +0200)
* 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.

ChangeLog
lib/iconv_open-osf.gperf [deleted file]
lib/iconv_open.c
m4/iconv_open.m4
modules/iconv_open

index 173805876c2b82162a7a8c86ceeaa937873c2ea7..813afae1e306c3f5dc51a148ecf23ac4e4c9601b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2025-09-09  Bruno Haible  <bruno@clisp.org>
 
+       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 (file)
index 4b60ce2..0000000
+++ /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 <https://www.gnu.org/licenses/>.  */
-
-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"
index fce216bec2e70ec8c2c74ebb3e2a4088ddb68142..e7ad73c9ea423ad9023be8fef4cd92c20370e849 100644 (file)
@@ -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;
index f3cae882661e0e9da423b238e992ce515d734a1d..ccd010bf200c13109ade026ba94cb9edf44c9c87 100644 (file)
@@ -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
index b3ed95c40f7a914817885fa5c1ffb3993e8dddb3..fd10e01b0a156c2b59fa2d8a0a9cec9110812ecf 100644 (file)
@@ -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