Compare commits

...

1 Commits

Author SHA1 Message Date
cc6f54699f build mac-arm 2023-06-02 14:58:33 +08:00
53 changed files with 49971 additions and 0 deletions

253
Makefile Normal file
View File

@ -0,0 +1,253 @@
# Makefile for libiconv
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = .
# Directories used by "make install":
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
local_prefix = /usr/local
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
mandir = ${datarootdir}/man
# Programs used by "make":
RM = rm -f
# Programs used by "make install":
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ./build-aux/mkinstalldirs
#### End of system configuration section. ####
SHELL = /bin/sh
all : lib/localcharset.h force
cd lib && $(MAKE) all
cd srclib && $(MAKE) all
cd src && $(MAKE) all
cd po && $(MAKE) all
cd man && $(MAKE) all
if test -d tests; then cd tests && $(MAKE) all; fi
lib/localcharset.h :
builddir="`pwd`"; cd libcharset && $(MAKE) all && $(MAKE) install-lib libdir="$$builddir/lib" includedir="$$builddir/lib"
# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
cd lib && $(MAKE) install-lib libdir='$(libdir)' includedir='$(includedir)'
if [ ! -d $(includedir) ] ; then $(mkinstalldirs) $(includedir) ; fi
$(INSTALL_DATA) include/iconv.h.inst $(includedir)/iconv.h
install : lib/localcharset.h force
cd libcharset && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
$(INSTALL_DATA) include/iconv.h.inst $(DESTDIR)$(includedir)/iconv.h
cd po && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
install-strip : lib/localcharset.h force
cd libcharset && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
$(INSTALL_DATA) include/iconv.h.inst $(DESTDIR)$(includedir)/iconv.h
cd po && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) install-strip prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
installdirs : force
cd libcharset && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
if [ ! -d $(DESTDIR)$(includedir) ] ; then $(mkinstalldirs) $(DESTDIR)$(includedir) ; fi
cd po && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
uninstall : force
cd libcharset && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd lib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd srclib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
cd src && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
$(RM) $(DESTDIR)$(includedir)/iconv.h
cd po && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)'
cd man && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' datarootdir='$(datarootdir)' datadir='$(datadir)' mandir='$(mandir)'
check : all force
cd libcharset && $(MAKE) check
cd lib && $(MAKE) check
cd srclib && $(MAKE) check
cd src && $(MAKE) check
cd po && $(MAKE) check
cd man && $(MAKE) check
if test -d tests; then cd tests && $(MAKE) check; fi
mostlyclean : force
cd libcharset && $(MAKE) mostlyclean
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && $(MAKE) mostlyclean
cd srclib && $(MAKE) mostlyclean
cd src && $(MAKE) mostlyclean
cd po && $(MAKE) mostlyclean
cd man && $(MAKE) mostlyclean
if test -d tests; then cd tests && $(MAKE) mostlyclean; fi
rm -rf bin
clean : force
cd libcharset && $(MAKE) clean
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && $(MAKE) clean
cd srclib && $(MAKE) clean
cd src && $(MAKE) clean
cd po && $(MAKE) clean
cd man && $(MAKE) clean
if test -d tests; then cd tests && $(MAKE) clean; fi
rm -rf bin
distclean : force
cd libcharset && if test -f Makefile; then $(MAKE) distclean; fi
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && if test -f Makefile; then $(MAKE) distclean; fi
cd srclib && if test -f Makefile; then $(MAKE) distclean; fi
cd src && if test -f Makefile; then $(MAKE) distclean; fi
cd po && if test -f Makefile; then $(MAKE) distclean; fi
cd man && if test -f Makefile; then $(MAKE) distclean; fi
if test -d tests; then cd tests && if test -f Makefile; then $(MAKE) distclean; fi; fi
$(RM) config.status config.log config.cache Makefile libtool
$(RM) config.h stamp-h1 lib/stamp-h2
$(RM) include/iconv.h include/iconv.h.inst
rm -rf bin
maintainer-clean : force
cd libcharset && if test -f Makefile; then $(MAKE) maintainer-clean; fi
$(RM) lib/libcharset.* lib/localcharset.h
cd lib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd srclib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd src && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd po && if test -f Makefile; then $(MAKE) maintainer-clean; fi
cd man && if test -f Makefile; then $(MAKE) maintainer-clean; fi
if test -d tests; then cd tests && if test -f Makefile; then $(MAKE) maintainer-clean; fi; fi
$(RM) config.status config.log config.cache Makefile libtool
$(RM) config.h stamp-h1 lib/stamp-h2
$(RM) include/iconv.h include/iconv.h.inst
rm -rf bin
# List of source files.
SOURCE_FILES = \
README DEPENDENCIES INSTALL.windows HACKING AUTHORS NEWS DESIGN NOTES THANKS \
ChangeLog Makefile.devel configure.ac Makefile.in \
include/export.h include/iconv.h.in \
gnulib-local/lib/alloca.in.h \
gnulib-local/lib/error.h.diff \
gnulib-local/lib/progname.h.diff \
gnulib-local/lib/xalloc.h \
gnulib-local/lib/xmalloc.c \
gnulib-local/lib/xstrdup.c \
gnulib-local/m4/alloca.m4 \
gnulib-local/modules/libiconv-misc \
gnulib-local/modules/mbstate \
gnulib-local/modules/xalloc \
m4/cp.m4 \
m4/eilseq.m4 \
m4/general.m4 \
m4/ln.m4 \
m4/proto.m4 \
windows/iconv.rc windows/libiconv.rc windows/windres-options \
woe32dll/export.h woe32dll/iconv-exports.c \
os2/iconv.def \
extras/ChangeLog extras/iconv_string.h extras/iconv_string.c \
tools/Makefile \
tools/8bit_tab_to_h.c tools/cjk_tab_to_h.c tools/cjk_variants.c \
tools/CP50221-0208-EXT.TXT tools/CP50221-0212-EXT.TXT tools/JISX0213.TXT
# List of distributed files imported from other packages.
LIBTOOL_IMPORTED_FILES = \
build-aux/ltmain.sh \
m4/libtool.m4 \
m4/lt~obsolete.m4 \
m4/ltoptions.m4 \
m4/ltsugar.m4 \
m4/ltversion.m4
AUTOMAKE_OLD_IMPORTED_FILES = \
build-aux/mkinstalldirs
AUTOMAKE_IMPORTED_FILES = \
build-aux/install-sh \
build-aux/missing
GNULIB_IMPORTED_FILES = \
doc/relocatable.texi \
build-aux/config.guess \
build-aux/config.libpath \
build-aux/config.rpath \
build-aux/config.sub \
build-aux/install-reloc \
build-aux/reloc-ldflags
IMPORTED_FILES = \
COPYING COPYING.LIB \
ABOUT-NLS INSTALL.generic \
build-aux/compile \
build-aux/ar-lib \
$(LIBTOOL_IMPORTED_FILES) $(AUTOMAKE_OLD_IMPORTED_FILES) $(AUTOMAKE_IMPORTED_FILES) $(GNULIB_IMPORTED_FILES)
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = \
aclocal.m4 configure config.h.in \
include/iconv.h.build.in
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
destdir=`echo '$(distdir)'/$$file | sed -e 's|//*[^/]*$$||'`; \
test -d "$$destdir" || $(mkinstalldirs) "$$destdir" >/dev/null; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
for sdir in srcm4; do \
mkdir -p '$(distdir)'/$$sdir; \
for file in '$(srcdir)'/$$sdir/*.m4; do \
cp -p "$$file" '$(distdir)'/$$sdir/ || exit 1; \
done; \
done
test -d '$(distdir)'/libcharset || mkdir '$(distdir)'/libcharset; cd libcharset && $(MAKE) distdir distdir='$(distdir)'/libcharset
test -d '$(distdir)'/lib || mkdir '$(distdir)'/lib; cd lib && $(MAKE) distdir distdir='$(distdir)'/lib
test -d '$(distdir)'/srclib || mkdir '$(distdir)'/srclib; cd srclib && $(MAKE) distdir distdir='$(distdir)'/srclib
test -d '$(distdir)'/src || mkdir '$(distdir)'/src; cd src && $(MAKE) distdir distdir='$(distdir)'/src
test -d '$(distdir)'/tests || mkdir '$(distdir)'/tests; cd tests && $(MAKE) distdir distdir='$(distdir)'/tests
test -d '$(distdir)'/po || mkdir '$(distdir)'/po; cd po && $(MAKE) distdir distdir='$(distdir)'/po
test -d '$(distdir)'/man || mkdir '$(distdir)'/man; cd man && $(MAKE) distdir distdir='$(distdir)'/man
# Creating a distribution tarball.
PACKAGE = libiconv
VERSION = 1.17
TAR = tar
GZIP = gzip
dist : force
tmpdistdir=$(PACKAGE)-$(VERSION); \
abstmpdistdir=`pwd`/$$tmpdistdir; \
rm -rf $$tmpdistdir $$tmpdistdir.tar $$tmpdistdir.tar.gz \
&& mkdir $$tmpdistdir \
&& $(MAKE) distdir distdir="$$abstmpdistdir" \
&& $(TAR) chof $$tmpdistdir.tar --owner=root --group=root $$tmpdistdir \
&& $(GZIP) -9 $$tmpdistdir.tar \
&& rm -rf $$tmpdistdir
force :
# Work around an automake-1.8 bug.
am--refresh:

1466
config.h Normal file

File diff suppressed because it is too large Load Diff

8915
config.log Normal file

File diff suppressed because it is too large Load Diff

3368
config.status Executable file

File diff suppressed because it is too large Load Diff

249
include/iconv.h Normal file
View File

@ -0,0 +1,249 @@
/* Copyright (C) 1999-2022 Free Software Foundation, Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library 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.
The GNU LIBICONV Library 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 the GNU LIBICONV Library; see the file COPYING.LIB.
If not, see <https://www.gnu.org/licenses/>. */
/* When installed, this file is called "iconv.h". */
#ifndef _LIBICONV_H
#define _LIBICONV_H
#define _LIBICONV_VERSION 0x0111 /* version number: (major<<8) + minor */
#if 1 && BUILDING_LIBICONV
#define LIBICONV_DLL_EXPORTED __attribute__((__visibility__("default")))
#elif defined _MSC_VER && BUILDING_LIBICONV
#define LIBICONV_DLL_EXPORTED __declspec(dllexport)
#else
#define LIBICONV_DLL_EXPORTED
#endif
extern LIBICONV_DLL_EXPORTED int _libiconv_version; /* Likewise */
/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
errors because some other system header file includes /usr/include/iconv.h
which defines iconv_t or declares iconv after this file, 2. when compiling
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
binary compatible code.
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
has been installed in /usr/local/include, there is no way any more to
include the original /usr/include/iconv.h. We simply have to get away
without it.
Ad 1. The risk that a system header file does
#include "iconv.h" or #include_next "iconv.h"
is small. They all do #include <iconv.h>.
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
has to be a scalar type because (iconv_t)(-1) is a possible return value
from iconv_open().) */
/* Define iconv_t ourselves. */
#undef iconv_t
#define iconv_t libiconv_t
typedef void* iconv_t;
/* Get size_t declaration.
Get wchar_t declaration if it exists. */
#include <stddef.h>
/* Get errno declaration and values. */
#include <errno.h>
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
have EILSEQ in a different header. On these systems, define EILSEQ
ourselves. */
#ifndef EILSEQ
#define EILSEQ
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode. */
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
extern LIBICONV_DLL_EXPORTED iconv_t iconv_open (const char* tocode, const char* fromcode);
/* Converts, using conversion descriptor cd, at most *inbytesleft bytes
starting at *inbuf, writing at most *outbytesleft bytes starting at
*outbuf.
Decrements *inbytesleft and increments *inbuf by the same amount.
Decrements *outbytesleft and increments *outbuf by the same amount. */
#ifndef LIBICONV_PLUG
#define iconv libiconv
#endif
extern LIBICONV_DLL_EXPORTED size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
/* Frees resources allocated for conversion descriptor cd. */
#ifndef LIBICONV_PLUG
#define iconv_close libiconv_close
#endif
extern LIBICONV_DLL_EXPORTED int iconv_close (iconv_t cd);
#ifdef __cplusplus
}
#endif
#ifndef LIBICONV_PLUG
/* Nonstandard extensions. */
#if 1
#if 0
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#endif
#include <wchar.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* A type that holds all memory needed by a conversion descriptor.
A pointer to such an object can be used as an iconv_t. */
typedef struct {
void* dummy1[28];
#if 1
mbstate_t dummy2;
#endif
} iconv_allocation_t;
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode into preallocated memory. Returns an error indicator
(0 or -1 with errno set). */
#define iconv_open_into libiconv_open_into
extern LIBICONV_DLL_EXPORTED int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);
/* Control of attributes. */
#define iconvctl libiconvctl
extern LIBICONV_DLL_EXPORTED int iconvctl (iconv_t cd, int request, void* argument);
/* Hook performed after every successful conversion of a Unicode character. */
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
/* Hook performed after every successful conversion of a wide character. */
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
/* Set of hooks. */
struct iconv_hooks {
iconv_unicode_char_hook uc_hook;
iconv_wide_char_hook wc_hook;
void* data;
};
/* Fallback function. Invoked when a small number of bytes could not be
converted to a Unicode character. This function should process all
bytes from inbuf and may produce replacement Unicode characters by calling
the write_replacement callback repeatedly. */
typedef void (*iconv_unicode_mb_to_uc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const unsigned int *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a Unicode character could not be converted
to the target encoding. This function should process the character and
may produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_unicode_uc_to_mb_fallback)
(unsigned int code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#if 1
/* Fallback function. Invoked when a number of bytes could not be converted to
a wide character. This function should process all bytes from inbuf and may
produce replacement wide characters by calling the write_replacement
callback repeatedly. */
typedef void (*iconv_wchar_mb_to_wc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const wchar_t *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a wide character could not be converted to
the target encoding. This function should process the character and may
produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_wchar_wc_to_mb_fallback)
(wchar_t code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#else
/* If the wchar_t type does not exist, these two fallback functions are never
invoked. Their argument list therefore does not matter. */
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
#endif
/* Set of fallbacks. */
struct iconv_fallbacks {
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
void* data;
};
/* Requests for iconvctl. */
#define ICONV_TRIVIALP 0 /* int *argument */
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
/* Listing of locale independent encodings. */
#define iconvlist libiconvlist
extern LIBICONV_DLL_EXPORTED void iconvlist (int (*do_one) (unsigned int namescount,
const char * const * names,
void* data),
void* data);
/* Canonicalize an encoding name.
The result is either a canonical encoding name, or name itself. */
extern LIBICONV_DLL_EXPORTED const char * iconv_canonicalize (const char * name);
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern LIBICONV_DLL_EXPORTED void libiconv_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif
#endif /* _LIBICONV_H */

241
include/iconv.h.inst Normal file
View File

@ -0,0 +1,241 @@
/* Copyright (C) 1999-2022 Free Software Foundation, Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library 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.
The GNU LIBICONV Library 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 the GNU LIBICONV Library; see the file COPYING.LIB.
If not, see <https://www.gnu.org/licenses/>. */
/* When installed, this file is called "iconv.h". */
#ifndef _LIBICONV_H
#define _LIBICONV_H
#define _LIBICONV_VERSION 0x0111 /* version number: (major<<8) + minor */
extern int _libiconv_version; /* Likewise */
/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
errors because some other system header file includes /usr/include/iconv.h
which defines iconv_t or declares iconv after this file, 2. when compiling
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
binary compatible code.
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
has been installed in /usr/local/include, there is no way any more to
include the original /usr/include/iconv.h. We simply have to get away
without it.
Ad 1. The risk that a system header file does
#include "iconv.h" or #include_next "iconv.h"
is small. They all do #include <iconv.h>.
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
has to be a scalar type because (iconv_t)(-1) is a possible return value
from iconv_open().) */
/* Define iconv_t ourselves. */
#undef iconv_t
#define iconv_t libiconv_t
typedef void* iconv_t;
/* Get size_t declaration.
Get wchar_t declaration if it exists. */
#include <stddef.h>
/* Get errno declaration and values. */
#include <errno.h>
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
have EILSEQ in a different header. On these systems, define EILSEQ
ourselves. */
#ifndef EILSEQ
#define EILSEQ
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode. */
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
/* Converts, using conversion descriptor cd, at most *inbytesleft bytes
starting at *inbuf, writing at most *outbytesleft bytes starting at
*outbuf.
Decrements *inbytesleft and increments *inbuf by the same amount.
Decrements *outbytesleft and increments *outbuf by the same amount. */
#ifndef LIBICONV_PLUG
#define iconv libiconv
#endif
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
/* Frees resources allocated for conversion descriptor cd. */
#ifndef LIBICONV_PLUG
#define iconv_close libiconv_close
#endif
extern int iconv_close (iconv_t cd);
#ifdef __cplusplus
}
#endif
#ifndef LIBICONV_PLUG
/* Nonstandard extensions. */
#if 1
#if 0
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#endif
#include <wchar.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* A type that holds all memory needed by a conversion descriptor.
A pointer to such an object can be used as an iconv_t. */
typedef struct {
void* dummy1[28];
#if 1
mbstate_t dummy2;
#endif
} iconv_allocation_t;
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode into preallocated memory. Returns an error indicator
(0 or -1 with errno set). */
#define iconv_open_into libiconv_open_into
extern int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);
/* Control of attributes. */
#define iconvctl libiconvctl
extern int iconvctl (iconv_t cd, int request, void* argument);
/* Hook performed after every successful conversion of a Unicode character. */
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
/* Hook performed after every successful conversion of a wide character. */
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
/* Set of hooks. */
struct iconv_hooks {
iconv_unicode_char_hook uc_hook;
iconv_wide_char_hook wc_hook;
void* data;
};
/* Fallback function. Invoked when a small number of bytes could not be
converted to a Unicode character. This function should process all
bytes from inbuf and may produce replacement Unicode characters by calling
the write_replacement callback repeatedly. */
typedef void (*iconv_unicode_mb_to_uc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const unsigned int *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a Unicode character could not be converted
to the target encoding. This function should process the character and
may produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_unicode_uc_to_mb_fallback)
(unsigned int code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#if 1
/* Fallback function. Invoked when a number of bytes could not be converted to
a wide character. This function should process all bytes from inbuf and may
produce replacement wide characters by calling the write_replacement
callback repeatedly. */
typedef void (*iconv_wchar_mb_to_wc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const wchar_t *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a wide character could not be converted to
the target encoding. This function should process the character and may
produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_wchar_wc_to_mb_fallback)
(wchar_t code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#else
/* If the wchar_t type does not exist, these two fallback functions are never
invoked. Their argument list therefore does not matter. */
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
#endif
/* Set of fallbacks. */
struct iconv_fallbacks {
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
void* data;
};
/* Requests for iconvctl. */
#define ICONV_TRIVIALP 0 /* int *argument */
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
/* Listing of locale independent encodings. */
#define iconvlist libiconvlist
extern void iconvlist (int (*do_one) (unsigned int namescount,
const char * const * names,
void* data),
void* data);
/* Canonicalize an encoding name.
The result is either a canonical encoding name, or name itself. */
extern const char * iconv_canonicalize (const char * name);
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif
#endif /* _LIBICONV_H */

434
lib/Makefile Normal file
View File

@ -0,0 +1,434 @@
# Makefile for libiconv/lib
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = .
# Directories used by "make install":
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
local_prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
# Programs used by "make":
CC = gcc
CFLAGS = -g -O2 -fvisibility=hidden
CPPFLAGS =
LDFLAGS = $(LDFLAGS_no)
LDFLAGS_yes = -Wl,--export-all-symbols
LDFLAGS_no =
INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include -I.. -I$(srcdir)/..
# -DBUILDING_LIBICONV: Change expansion of LIBICONV_DLL_EXPORTED macro.
# -DBUILDING_LIBCHARSET: Change expansion of LIBCHARSET_DLL_EXPORTED macro in
# localcharset.h.
# -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
DEFS = \
-DLIBDIR=\"$(libdir)\" \
-DBUILDING_LIBICONV -DBUILDING_LIBCHARSET -DBUILDING_DLL \
-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
-Dset_relocation_prefix=libiconv_set_relocation_prefix \
-Drelocate=libiconv_relocate \
-Drelocate2=libiconv_relocate2 -DHAVE_CONFIG_H
LIBTOOL = /bin/sh $(top_builddir)/libtool
LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
AR = ar
# Windows resource compiler (windres). Used via libtool.
RC =
CP = cp
MV = mv
LN = ln
LN_S = ln -s
RM = rm -f
# Programs used by "make install":
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ../build-aux/mkinstalldirs
#### End of system configuration section. ####
SHELL = /bin/sh
# Before making a release, change this according to the libtool documentation,
# section "Library interface versions".
LIBICONV_VERSION_INFO = 8:1:6
PACKAGE_VERSION = 1.17
# Needed by $(LIBTOOL).
top_builddir = ..
SOURCES = $(srcdir)/iconv.c $(srcdir)/../libcharset/lib/localcharset.c $(srcdir)/relocatable.c
OBJECTS = iconv.lo localcharset.lo relocatable.lo $(OBJECTS_EXP_no) $(OBJECTS_RES_no)
OBJECTS_EXP_yes = iconv-exports.lo
OBJECTS_EXP_no =
OBJECTS_RES_yes = libiconv.res.lo
OBJECTS_RES_no =
all : libiconv.la
libiconv.la : $(OBJECTS)
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libiconv.la -rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined $(OBJECTS)
iconv.lo : $(srcdir)/iconv.c $(srcdir)/converters.h \
$(srcdir)/encodings.def $(srcdir)/encodings_aix.def $(srcdir)/encodings_osf1.def $(srcdir)/encodings_dos.def $(srcdir)/encodings_local.def \
$(srcdir)/aliases.h $(srcdir)/aliases_sysaix.h $(srcdir)/aliases_syshpux.h $(srcdir)/aliases_sysosf1.h $(srcdir)/aliases_syssolaris.h \
$(srcdir)/aliases_aix.h $(srcdir)/aliases_aix_sysaix.h \
$(srcdir)/aliases_osf1.h $(srcdir)/aliases_osf1_sysosf1.h \
$(srcdir)/aliases_dos.h \
$(srcdir)/aliases_extra.h \
$(srcdir)/flags.h $(srcdir)/translit.h
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/iconv.c
localcharset.lo : $(srcdir)/../libcharset/lib/localcharset.c $(srcdir)/relocatable.h
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/../libcharset/lib/localcharset.c
relocatable.lo : $(srcdir)/relocatable.c $(srcdir)/relocatable.h
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/relocatable.c
iconv-exports.lo : $(srcdir)/../woe32dll/iconv-exports.c
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/../woe32dll/iconv-exports.c
libiconv.res.lo : $(srcdir)/../windows/libiconv.rc
$(LIBTOOL_COMPILE) --tag=RC $(RC) `$(SHELL) $(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $(srcdir)/../windows/libiconv.rc -o libiconv.res.lo --output-format=coff
# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
if [ ! -d $(libdir) ] ; then $(mkinstalldirs) $(libdir) ; fi
$(LIBTOOL_INSTALL) $(INSTALL) libiconv.la $(libdir)/libiconv.la
# On AIX, libiconv.a must include the object files of /lib/libiconv.a,
# otherwise the setlocale() call fails when invoked from executables linked
# with -rpath $(libdir), even if linked without -liconv.
install : all force
if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
$(LIBTOOL_INSTALL) $(INSTALL) libiconv.la $(DESTDIR)$(libdir)/libiconv.la
case "darwin22.4.0" in \
aix*) (cd $(DESTDIR)$(libdir) && \
objects=`$(AR) t libiconv.a`" "`$(AR) t /lib/libiconv.a` && \
$(AR) x libiconv.a && $(AR) x /lib/libiconv.a && \
$(AR) q libiconv.new.a $$objects && \
rm -f $$objects && \
mv -f libiconv.new.a libiconv.a) ;; \
esac
install-strip : install
installdirs : force
if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
uninstall : force
$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libiconv.la
check : all
mostlyclean : clean
clean : force
$(RM) *.o *.lo *.a *.la core *.stackdump so_locations
$(RM) -r .libs _libs
distclean : clean
$(RM) Makefile config.h
maintainer-clean : distclean
# List of source files.
SOURCE_FILES = \
Makefile.in config.h.in \
encodings.def \
encodings_aix.def \
encodings_osf1.def \
encodings_dos.def \
encodings_zos.def \
encodings_extra.def \
encodings_local.def \
translit.def \
genaliases.c \
genaliases2.c \
genflags.c \
gentranslit.c \
iconv.c \
converters.h \
ascii.h \
utf8.h \
ucs2.h \
ucs2be.h \
ucs2le.h \
ucs4.h \
ucs4be.h \
ucs4le.h \
utf16.h \
utf16be.h \
utf16le.h \
utf32.h \
utf32be.h \
utf32le.h \
utf7.h \
ucs2internal.h \
ucs2swapped.h \
ucs4internal.h \
ucs4swapped.h \
c99.h \
java.h \
iso8859_1.h \
iso8859_2.h \
iso8859_3.h \
iso8859_4.h \
iso8859_5.h \
iso8859_6.h \
iso8859_7.h \
iso8859_8.h \
iso8859_9.h \
iso8859_10.h \
iso8859_11.h \
iso8859_13.h \
iso8859_14.h \
iso8859_15.h \
iso8859_16.h \
koi8_r.h \
koi8_u.h \
koi8_ru.h \
cp1250.h \
cp1251.h \
cp1252.h \
cp1253.h \
cp1254.h \
cp1255.h \
cp1256.h \
cp1257.h \
cp1258.h \
vietcomb.h \
cp850.h \
cp862.h \
cp866.h \
cp1131.h \
mac_roman.h \
mac_centraleurope.h \
mac_iceland.h \
mac_croatian.h \
mac_romania.h \
mac_cyrillic.h \
mac_ukraine.h \
mac_greek.h \
mac_turkish.h \
mac_hebrew.h \
mac_arabic.h \
mac_thai.h \
hp_roman8.h \
nextstep.h \
armscii_8.h \
georgian_academy.h \
georgian_ps.h \
koi8_t.h \
pt154.h \
rk1048.h \
mulelao.h \
cp1133.h \
tis620.h \
cp874.h \
viscii.h \
tcvn.h \
iso646_jp.h \
jisx0201.h \
jisx0208.h \
jisx0212.h \
iso646_cn.h \
gb2312.h \
isoir165.h \
isoir165ext.h \
gb12345.h \
gb12345ext.h \
gbk.h \
gbkext1.h \
gbkext2.h \
gbkext_inv.h \
cp936ext.h \
cns11643.h \
cns11643_1.h \
cns11643_2.h \
cns11643_3.h \
cns11643_4.h \
cns11643_4a.h \
cns11643_4b.h \
cns11643_5.h \
cns11643_6.h \
cns11643_7.h \
cns11643_15.h \
cns11643_inv.h \
big5.h \
ksc5601.h \
johab_hangul.h \
euc_jp.h \
sjis.h \
cp932.h \
cp932ext.h \
iso2022_jp.h \
iso2022_jp1.h \
iso2022_jp2.h \
iso2022_jpms.h \
cp50221_0208_ext.h \
cp50221_0212_ext.h \
euc_cn.h \
ces_gbk.h \
cp936.h \
gb18030.h \
gb18030ext.h \
gb18030uni.h \
iso2022_cn.h \
iso2022_cnext.h \
hz.h \
euc_tw.h \
ces_big5.h \
cp950.h \
cp950ext.h \
big5hkscs1999.h \
hkscs1999.h \
big5hkscs2001.h \
hkscs2001.h \
big5hkscs2004.h \
hkscs2004.h \
big5hkscs2008.h \
hkscs2008.h \
euc_kr.h \
cp949.h \
uhc_1.h \
uhc_2.h \
johab.h \
iso2022_kr.h \
cp856.h \
cp922.h \
cp943.h \
cp1046.h \
cp1124.h \
cp1129.h \
cp1161.h \
cp1162.h \
cp1163.h \
dec_kanji.h \
dec_hanyu.h \
cp437.h \
cp737.h \
cp775.h \
cp852.h \
cp853.h \
cp855.h \
cp857.h \
cp858.h \
cp860.h \
cp861.h \
cp863.h \
cp864.h \
cp865.h \
cp869.h \
cp1125.h \
ebcdic037.h \
ebcdic273.h \
ebcdic277.h \
ebcdic278.h \
ebcdic280.h \
ebcdic282.h \
ebcdic284.h \
ebcdic285.h \
ebcdic297.h \
ebcdic423.h \
ebcdic424.h \
ebcdic425.h \
ebcdic500.h \
ebcdic838.h \
ebcdic870.h \
ebcdic871.h \
ebcdic875.h \
ebcdic880.h \
ebcdic905.h \
ebcdic924.h \
ebcdic1025.h \
ebcdic1026.h \
ebcdic1047.h \
ebcdic1097.h \
ebcdic1112.h \
ebcdic1122.h \
ebcdic1123.h \
ebcdic1130.h \
ebcdic1132.h \
ebcdic1137.h \
ebcdic1140.h \
ebcdic1141.h \
ebcdic1142.h \
ebcdic1143.h \
ebcdic1144.h \
ebcdic1145.h \
ebcdic1146.h \
ebcdic1147.h \
ebcdic1148.h \
ebcdic1149.h \
ebcdic1153.h \
ebcdic1154.h \
ebcdic1155.h \
ebcdic1156.h \
ebcdic1157.h \
ebcdic1158.h \
ebcdic1160.h \
ebcdic1164.h \
ebcdic1165.h \
ebcdic1166.h \
ebcdic4971.h \
ebcdic12712.h \
ebcdic16804.h \
euc_jisx0213.h \
jisx0213.h \
shift_jisx0213.h \
iso2022_jp3.h \
big5_2003.h \
tds565.h \
atarist.h \
riscos1.h \
flushwc.h \
cjk_variants.h \
loops.h \
loop_unicode.h \
loop_wchar.h \
aliases2.h \
iconv_open1.h \
iconv_open2.h \
relocatable.h relocatable.c
# List of distributed files imported from other packages.
IMPORTED_FILES =
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = \
aliases.gperf aliases_sysaix.gperf aliases_syshpux.gperf aliases_sysosf1.gperf aliases_syssolaris.gperf \
aliases.h aliases_sysaix.h aliases_syshpux.h aliases_sysosf1.h aliases_syssolaris.h \
aliases_aix.h aliases_aix_sysaix.h \
aliases_osf1.h aliases_osf1_sysosf1.h \
aliases_dos.h \
aliases_zos.h \
aliases_extra.h \
canonical.h canonical_sysaix.h canonical_syshpux.h canonical_sysosf1.h canonical_syssolaris.h \
canonical_aix.h canonical_aix_sysaix.h \
canonical_osf1.h canonical_osf1_sysosf1.h \
canonical_dos.h \
canonical_zos.h \
canonical_extra.h \
canonical_local.h canonical_local_sysaix.h canonical_local_syshpux.h canonical_local_sysosf1.h canonical_local_syssolaris.h \
flags.h \
translit.h
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
force :

83
lib/config.h Normal file
View File

@ -0,0 +1,83 @@
/* lib/config.h. Generated from config.h.in by configure. */
/* Copyright (C) 1999-2003, 2005, 2007, 2010, 2012 Free Software Foundation, Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library 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.
The GNU LIBICONV Library 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 the GNU LIBICONV Library; see the file COPYING.LIB.
If not, see <https://www.gnu.org/licenses/>. */
/* Define to 1 to enable a few rarely used encodings. */
/* #undef ENABLE_EXTRA */
/* Define to 1 if the package shall run at any location in the filesystem. */
/* #undef ENABLE_RELOCATABLE */
/* Define to a type if <wchar.h> does not define. */
/* #undef mbstate_t */
/* Define if you have <iconv.h>, the iconv_t type, and the
iconv_open, iconv, iconv_close functions. */
#define HAVE_ICONV 1
/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST
/* Define to 1 if you have the getc_unlocked() function. */
#define HAVE_GETC_UNLOCKED 1
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#define HAVE_LANGINFO_CODESET 1
/* Define if you have the mbrtowc() function. */
#define HAVE_MBRTOWC 1
/* Define to 1 if you have the setlocale() function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the <stddef.h> header file. */
/* #undef HAVE_STDDEF_H */
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 or 0, depending whether the compiler supports simple visibility
declarations. */
#define HAVE_VISIBILITY 1
/* Define if you have the wcrtomb() function. */
#define HAVE_WCRTOMB 1
/* Define to 1 if O_NOFOLLOW works. */
#define HAVE_WORKING_O_NOFOLLOW 1
/* Define if the machine's byte ordering is little endian. */
#define WORDS_LITTLEENDIAN 1
/* Define to the value of ${prefix}, as a string. */
#define INSTALLPREFIX "/Users/yangzuhao/Downloads/libiconv-1.17/output"
/* Define to '__inline__' or '__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to 'int' if <sys/types.h> does not define. */
/* #undef mode_t */
/* Define as a signed type of the same size as size_t. */
/* #undef ssize_t */

1
lib/stamp-h2 Normal file
View File

@ -0,0 +1 @@
timestamp for lib/config.h

150
libcharset/Makefile Normal file
View File

@ -0,0 +1,150 @@
# Makefile for libcharset
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = .
# Directories used by "make install":
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
local_prefix = /usr/local
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
mandir = ${datarootdir}/man
# Programs used by "make":
CP = cp
RM = rm -f
# Programs used by "make install":
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ./build-aux/mkinstalldirs
#### End of system configuration section. ####
SHELL = /bin/sh
all : force
cd lib && $(MAKE) all
# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
cd lib && $(MAKE) install-lib libdir='$(libdir)' includedir='$(includedir)'
$(mkinstalldirs) $(includedir)
$(INSTALL_DATA) include/libcharset.h.inst $(includedir)/libcharset.h
# Here, use the include file that contains LIBCHARSET_DLL_EXPORTED annotations.
$(INSTALL_DATA) include/localcharset.h $(includedir)/localcharset.h
install : all force
cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
$(mkinstalldirs) $(DESTDIR)$(includedir)
$(INSTALL_DATA) include/libcharset.h.inst $(DESTDIR)$(includedir)/libcharset.h
$(INSTALL_DATA) include/localcharset.h.inst $(DESTDIR)$(includedir)/localcharset.h
install-strip : install
installdirs : force
cd lib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
$(mkinstalldirs) $(DESTDIR)$(includedir)
uninstall : force
cd lib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
$(RM) $(DESTDIR)$(includedir)/libcharset.h
$(RM) $(DESTDIR)$(includedir)/localcharset.h
check : force
cd lib && $(MAKE) check
mostlyclean : force
cd lib && $(MAKE) mostlyclean
clean : force
cd lib && $(MAKE) clean
distclean : force
cd lib && if test -f Makefile; then $(MAKE) distclean; fi
$(RM) include/libcharset.h include/libcharset.h.inst include/localcharset.h include/localcharset.h.inst
$(RM) config.status config.log config.cache Makefile config.h libtool
maintainer-clean : force
cd lib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
$(RM) include/libcharset.h include/libcharset.h.inst include/localcharset.h include/localcharset.h.inst
$(RM) config.status config.log config.cache Makefile config.h libtool
# List of source files.
SOURCE_FILES = \
README DEPENDENCIES INSTALL.windows HACKING INTEGRATE AUTHORS NEWS \
ChangeLog Makefile.devel configure.ac Makefile.in \
include/export.h include/libcharset.h.in include/localcharset.h.in \
tools/README \
tools/all-charsets tools/all-charsets-X11 tools/all-locales \
tools/locale_charmap \
tools/locale_charset.c \
tools/locale_codeset.c \
tools/locale_monthnames.c \
tools/locale_x11encoding.c \
tools/aix-3.2.5 tools/aix-4.1.5 tools/aix-4.2.0 tools/aix-4.3.2 \
tools/beos-5 \
tools/cygwin-1.7.2 \
tools/darwin-6.8 tools/darwin-7.5 tools/darwin-9.5 \
tools/freebsd-3.3 \
tools/glibc-2.1.3 tools/glibc-2.1.90 tools/glibc-2.2 \
tools/glibc-2.2-XF86-3.3.6 tools/glibc-2.2-XF86-4.0.1f \
tools/hpux-10.01 tools/hpux-10.20 tools/hpux-11.00 \
tools/irix-6.5 \
tools/netbsd-3.0 \
tools/openbsd-4.1 \
tools/osf1-4.0a tools/osf1-4.0d tools/osf1-5.1 \
tools/solaris-2.4 tools/solaris-2.5.1 tools/solaris-2.6 tools/solaris-2.6-cjk tools/solaris-2.7 \
tools/sunos-4.1.4 \
tools/win32
# List of distributed files imported from other packages.
LIBTOOL_IMPORTED_FILES = \
build-aux/ltmain.sh \
m4/libtool.m4 \
m4/lt~obsolete.m4 \
m4/ltoptions.m4 \
m4/ltsugar.m4 \
m4/ltversion.m4
PARENT_IMPORTED_FILES = \
INSTALL.generic \
build-aux/config.guess \
build-aux/config.libpath \
build-aux/config.sub \
build-aux/install-sh \
build-aux/libtool-reloc \
build-aux/mkinstalldirs \
m4/codeset.m4 \
m4/fcntl-o.m4 \
m4/visibility.m4
IMPORTED_FILES = \
COPYING.LIB \
$(LIBTOOL_IMPORTED_FILES) $(PARENT_IMPORTED_FILES)
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = \
autoconf/aclocal.m4 configure config.h.in \
include/libcharset.h.build.in \
include/localcharset.h.build.in
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
destdir=`echo '$(distdir)'/$$file | sed -e 's|//*[^/]*$$||'`; \
test -d "$$destdir" || mkdir "$$destdir"; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
test -d '$(distdir)'/lib || mkdir '$(distdir)'/lib; cd lib && $(MAKE) distdir distdir='$(distdir)'/lib
force :

186
libcharset/config.h Normal file
View File

@ -0,0 +1,186 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if the package shall run at any location in the file system. */
/* #undef ENABLE_RELOCATABLE */
/* Define to 1 if you have the `copy_file_range' function. */
/* #undef HAVE_COPY_FILE_RANGE */
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#define HAVE_LANGINFO_CODESET 1
/* Define to 1 if you have the <mach-o/dyld.h> header file. */
/* #undef HAVE_MACH_O_DYLD_H */
/* Define to 1 if you have the <minix/config.h> header file. */
/* #undef HAVE_MINIX_CONFIG_H */
/* Define to 1 if you have the `setlocale' function. */
#define HAVE_SETLOCALE 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `symlink' function. */
#define HAVE_SYMLINK 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* Define to 1 or 0, depending whether the compiler supports simple visibility
declarations. */
#define HAVE_VISIBILITY 1
/* Define to 1 if you have the <wchar.h> header file. */
#define HAVE_WCHAR_H 1
/* Define to 1 if O_NOATIME works. */
#define HAVE_WORKING_O_NOATIME 0
/* Define to 1 if O_NOFOLLOW works. */
#define HAVE_WORKING_O_NOFOLLOW 0
/* Define to 1 if you have the `_NSGetExecutablePath' function. */
/* #undef HAVE__NSGETEXECUTABLEPATH */
/* Define to the value of ${prefix}, as a string. */
#define INSTALLPREFIX "/Users/yangzuhao/Downloads/libiconv-1.17/output"
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#define LT_OBJDIR ".libs/"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""
/* Define to the full name of this package. */
#define PACKAGE_NAME "libcharset"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libcharset 1.5"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libcharset"
/* Define to the home page for this package. */
#define PACKAGE_URL ""
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.5"
/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
#define STDC_HEADERS 1
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# define _DARWIN_C_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable X/Open compliant socket functions that do not require linking
with -lxnet on HP-UX 11.11. */
#ifndef _HPUX_ALT_XOPEN_SOCKET_API
# define _HPUX_ALT_XOPEN_SOCKET_API 1
#endif
/* Identify the host operating system as Minix.
This macro does not affect the system headers' behavior.
A future release of Autoconf may stop defining this macro. */
#ifndef _MINIX
/* # undef _MINIX */
#endif
/* Enable general extensions on NetBSD.
Enable NetBSD compatibility extensions on Minix. */
#ifndef _NETBSD_SOURCE
# define _NETBSD_SOURCE 1
#endif
/* Enable OpenBSD compatibility extensions on NetBSD.
Oddly enough, this does nothing on OpenBSD. */
#ifndef _OPENBSD_SOURCE
# define _OPENBSD_SOURCE 1
#endif
/* Define to 1 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_SOURCE
/* # undef _POSIX_SOURCE */
#endif
/* Define to 2 if needed for POSIX-compatible behavior. */
#ifndef _POSIX_1_SOURCE
/* # undef _POSIX_1_SOURCE */
#endif
/* Enable POSIX-compatible threading on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
# define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
#endif
/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
# define __STDC_WANT_IEC_60559_BFP_EXT__ 1
#endif
/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# define __STDC_WANT_IEC_60559_DFP_EXT__ 1
#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
#endif
/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
#endif
/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
#ifndef __STDC_WANT_LIB_EXT2__
# define __STDC_WANT_LIB_EXT2__ 1
#endif
/* Enable extensions specified by ISO/IEC 24747:2009. */
#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
# define __STDC_WANT_MATH_SPEC_FUNCS__ 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable X/Open extensions. Define to 500 only if necessary
to make mbstate_t available. */
#ifndef _XOPEN_SOURCE
/* # undef _XOPEN_SOURCE */
#endif

893
libcharset/config.log Normal file
View File

@ -0,0 +1,893 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libcharset configure 1.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ ./configure --disable-option-checking --prefix=/Users/yangzuhao/Downloads/libiconv-1.17/output --cache-file=/dev/null --srcdir=.
## --------- ##
## Platform. ##
## --------- ##
hostname = Yaha-baidu
uname -m = arm64
uname -r = 22.4.0
uname -s = Darwin
uname -v = Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103
/usr/bin/uname -p = arm
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103
Kernel configured for up to 8 processors.
8 processors are physically available.
8 processors are logically available.
Processor type: arm64e (ARM64E)
Processors active: 0 1 2 3 4 5 6 7
Primary memory available: 16.00 gigabytes
Default processor set: 467 tasks, 3514 threads, 8 processors
Load average: 3.40, Mach factor: 4.60
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/yangzuhao/.icafe/bin/
PATH: HOME/Data/tools/
PATH: /Users/yangzuhao/Data/code/gopath/bin/
PATH: /Users/yangzuhao/Data/go-env/go1.18.5/bin/
PATH: /opt/homebrew/bin/
PATH: /opt/homebrew/sbin/
PATH: /usr/local/bin/
PATH: /System/Cryptexes/App/usr/bin/
PATH: /usr/bin/
PATH: /bin/
PATH: /usr/sbin/
PATH: /sbin/
PATH: /Library/Apple/usr/bin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin/
PATH: /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin/
PATH: /Users/yangzuhao/.otm/
PATH: /Users/yangzuhao/Data/dev-env/flutter/bin/
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2410: looking for aux files: ltmain.sh config.guess config.sub install-sh
configure:2423: trying ./build-aux/
configure:2452: ./build-aux/ltmain.sh found
configure:2452: ./build-aux/config.guess found
configure:2452: ./build-aux/config.sub found
configure:2434: ./build-aux/install-sh found
configure:2567: checking whether make sets $(MAKE)
configure:2590: result: yes
configure:2663: checking for gcc
configure:2684: found /usr/bin/gcc
configure:2695: result: gcc
configure:3048: checking for C compiler version
configure:3057: gcc --version >&5
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:3068: $? = 0
configure:3057: gcc -v >&5
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:3068: $? = 0
configure:3057: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3068: $? = 1
configure:3057: gcc -qversion >&5
clang: error: unknown argument '-qversion'; did you mean '--version'?
clang: error: no input files
configure:3068: $? = 1
configure:3057: gcc -version >&5
clang: error: unknown argument '-version'; did you mean '--version'?
clang: error: no input files
configure:3068: $? = 1
configure:3088: checking whether the C compiler works
configure:3110: gcc conftest.c >&5
configure:3114: $? = 0
configure:3164: result: yes
configure:3167: checking for C compiler default output file name
configure:3169: result: a.out
configure:3175: checking for suffix of executables
configure:3182: gcc -o conftest conftest.c >&5
configure:3186: $? = 0
configure:3209: result:
configure:3231: checking whether we are cross compiling
configure:3239: gcc -o conftest conftest.c >&5
configure:3243: $? = 0
configure:3250: ./conftest
configure:3254: $? = 0
configure:3269: result: no
configure:3274: checking for suffix of object files
configure:3297: gcc -c conftest.c >&5
configure:3301: $? = 0
configure:3323: result: o
configure:3327: checking whether the compiler supports GNU C
configure:3347: gcc -c conftest.c >&5
configure:3347: $? = 0
configure:3357: result: yes
configure:3368: checking whether gcc accepts -g
configure:3389: gcc -c -g conftest.c >&5
configure:3389: $? = 0
configure:3433: result: yes
configure:3453: checking for gcc option to enable C11 features
configure:3468: gcc -c -g -O2 conftest.c >&5
conftest.c:23:14: warning: a function declaration without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
static char *e (p, i)
^
1 warning generated.
configure:3468: $? = 0
configure:3486: result: none needed
configure:3601: checking how to run the C preprocessor
configure:3627: gcc -E conftest.c
configure:3627: $? = 0
configure:3642: gcc -E conftest.c
conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
configure:3642: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libcharset"
| #define PACKAGE_TARNAME "libcharset"
| #define PACKAGE_VERSION "1.5"
| #define PACKAGE_STRING "libcharset 1.5"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:3669: result: gcc -E
configure:3683: gcc -E conftest.c
configure:3683: $? = 0
configure:3698: gcc -E conftest.c
conftest.c:9:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
^~~~~~~~~~~~~~~~~~
1 error generated.
configure:3698: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libcharset"
| #define PACKAGE_TARNAME "libcharset"
| #define PACKAGE_VERSION "1.5"
| #define PACKAGE_STRING "libcharset 1.5"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
| #include <ac_nonexistent.h>
configure:3744: checking for a BSD-compatible install
configure:3817: result: /opt/homebrew/bin/ginstall -c
configure:3836: checking build system type
configure:3851: result: aarch64-apple-darwin22.4.0
configure:3871: checking host system type
configure:3885: result: aarch64-apple-darwin22.4.0
configure:3914: checking for stdio.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for stdlib.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for string.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for inttypes.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for stdint.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for strings.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for sys/stat.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for sys/types.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for unistd.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for wchar.h
configure:3914: gcc -c -g -O2 conftest.c >&5
configure:3914: $? = 0
configure:3914: result: yes
configure:3914: checking for minix/config.h
configure:3914: gcc -c -g -O2 conftest.c >&5
conftest.c:47:10: fatal error: 'minix/config.h' file not found
#include <minix/config.h>
^~~~~~~~~~~~~~~~
1 error generated.
configure:3914: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libcharset"
| #define PACKAGE_TARNAME "libcharset"
| #define PACKAGE_VERSION "1.5"
| #define PACKAGE_STRING "libcharset 1.5"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| /* end confdefs.h. */
| #include <stddef.h>
| #ifdef HAVE_STDIO_H
| # include <stdio.h>
| #endif
| #ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| #endif
| #ifdef HAVE_STRING_H
| # include <string.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| #include <minix/config.h>
configure:3914: result: no
configure:3945: checking whether it is safe to define __EXTENSIONS__
configure:3964: gcc -c -g -O2 conftest.c >&5
configure:3964: $? = 0
configure:3972: result: yes
configure:3975: checking whether _XOPEN_SOURCE should be defined
configure:3997: gcc -c -g -O2 conftest.c >&5
configure:3997: $? = 0
configure:4024: result: no
configure:4134: checking how to print strings
configure:4161: result: printf
configure:4182: checking for a sed that does not truncate output
configure:4252: result: /usr/bin/sed
configure:4270: checking for grep that handles long lines and -e
configure:4334: result: /usr/bin/grep
configure:4339: checking for egrep
configure:4407: result: /usr/bin/grep -E
configure:4412: checking for fgrep
configure:4480: result: /usr/bin/grep -F
configure:4516: checking for ld used by gcc
configure:4584: result: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
configure:4591: checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld
configure:4607: result: no
configure:4619: checking for BSD- or MS-compatible name lister (nm)
configure:4674: result: /usr/bin/nm -B
configure:4814: checking the name lister (/usr/bin/nm -B) interface
configure:4822: gcc -c -g -O2 conftest.c >&5
configure:4825: /usr/bin/nm -B "conftest.o"
configure:4828: output
000000000000025c S _some_variable
0000000000000000 t ltmp0
000000000000025c s ltmp1
configure:4835: result: BSD nm
configure:4838: checking whether ln -s works
configure:4842: result: yes
configure:4850: checking the maximum length of command line arguments
configure:4982: result: 786432
configure:5030: checking how to convert aarch64-apple-darwin22.4.0 file names to aarch64-apple-darwin22.4.0 format
configure:5071: result: func_convert_file_noop
configure:5078: checking how to convert aarch64-apple-darwin22.4.0 file names to toolchain format
configure:5099: result: func_convert_file_noop
configure:5106: checking for /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld option to reload object files
configure:5114: result: -r
configure:5193: checking for file
configure:5214: found /usr/bin/file
configure:5225: result: file
configure:5301: checking for objdump
configure:5322: found /usr/bin/objdump
configure:5333: result: objdump
configure:5362: checking how to recognize dependent libraries
configure:5563: result: pass_all
configure:5653: checking for dlltool
configure:5688: result: no
configure:5715: checking how to associate runtime and link libraries
configure:5743: result: printf %s\n
configure:5808: checking for ar
configure:5829: found /usr/bin/ar
configure:5840: result: ar
configure:5893: checking for archiver @FILE support
configure:5911: gcc -c -g -O2 conftest.c >&5
configure:5911: $? = 0
configure:5915: ar cr libconftest.a @conftest.lst >&5
ar: @conftest.lst: No such file or directory
configure:5918: $? = 1
configure:5938: result: no
configure:6001: checking for strip
configure:6022: found /usr/bin/strip
configure:6033: result: strip
configure:6110: checking for ranlib
configure:6131: found /usr/bin/ranlib
configure:6142: result: ranlib
configure:6219: checking for gawk
configure:6240: found /opt/homebrew/bin/gawk
configure:6251: result: gawk
configure:6291: checking command to parse /usr/bin/nm -B output from gcc object
configure:6445: gcc -c -g -O2 conftest.c >&5
configure:6448: $? = 0
configure:6452: /usr/bin/nm -B conftest.o \| /usr/bin/sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | /usr/bin/sed '/ __gnu_lto/d' \> conftest.nm
configure:6455: $? = 0
cannot find nm_test_var in conftest.nm
configure:6445: gcc -c -g -O2 conftest.c >&5
configure:6448: $? = 0
configure:6452: /usr/bin/nm -B conftest.o \| /usr/bin/sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | /usr/bin/sed '/ __gnu_lto/d' \> conftest.nm
configure:6455: $? = 0
configure:6521: gcc -o conftest -g -O2 conftest.c conftstm.o >&5
warning: (arm64) could not find object file symbol for symbol _main
configure:6524: $? = 0
configure:6562: result: ok
configure:6609: checking for sysroot
configure:6640: result: no
configure:6647: checking for a working dd
configure:6691: result: /bin/dd
configure:6695: checking how to truncate binary pipes
configure:6711: result: /bin/dd bs=4096 count=1
configure:7048: checking for mt
configure:7083: result: no
configure:7103: checking if : is a manifest tool
configure:7110: : '-?'
configure:7118: result: no
configure:7179: checking for dsymutil
configure:7200: found /usr/bin/dsymutil
configure:7211: result: dsymutil
configure:7281: checking for nmedit
configure:7302: found /usr/bin/nmedit
configure:7313: result: nmedit
configure:7383: checking for lipo
configure:7404: found /usr/bin/lipo
configure:7415: result: lipo
configure:7485: checking for otool
configure:7506: found /usr/bin/otool
configure:7517: result: otool
configure:7587: checking for otool64
configure:7622: result: no
configure:7667: checking for -single_module linker flag
gcc -g -O2 -o libconftest.dylib -dynamiclib -Wl,-single_module conftest.c
configure:7701: result: yes
configure:7704: checking for -exported_symbols_list linker flag
configure:7725: gcc -o conftest -g -O2 -Wl,-exported_symbols_list,conftest.sym conftest.c >&5
configure:7725: $? = 0
configure:7736: result: yes
configure:7739: checking for -force_load linker flag
gcc -g -O2 -c -o conftest.o conftest.c
ar cr libconftest.a conftest.o
ranlib libconftest.a
gcc -g -O2 -o conftest conftest.c -Wl,-force_load,./libconftest.a
configure:7772: result: yes
configure:7839: checking for dlfcn.h
configure:7839: gcc -c -g -O2 conftest.c >&5
configure:7839: $? = 0
configure:7839: result: yes
configure:8426: checking for objdir
configure:8442: result: .libs
configure:8706: checking if gcc supports -fno-rtti -fno-exceptions
configure:8725: gcc -c -g -O2 -fno-rtti -fno-exceptions conftest.c >&5
configure:8729: $? = 0
configure:8742: result: yes
configure:9100: checking for gcc option to produce PIC
configure:9108: result: -fno-common -DPIC
configure:9116: checking if gcc PIC flag -fno-common -DPIC works
configure:9135: gcc -c -g -O2 -fno-common -DPIC -DPIC conftest.c >&5
configure:9139: $? = 0
configure:9152: result: yes
configure:9181: checking if gcc static flag -static works
configure:9210: result: no
configure:9225: checking if gcc supports -c -o file.o
configure:9247: gcc -c -g -O2 -o out/conftest2.o conftest.c >&5
configure:9251: $? = 0
configure:9273: result: yes
configure:9281: checking if gcc supports -c -o file.o
configure:9329: result: yes
configure:9362: checking whether the gcc linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) supports shared libraries
configure:10630: result: yes
configure:10871: checking dynamic linker characteristics
configure:11692: result: darwin22.4.0 dyld
configure:11814: checking how to hardcode library paths into programs
configure:11839: result: immediate
configure:12391: checking whether stripping libraries is possible
configure:12408: result: yes
configure:12442: checking if libtool supports shared libraries
configure:12444: result: yes
configure:12447: checking whether to build shared libraries
configure:12472: result: yes
configure:12475: checking whether to build static libraries
configure:12479: result: yes
configure:12540: checking for ld
configure:12671: result: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
configure:12678: checking if the linker (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld) is GNU ld
configure:12694: result: no
configure:12700: checking for shared library path variable
configure:12714: result: DYLD_LIBRARY_PATH
configure:12719: checking whether to activate relocatable installation
configure:12735: result: no
configure:12895: checking whether the -Werror option is usable
configure:12914: gcc -c -g -O2 -Werror conftest.c >&5
configure:12914: $? = 0
configure:12924: result: yes
configure:12926: checking for simple visibility declarations
configure:12958: gcc -c -g -O2 -fvisibility=hidden -Werror conftest.c >&5
configure:12958: $? = 0
configure:12968: result: yes
configure:12984: checking for nl_langinfo and CODESET
configure:13001: gcc -o conftest -g -O2 conftest.c >&5
configure:13001: $? = 0
configure:13011: result: yes
configure:13023: checking for symlink
configure:13023: gcc -o conftest -g -O2 conftest.c >&5
configure:13023: $? = 0
configure:13023: result: yes
configure:13037: checking for working fcntl.h
configure:13148: gcc -o conftest -g -O2 conftest.c >&5
conftest.c:52:12: error: unknown type name 'GL_MDA_DEFINES'
GL_MDA_DEFINES
^
1 error generated.
configure:13148: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "libcharset"
| #define PACKAGE_TARNAME "libcharset"
| #define PACKAGE_VERSION "1.5"
| #define PACKAGE_STRING "libcharset 1.5"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_WCHAR_H 1
| #define STDC_HEADERS 1
| #define _ALL_SOURCE 1
| #define _DARWIN_C_SOURCE 1
| #define _GNU_SOURCE 1
| #define _HPUX_ALT_XOPEN_SOCKET_API 1
| #define _NETBSD_SOURCE 1
| #define _OPENBSD_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
| #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_DFP_EXT__ 1
| #define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
| #define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
| #define __STDC_WANT_LIB_EXT2__ 1
| #define __STDC_WANT_MATH_SPEC_FUNCS__ 1
| #define _TANDEM_SOURCE 1
| #define __EXTENSIONS__ 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define INSTALLPREFIX "/Users/yangzuhao/Downloads/libiconv-1.17/output"
| #define HAVE_VISIBILITY 1
| #define HAVE_LANGINFO_CODESET 1
| #define HAVE_SYMLINK 1
| /* end confdefs.h. */
| #include <sys/types.h>
| #include <sys/stat.h>
| #if HAVE_UNISTD_H
| # include <unistd.h>
| #else /* on Windows with MSVC */
| # include <io.h>
| # include <stdlib.h>
| # defined sleep(n) _sleep ((n) * 1000)
| #endif
| #include <fcntl.h>
| GL_MDA_DEFINES
| #ifndef O_NOATIME
| #define O_NOATIME 0
| #endif
| #ifndef O_NOFOLLOW
| #define O_NOFOLLOW 0
| #endif
| static int const constants[] =
| {
| O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
| O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
| };
|
| int
| main (void)
| {
|
| int result = !constants;
| #if HAVE_SYMLINK
| {
| static char const sym[] = "conftest.sym";
| if (symlink ("/dev/null", sym) != 0)
| result |= 2;
| else
| {
| int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
| if (fd >= 0)
| {
| close (fd);
| result |= 4;
| }
| }
| if (unlink (sym) != 0 || symlink (".", sym) != 0)
| result |= 2;
| else
| {
| int fd = open (sym, O_RDONLY | O_NOFOLLOW);
| if (fd >= 0)
| {
| close (fd);
| result |= 4;
| }
| }
| unlink (sym);
| }
| #endif
| {
| static char const file[] = "confdefs.h";
| int fd = open (file, O_RDONLY | O_NOATIME);
| if (fd < 0)
| result |= 8;
| else
| {
| struct stat st0;
| if (fstat (fd, &st0) != 0)
| result |= 16;
| else
| {
| char c;
| sleep (1);
| if (read (fd, &c, 1) != 1)
| result |= 24;
| else
| {
| if (close (fd) != 0)
| result |= 32;
| else
| {
| struct stat st1;
| if (stat (file, &st1) != 0)
| result |= 40;
| else
| if (st0.st_atime != st1.st_atime)
| result |= 64;
| }
| }
| }
| }
| }
| return result;
| ;
| return 0;
| }
configure:13165: result: no
configure:13184: checking for setlocale
configure:13184: gcc -o conftest -g -O2 conftest.c >&5
configure:13184: $? = 0
configure:13184: result: yes
configure:13326: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by libcharset config.status 1.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on Yaha-baidu
config.status:1084: creating Makefile
config.status:1084: creating lib/Makefile
config.status:1084: creating include/libcharset.h
config.status:1084: creating include/libcharset.h.inst
config.status:1084: creating include/localcharset.h
config.status:1084: creating include/localcharset.h.inst
config.status:1084: creating config.h
config.status:1273: executing libtool commands
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=aarch64-apple-darwin22.4.0
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LT_SYS_LIBRARY_PATH_set=
ac_cv_env_LT_SYS_LIBRARY_PATH_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_func_setlocale=yes
ac_cv_func_symlink=yes
ac_cv_header_dlfcn_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_minix_config_h=no
ac_cv_header_stdint_h=yes
ac_cv_header_stdio_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_unistd_h=yes
ac_cv_header_wchar_h=yes
ac_cv_host=aarch64-apple-darwin22.4.0
ac_cv_objext=o
ac_cv_path_EGREP='/usr/bin/grep -E'
ac_cv_path_FGREP='/usr/bin/grep -F'
ac_cv_path_GREP=/usr/bin/grep
ac_cv_path_SED=/usr/bin/sed
ac_cv_path_install='/opt/homebrew/bin/ginstall -c'
ac_cv_path_lt_DD=/bin/dd
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_ac_ct_AR=ar
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_ac_ct_DSYMUTIL=dsymutil
ac_cv_prog_ac_ct_FILECMD=file
ac_cv_prog_ac_ct_LIPO=lipo
ac_cv_prog_ac_ct_NMEDIT=nmedit
ac_cv_prog_ac_ct_OBJDUMP=objdump
ac_cv_prog_ac_ct_OTOOL=otool
ac_cv_prog_ac_ct_RANLIB=ranlib
ac_cv_prog_ac_ct_STRIP=strip
ac_cv_prog_cc_c11=
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=
ac_cv_prog_make_make_set=yes
ac_cv_safe_to_define___extensions__=yes
ac_cv_should_define__xopen_source=no
acl_cv_libpath=DYLD_LIBRARY_PATH
acl_cv_prog_gnu_ld=no
acl_cv_shlibpath_var=DYLD_LIBRARY_PATH
am_cv_langinfo_codeset=yes
gl_cv_cc_vis_werror=yes
gl_cv_cc_visibility=yes
gl_cv_header_working_fcntl_h=no
lt_cv_apple_cc_single_mod=yes
lt_cv_ar_at_file=no
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_ld_exported_symbols_list=yes
lt_cv_ld_force_load=yes
lt_cv_ld_reload_flag=-r
lt_cv_nm_interface='BSD nm'
lt_cv_objdir=.libs
lt_cv_path_LD=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
lt_cv_path_NM='/usr/bin/nm -B'
lt_cv_path_mainfest_tool=no
lt_cv_prog_compiler_c_o=yes
lt_cv_prog_compiler_pic='-fno-common -DPIC'
lt_cv_prog_compiler_pic_works=yes
lt_cv_prog_compiler_rtti_exceptions=yes
lt_cv_prog_compiler_static_works=no
lt_cv_prog_gnu_ld=no
lt_cv_sharedlib_from_linklib_cmd='printf %s\n'
lt_cv_sys_global_symbol_pipe='/usr/bin/sed -n -e '\''s/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p'\'' | /usr/bin/sed '\''/ __gnu_lto/d'\'''
lt_cv_sys_global_symbol_to_c_name_address='/usr/bin/sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"\1", (void *) \&\1},/p'\'''
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='/usr/bin/sed -n -e '\''s/^: \(.*\) .*$/ {"\1", (void *) 0},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(lib.*\)$/ {"\1", (void *) \&\1},/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/ {"lib\1", (void *) \&\1},/p'\'''
lt_cv_sys_global_symbol_to_cdecl='/usr/bin/sed -n -e '\''s/^T .* \(.*\)$/extern int \1();/p'\'' -e '\''s/^[ABCDGIRSTW][ABCDGIRSTW]* .* \(.*\)$/extern char \1;/p'\'''
lt_cv_sys_global_symbol_to_import=
lt_cv_sys_max_cmd_len=786432
lt_cv_to_host_file_cmd=func_convert_file_noop
lt_cv_to_tool_file_cmd=func_convert_file_noop
lt_cv_truncate_bin='/bin/dd bs=4096 count=1'
## ----------------- ##
## Output variables. ##
## ----------------- ##
AR='ar'
AS='as'
AWK='gawk'
CC='gcc'
CFLAGS='-g -O2'
CFLAG_VISIBILITY='-fvisibility=hidden'
CPP='gcc -E'
CPPFLAGS=''
DEFS='-DHAVE_CONFIG_H'
DLLTOOL='false'
DSYMUTIL='dsymutil'
DUMPBIN=''
ECHO_C='\c'
ECHO_N=''
ECHO_T=''
EGREP='/usr/bin/grep -E'
EXEEXT=''
FGREP='/usr/bin/grep -F'
FILECMD='file'
GREP='/usr/bin/grep'
HAVE_VISIBILITY='1'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_PROGRAM_ENV=''
INSTALL_SCRIPT='${INSTALL}'
LD='/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL='/bin/sh $(top_builddir)/libtool'
LIPO='lipo'
LN_S='ln -s'
LTLIBOBJS=''
LT_SYS_LIBRARY_PATH=''
MANIFEST_TOOL=':'
NM='/usr/bin/nm -B'
NMEDIT='nmedit'
OBJDUMP='objdump'
OBJEXT='o'
OTOOL64=':'
OTOOL='otool'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='libcharset'
PACKAGE_STRING='libcharset 1.5'
PACKAGE_TARNAME='libcharset'
PACKAGE_URL=''
PACKAGE_VERSION='1.5'
PATH_SEPARATOR=':'
RANLIB='ranlib'
RELOCATABLE='no'
RELOCATABLE_BUILD_DIR='$(top_builddir)/'
RELOCATABLE_CONFIG_H_DIR='$(top_builddir)'
RELOCATABLE_LDFLAGS=''
RELOCATABLE_LIBRARY_PATH=''
RELOCATABLE_SRC_DIR='$(top_srcdir)/'
RELOCATABLE_STRIP=':'
RELOCATABLE_VIA_LD_FALSE=''
RELOCATABLE_VIA_LD_TRUE='#'
RELOCATABLE_VIA_WRAPPER_FALSE=''
RELOCATABLE_VIA_WRAPPER_TRUE='#'
SED='/usr/bin/sed'
SET_MAKE=''
SHELL='/bin/sh'
STRIP='strip'
ac_ct_AR='ar'
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
bindir='${exec_prefix}/bin'
build='aarch64-apple-darwin22.4.0'
build_alias=''
build_cpu='aarch64'
build_os='darwin22.4.0'
build_vendor='apple'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='${prefix}'
host='aarch64-apple-darwin22.4.0'
host_alias=''
host_cpu='aarch64'
host_os='darwin22.4.0'
host_vendor='apple'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/Users/yangzuhao/Downloads/libiconv-1.17/output'
program_transform_name='s,x,x,'
psdir='${docdir}'
runstatedir='${localstatedir}/run'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "libcharset"
#define PACKAGE_TARNAME "libcharset"
#define PACKAGE_VERSION "1.5"
#define PACKAGE_STRING "libcharset 1.5"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_UNISTD_H 1
#define HAVE_WCHAR_H 1
#define STDC_HEADERS 1
#define _ALL_SOURCE 1
#define _DARWIN_C_SOURCE 1
#define _GNU_SOURCE 1
#define _HPUX_ALT_XOPEN_SOCKET_API 1
#define _NETBSD_SOURCE 1
#define _OPENBSD_SOURCE 1
#define _POSIX_PTHREAD_SEMANTICS 1
#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1
#define __STDC_WANT_IEC_60559_BFP_EXT__ 1
#define __STDC_WANT_IEC_60559_DFP_EXT__ 1
#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1
#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1
#define __STDC_WANT_LIB_EXT2__ 1
#define __STDC_WANT_MATH_SPEC_FUNCS__ 1
#define _TANDEM_SOURCE 1
#define __EXTENSIONS__ 1
#define HAVE_DLFCN_H 1
#define LT_OBJDIR ".libs/"
#define INSTALLPREFIX "/Users/yangzuhao/Downloads/libiconv-1.17/output"
#define HAVE_VISIBILITY 1
#define HAVE_LANGINFO_CODESET 1
#define HAVE_SYMLINK 1
#define HAVE_WORKING_O_NOATIME 0
#define HAVE_WORKING_O_NOFOLLOW 0
#define HAVE_SETLOCALE 1
configure: exit 0

1838
libcharset/config.status Executable file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,53 @@
/* Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
The GNU CHARSET Library 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 of the
License, or (at your option) any later version.
The GNU CHARSET Library 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 the GNU CHARSET Library; see the file COPYING.LIB. If not,
see <https://www.gnu.org/licenses/>. */
#ifndef _LIBCHARSET_H
#define _LIBCHARSET_H
#if 1 && BUILDING_LIBCHARSET
#define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default")))
#elif defined _MSC_VER && BUILDING_LIBCHARSET
#define LIBCHARSET_DLL_EXPORTED __declspec(dllexport)
#else
#define LIBCHARSET_DLL_EXPORTED
#endif
#include <localcharset.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern LIBCHARSET_DLL_EXPORTED void libcharset_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif /* _LIBCHARSET_H */

View File

@ -0,0 +1,45 @@
/* Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
The GNU CHARSET Library 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 of the
License, or (at your option) any later version.
The GNU CHARSET Library 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 the GNU CHARSET Library; see the file COPYING.LIB. If not,
see <https://www.gnu.org/licenses/>. */
#ifndef _LIBCHARSET_H
#define _LIBCHARSET_H
#include <localcharset.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern void libcharset_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif /* _LIBCHARSET_H */

View File

@ -0,0 +1,145 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program 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, or (at your option)
any later version.
This program 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/>. */
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
#if 1 && BUILDING_LIBCHARSET
#define LIBCHARSET_DLL_EXPORTED __attribute__((__visibility__("default")))
#elif defined _MSC_VER && BUILDING_LIBCHARSET
#define LIBCHARSET_DLL_EXPORTED __declspec(dllexport)
#else
#define LIBCHARSET_DLL_EXPORTED
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed below.
The result must not be freed; it is statically allocated. The result
becomes invalid when setlocale() is used to change the global locale, or
when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
is changed; threads in multithreaded programs should not do this.
If the canonical name cannot be determined, the result is a non-canonical
name. */
extern LIBCHARSET_DLL_EXPORTED const char * locale_charset (void);
/* About GNU canonical names for character encodings:
Every canonical name must be supported by GNU libiconv. Support by GNU libc
is also desirable.
The name is case insensitive. Usually an upper case MIME charset name is
preferred.
The current list of these GNU canonical names is:
name MIME? used by which systems
(darwin = Mac OS X, windows = native Windows)
ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-3 Y glibc solaris cygwin
ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-6 Y glibc aix hpux solaris cygwin
ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
ISO-8859-14 glibc cygwin
ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
KOI8-T glibc
CP437 dos
CP775 dos
CP850 aix osf dos
CP852 dos
CP855 dos
CP856 aix
CP857 dos
CP861 dos
CP862 dos
CP864 dos
CP865 dos
CP866 freebsd netbsd openbsd darwin dos
CP869 dos
CP874 windows dos
CP922 aix
CP932 aix cygwin windows dos
CP943 aix zos
CP949 osf darwin windows dos
CP950 windows dos
CP1046 aix
CP1124 aix
CP1125 dos
CP1129 aix
CP1131 freebsd darwin
CP1250 windows
CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
CP1252 aix windows
CP1253 windows
CP1254 windows
CP1255 glibc windows
CP1256 windows
CP1257 windows
GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
EUC-TW glibc aix hpux irix osf solaris netbsd
BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
BIG5-HKSCS glibc hpux solaris netbsd darwin
GBK glibc aix osf solaris freebsd darwin cygwin windows dos
GB18030 glibc hpux solaris freebsd netbsd darwin
SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
JOHAB glibc solaris windows
TIS-620 glibc aix hpux osf solaris cygwin zos
VISCII Y glibc
TCVN5712-1 glibc
ARMSCII-8 glibc freebsd netbsd darwin
GEORGIAN-PS glibc cygwin
PT154 glibc netbsd cygwin
HP-ROMAN8 hpux
HP-ARABIC8 hpux
HP-GREEK8 hpux
HP-HEBREW8 hpux
HP-TURKISH8 hpux
HP-KANA8 hpux
DEC-KANJI osf
DEC-HANYU osf
UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
Note: Names which are not marked as being a MIME name should not be used in
Internet protocols for information interchange (mail, news, etc.).
Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
must understand both names and treat them as equivalent.
*/
#ifdef __cplusplus
}
#endif
#endif /* _LOCALCHARSET_H */

View File

@ -0,0 +1,137 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program 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, or (at your option)
any later version.
This program 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/>. */
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
#ifdef __cplusplus
extern "C" {
#endif
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed below.
The result must not be freed; it is statically allocated. The result
becomes invalid when setlocale() is used to change the global locale, or
when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
is changed; threads in multithreaded programs should not do this.
If the canonical name cannot be determined, the result is a non-canonical
name. */
extern const char * locale_charset (void);
/* About GNU canonical names for character encodings:
Every canonical name must be supported by GNU libiconv. Support by GNU libc
is also desirable.
The name is case insensitive. Usually an upper case MIME charset name is
preferred.
The current list of these GNU canonical names is:
name MIME? used by which systems
(darwin = Mac OS X, windows = native Windows)
ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-3 Y glibc solaris cygwin
ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-6 Y glibc aix hpux solaris cygwin
ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
ISO-8859-14 glibc cygwin
ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
KOI8-T glibc
CP437 dos
CP775 dos
CP850 aix osf dos
CP852 dos
CP855 dos
CP856 aix
CP857 dos
CP861 dos
CP862 dos
CP864 dos
CP865 dos
CP866 freebsd netbsd openbsd darwin dos
CP869 dos
CP874 windows dos
CP922 aix
CP932 aix cygwin windows dos
CP943 aix zos
CP949 osf darwin windows dos
CP950 windows dos
CP1046 aix
CP1124 aix
CP1125 dos
CP1129 aix
CP1131 freebsd darwin
CP1250 windows
CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
CP1252 aix windows
CP1253 windows
CP1254 windows
CP1255 glibc windows
CP1256 windows
CP1257 windows
GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
EUC-TW glibc aix hpux irix osf solaris netbsd
BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
BIG5-HKSCS glibc hpux solaris netbsd darwin
GBK glibc aix osf solaris freebsd darwin cygwin windows dos
GB18030 glibc hpux solaris freebsd netbsd darwin
SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
JOHAB glibc solaris windows
TIS-620 glibc aix hpux osf solaris cygwin zos
VISCII Y glibc
TCVN5712-1 glibc
ARMSCII-8 glibc freebsd netbsd darwin
GEORGIAN-PS glibc cygwin
PT154 glibc netbsd cygwin
HP-ROMAN8 hpux
HP-ARABIC8 hpux
HP-GREEK8 hpux
HP-HEBREW8 hpux
HP-TURKISH8 hpux
HP-KANA8 hpux
DEC-KANJI osf
DEC-HANYU osf
UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
Note: Names which are not marked as being a MIME name should not be used in
Internet protocols for information interchange (mail, news, etc.).
Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
must understand both names and treat them as equivalent.
*/
#ifdef __cplusplus
}
#endif
#endif /* _LOCALCHARSET_H */

124
libcharset/lib/Makefile Normal file
View File

@ -0,0 +1,124 @@
# Makefile for libcharset/lib
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = .
# Directories used by "make install":
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
local_prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
# Programs used by "make":
CC = gcc
CFLAGS = -g -O2 -fvisibility=hidden
CPPFLAGS =
LDFLAGS =
INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. -I../include
# -DBUILDING_LIBCHARSET: Change expansion of LIBCHARSET_DLL_EXPORTED macro.
DEFS = -DBUILDING_LIBCHARSET -DHAVE_CONFIG_H
LIBTOOL = /bin/sh $(top_builddir)/libtool
LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
RM = rm -f
# Programs used by "make install":
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ../build-aux/mkinstalldirs
#### End of system configuration section. ####
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = /bin/sh
# Before making a release, change this according to the libtool documentation,
# section "Library interface versions".
LIBCHARSET_VERSION_INFO = 1:0:0
# Needed by $(LIBTOOL).
top_builddir = ..
SOURCES = $(srcdir)/localcharset.c $(srcdir)/relocatable-stub.c
OBJECTS = localcharset.lo relocatable-stub.lo
all : libcharset.la
libcharset.la : $(OBJECTS)
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS)
localcharset.lo : $(srcdir)/localcharset.c
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/localcharset.c
relocatable-stub.lo : $(srcdir)/relocatable-stub.c
$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/relocatable-stub.c
# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
$(mkinstalldirs) $(libdir)
$(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(libdir)/libcharset.la
# The following is needed in order to install a simple file in $(libdir)
# which is shared with other installed packages. We use a list of referencing
# packages so that "make uninstall" will remove the file if and only if it
# is not used by another installed package.
# On systems with glibc-2.1 or newer, the file is redundant, therefore we
# avoid installing it.
install : all force
$(mkinstalldirs) $(DESTDIR)$(libdir) ; \
$(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(DESTDIR)$(libdir)/libcharset.la
install-strip : install
installdirs : force
$(mkinstalldirs) $(DESTDIR)$(libdir)
uninstall : force
$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libcharset.la
check : all
mostlyclean : clean
clean : force
$(RM) *.o *.lo *.a *.la *.o.lock core *.stackdump
$(RM) -r .libs _libs
distclean : clean
$(RM) Makefile
maintainer-clean : distclean
# List of source files.
SOURCE_FILES = \
ChangeLog Makefile.in \
relocatable-stub.c
# List of files bidirectionally synced with gnulib.
GNULIB_SYNCED_FILES = \
localcharset.c
# List of distributed files imported from other packages.
IMPORTED_FILES =
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES =
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(GNULIB_SYNCED_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
force :

11942
libcharset/libtool Executable file

File diff suppressed because it is too large Load Diff

12077
libtool Executable file

File diff suppressed because it is too large Load Diff

99
man/Makefile Normal file
View File

@ -0,0 +1,99 @@
# Makefile for libiconv/man
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = .
# Directories used by "make install":
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
local_prefix = /usr/local
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
mandir = ${datarootdir}/man
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
htmldir = ${docdir}
# Programs used by "make":
RM = rm -f
# Programs used by "make install":
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ../build-aux/mkinstalldirs
#### End of system configuration section. ####
SHELL = /bin/sh
# Used by docdir.
PACKAGE = libiconv
all :
install : force
if [ ! -d $(DESTDIR)$(mandir)/man1 ] ; then $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 ; fi
builddir="`pwd`"; cd $(srcdir) && for f in *.1 ; do (cd "$$builddir"; echo $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(mandir)/man1/$$f ; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(mandir)/man1/$$f) ; done
if [ ! -d $(DESTDIR)$(mandir)/man3 ] ; then $(mkinstalldirs) $(DESTDIR)$(mandir)/man3 ; fi
builddir="`pwd`"; cd $(srcdir) && for f in *.3 ; do (cd "$$builddir"; echo $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(mandir)/man3/$$f ; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(mandir)/man3/$$f) ; done
if [ ! -d $(DESTDIR)$(htmldir) ] ; then $(mkinstalldirs) $(DESTDIR)$(htmldir) ; fi
builddir="`pwd`"; cd $(srcdir) && for f in *.html ; do (cd "$$builddir"; echo $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(htmldir)/$$f ; $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(htmldir)/$$f) ; done
install-strip : install
installdirs : force
if [ ! -d $(DESTDIR)$(mandir)/man1 ] ; then $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 ; fi
if [ ! -d $(DESTDIR)$(mandir)/man3 ] ; then $(mkinstalldirs) $(DESTDIR)$(mandir)/man3 ; fi
if [ ! -d $(DESTDIR)$(htmldir) ] ; then $(mkinstalldirs) $(DESTDIR)$(htmldir) ; fi
uninstall : force
cd $(srcdir) && for f in *.1 ; do echo $(RM) $(DESTDIR)$(mandir)/man1/$$f ; $(RM) $(DESTDIR)$(mandir)/man1/$$f ; done
cd $(srcdir) && for f in *.3 ; do echo $(RM) $(DESTDIR)$(mandir)/man3/$$f ; $(RM) $(DESTDIR)$(mandir)/man3/$$f ; done
cd $(srcdir) && for f in *.html ; do echo $(RM) $(DESTDIR)$(htmldir)/$$f ; $(RM) $(DESTDIR)$(htmldir)/$$f ; done
check :
mostlyclean :
clean :
distclean : force
$(RM) Makefile
maintainer-clean : distclean
# List of source files.
SOURCE_FILES = \
Makefile.in \
iconv.1 \
iconv.3 \
iconv_close.3 \
iconv_open.3 \
iconvctl.3 \
iconv_open_into.3
# List of distributed files imported from other packages.
IMPORTED_FILES =
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES = \
iconv.1.html \
iconv.3.html \
iconv_close.3.html \
iconv_open.3.html \
iconvctl.3.html \
iconv_open_into.3.html
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
force :

BIN
output/bin/iconv Executable file

Binary file not shown.

241
output/include/iconv.h Normal file
View File

@ -0,0 +1,241 @@
/* Copyright (C) 1999-2022 Free Software Foundation, Inc.
This file is part of the GNU LIBICONV Library.
The GNU LIBICONV Library 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.
The GNU LIBICONV Library 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 the GNU LIBICONV Library; see the file COPYING.LIB.
If not, see <https://www.gnu.org/licenses/>. */
/* When installed, this file is called "iconv.h". */
#ifndef _LIBICONV_H
#define _LIBICONV_H
#define _LIBICONV_VERSION 0x0111 /* version number: (major<<8) + minor */
extern int _libiconv_version; /* Likewise */
/* We would like to #include any system header file which could define
iconv_t, 1. in order to eliminate the risk that the user gets compilation
errors because some other system header file includes /usr/include/iconv.h
which defines iconv_t or declares iconv after this file, 2. when compiling
for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
binary compatible code.
But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
has been installed in /usr/local/include, there is no way any more to
include the original /usr/include/iconv.h. We simply have to get away
without it.
Ad 1. The risk that a system header file does
#include "iconv.h" or #include_next "iconv.h"
is small. They all do #include <iconv.h>.
Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
has to be a scalar type because (iconv_t)(-1) is a possible return value
from iconv_open().) */
/* Define iconv_t ourselves. */
#undef iconv_t
#define iconv_t libiconv_t
typedef void* iconv_t;
/* Get size_t declaration.
Get wchar_t declaration if it exists. */
#include <stddef.h>
/* Get errno declaration and values. */
#include <errno.h>
/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
have EILSEQ in a different header. On these systems, define EILSEQ
ourselves. */
#ifndef EILSEQ
#define EILSEQ
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode. */
#ifndef LIBICONV_PLUG
#define iconv_open libiconv_open
#endif
extern iconv_t iconv_open (const char* tocode, const char* fromcode);
/* Converts, using conversion descriptor cd, at most *inbytesleft bytes
starting at *inbuf, writing at most *outbytesleft bytes starting at
*outbuf.
Decrements *inbytesleft and increments *inbuf by the same amount.
Decrements *outbytesleft and increments *outbuf by the same amount. */
#ifndef LIBICONV_PLUG
#define iconv libiconv
#endif
extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
/* Frees resources allocated for conversion descriptor cd. */
#ifndef LIBICONV_PLUG
#define iconv_close libiconv_close
#endif
extern int iconv_close (iconv_t cd);
#ifdef __cplusplus
}
#endif
#ifndef LIBICONV_PLUG
/* Nonstandard extensions. */
#if 1
#if 0
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
<wchar.h>.
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
#include <stddef.h>
#include <stdio.h>
#include <time.h>
#endif
#include <wchar.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* A type that holds all memory needed by a conversion descriptor.
A pointer to such an object can be used as an iconv_t. */
typedef struct {
void* dummy1[28];
#if 1
mbstate_t dummy2;
#endif
} iconv_allocation_t;
/* Allocates descriptor for code conversion from encoding fromcode to
encoding tocode into preallocated memory. Returns an error indicator
(0 or -1 with errno set). */
#define iconv_open_into libiconv_open_into
extern int iconv_open_into (const char* tocode, const char* fromcode,
iconv_allocation_t* resultp);
/* Control of attributes. */
#define iconvctl libiconvctl
extern int iconvctl (iconv_t cd, int request, void* argument);
/* Hook performed after every successful conversion of a Unicode character. */
typedef void (*iconv_unicode_char_hook) (unsigned int uc, void* data);
/* Hook performed after every successful conversion of a wide character. */
typedef void (*iconv_wide_char_hook) (wchar_t wc, void* data);
/* Set of hooks. */
struct iconv_hooks {
iconv_unicode_char_hook uc_hook;
iconv_wide_char_hook wc_hook;
void* data;
};
/* Fallback function. Invoked when a small number of bytes could not be
converted to a Unicode character. This function should process all
bytes from inbuf and may produce replacement Unicode characters by calling
the write_replacement callback repeatedly. */
typedef void (*iconv_unicode_mb_to_uc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const unsigned int *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a Unicode character could not be converted
to the target encoding. This function should process the character and
may produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_unicode_uc_to_mb_fallback)
(unsigned int code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#if 1
/* Fallback function. Invoked when a number of bytes could not be converted to
a wide character. This function should process all bytes from inbuf and may
produce replacement wide characters by calling the write_replacement
callback repeatedly. */
typedef void (*iconv_wchar_mb_to_wc_fallback)
(const char* inbuf, size_t inbufsize,
void (*write_replacement) (const wchar_t *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
/* Fallback function. Invoked when a wide character could not be converted to
the target encoding. This function should process the character and may
produce replacement bytes (in the target encoding) by calling the
write_replacement callback repeatedly. */
typedef void (*iconv_wchar_wc_to_mb_fallback)
(wchar_t code,
void (*write_replacement) (const char *buf, size_t buflen,
void* callback_arg),
void* callback_arg,
void* data);
#else
/* If the wchar_t type does not exist, these two fallback functions are never
invoked. Their argument list therefore does not matter. */
typedef void (*iconv_wchar_mb_to_wc_fallback) ();
typedef void (*iconv_wchar_wc_to_mb_fallback) ();
#endif
/* Set of fallbacks. */
struct iconv_fallbacks {
iconv_unicode_mb_to_uc_fallback mb_to_uc_fallback;
iconv_unicode_uc_to_mb_fallback uc_to_mb_fallback;
iconv_wchar_mb_to_wc_fallback mb_to_wc_fallback;
iconv_wchar_wc_to_mb_fallback wc_to_mb_fallback;
void* data;
};
/* Requests for iconvctl. */
#define ICONV_TRIVIALP 0 /* int *argument */
#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
#define ICONV_SET_HOOKS 5 /* const struct iconv_hooks *argument */
#define ICONV_SET_FALLBACKS 6 /* const struct iconv_fallbacks *argument */
/* Listing of locale independent encodings. */
#define iconvlist libiconvlist
extern void iconvlist (int (*do_one) (unsigned int namescount,
const char * const * names,
void* data),
void* data);
/* Canonicalize an encoding name.
The result is either a canonical encoding name, or name itself. */
extern const char * iconv_canonicalize (const char * name);
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern void libiconv_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif
#endif /* _LIBICONV_H */

View File

@ -0,0 +1,45 @@
/* Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
The GNU CHARSET Library 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 of the
License, or (at your option) any later version.
The GNU CHARSET Library 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 the GNU CHARSET Library; see the file COPYING.LIB. If not,
see <https://www.gnu.org/licenses/>. */
#ifndef _LIBCHARSET_H
#define _LIBCHARSET_H
#include <localcharset.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Support for relocatable packages. */
/* Sets the original and the current installation prefix of the package.
Relocation simply replaces a pathname starting with the original prefix
by the corresponding pathname with the current prefix instead. Both
prefixes should be directory names without trailing slash (i.e. use ""
instead of "/"). */
extern void libcharset_set_relocation_prefix (const char *orig_prefix,
const char *curr_prefix);
#ifdef __cplusplus
}
#endif
#endif /* _LIBCHARSET_H */

View File

@ -0,0 +1,137 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program 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, or (at your option)
any later version.
This program 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/>. */
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
#ifdef __cplusplus
extern "C" {
#endif
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed below.
The result must not be freed; it is statically allocated. The result
becomes invalid when setlocale() is used to change the global locale, or
when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
is changed; threads in multithreaded programs should not do this.
If the canonical name cannot be determined, the result is a non-canonical
name. */
extern const char * locale_charset (void);
/* About GNU canonical names for character encodings:
Every canonical name must be supported by GNU libiconv. Support by GNU libc
is also desirable.
The name is case insensitive. Usually an upper case MIME charset name is
preferred.
The current list of these GNU canonical names is:
name MIME? used by which systems
(darwin = Mac OS X, windows = native Windows)
ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-3 Y glibc solaris cygwin
ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-6 Y glibc aix hpux solaris cygwin
ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
ISO-8859-14 glibc cygwin
ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
KOI8-T glibc
CP437 dos
CP775 dos
CP850 aix osf dos
CP852 dos
CP855 dos
CP856 aix
CP857 dos
CP861 dos
CP862 dos
CP864 dos
CP865 dos
CP866 freebsd netbsd openbsd darwin dos
CP869 dos
CP874 windows dos
CP922 aix
CP932 aix cygwin windows dos
CP943 aix zos
CP949 osf darwin windows dos
CP950 windows dos
CP1046 aix
CP1124 aix
CP1125 dos
CP1129 aix
CP1131 freebsd darwin
CP1250 windows
CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows
CP1252 aix windows
CP1253 windows
CP1254 windows
CP1255 glibc windows
CP1256 windows
CP1257 windows
GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
EUC-TW glibc aix hpux irix osf solaris netbsd
BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
BIG5-HKSCS glibc hpux solaris netbsd darwin
GBK glibc aix osf solaris freebsd darwin cygwin windows dos
GB18030 glibc hpux solaris freebsd netbsd darwin
SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
JOHAB glibc solaris windows
TIS-620 glibc aix hpux osf solaris cygwin zos
VISCII Y glibc
TCVN5712-1 glibc
ARMSCII-8 glibc freebsd netbsd darwin
GEORGIAN-PS glibc cygwin
PT154 glibc netbsd cygwin
HP-ROMAN8 hpux
HP-ARABIC8 hpux
HP-GREEK8 hpux
HP-HEBREW8 hpux
HP-TURKISH8 hpux
HP-KANA8 hpux
DEC-KANJI osf
DEC-HANYU osf
UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
Note: Names which are not marked as being a MIME name should not be used in
Internet protocols for information interchange (mail, news, etc.).
Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
must understand both names and treat them as equivalent.
*/
#ifdef __cplusplus
}
#endif
#endif /* _LOCALCHARSET_H */

BIN
output/lib/libcharset.1.dylib Executable file

Binary file not shown.

BIN
output/lib/libcharset.a Normal file

Binary file not shown.

1
output/lib/libcharset.dylib Symbolic link
View File

@ -0,0 +1 @@
libcharset.1.dylib

41
output/lib/libcharset.la Executable file
View File

@ -0,0 +1,41 @@
# libcharset.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.7
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='libcharset.1.dylib'
# Names of this library.
library_names='libcharset.1.dylib libcharset.dylib'
# The name of the static archive.
old_library='libcharset.a'
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' '
# Libraries that this one depends upon.
dependency_libs=''
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libcharset.
current=1
age=0
revision=0
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/yangzuhao/Downloads/libiconv-1.17/output/lib'

BIN
output/lib/libiconv.2.dylib Executable file

Binary file not shown.

1
output/lib/libiconv.dylib Symbolic link
View File

@ -0,0 +1 @@
libiconv.2.dylib

41
output/lib/libiconv.la Executable file
View File

@ -0,0 +1,41 @@
# libiconv.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.7
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
# The name that we can dlopen(3).
dlname='libiconv.2.dylib'
# Names of this library.
library_names='libiconv.2.dylib libiconv.dylib'
# The name of the static archive.
old_library=''
# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' '
# Libraries that this one depends upon.
dependency_libs=''
# Names of additional weak libraries provided by this library
weak_library_names=''
# Version information for libiconv.
current=8
age=6
revision=1
# Is this an already installed library?
installed=yes
# Should we warn about portability when linking against -modules?
shouldnotlink=no
# Files to dlopen/dlpreopen
dlopen=''
dlpreopen=''
# Directory that this library needs to be installed in:
libdir='/Users/yangzuhao/Downloads/libiconv-1.17/output/lib'

View File

@ -0,0 +1,205 @@
<!-- Creator : groff version 1.22.3 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>ICONV</title>
</head>
<body>
<h1 align="center">ICONV</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#EXAMPLES">EXAMPLES</a><br>
<a href="#CONFORMING TO">CONFORMING TO</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">iconv &minus;
character set conversion</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">iconv
[<i>OPTION</i>...] [<b>&minus;f</b> <i>encoding</i>]
[<b>&minus;t</b> <i>encoding</i>] [<i>inputfile</i> ...]
<br>
iconv <b>&minus;l</b></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv</b> program converts text from one encoding to
another encoding. More precisely, it converts <b>from</b>
the encoding given for the <b>&minus;f</b> option <b>to</b>
the encoding given for the <b>&minus;t</b> option. Either of
these encodings defaults to the encoding of the current
locale. All the <i>inputfile</i>s are read and converted in
turn; if no <i>inputfile</i> is given, the standard input is
used. The converted text is printed to standard output.</p>
<p style="margin-left:11%; margin-top: 1em">The encodings
permitted are system dependent. For the libiconv
implementation, they are listed in the iconv_open(3) manual
page.</p>
<p style="margin-left:11%; margin-top: 1em">Options
controlling the input and output format: <b><br>
&minus;f</b> <i>encoding</i>,
<b>&minus;&minus;from&minus;code=</b><i>encoding</i></p>
<p style="margin-left:22%;">Specifies the encoding of the
input.</p>
<p style="margin-left:11%;"><b>&minus;t</b>
<i>encoding</i>,
<b>&minus;&minus;to&minus;code=</b><i>encoding</i></p>
<p style="margin-left:22%;">Specifies the encoding of the
output.</p>
<p style="margin-left:11%; margin-top: 1em">Options
controlling conversion problems:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="3%">
<p><b>&minus;c</b></p></td>
<td width="8%"></td>
<td width="78%">
<p>When this option is given, characters that cannot be
converted are silently discarded, instead of leading to a
conversion error.</p></td></tr>
</table>
<p style="margin-left:11%;"><b>&minus;&minus;unicode&minus;subst=</b><i>formatstring</i></p>
<p style="margin-left:22%;">When this option is given,
Unicode characters that cannot be represented in the target
encoding are replaced with a placeholder string that is
constructed from the given <i>formatstring</i>, applied to
the Unicode code point. The <i>formatstring</i> must be a
format string in the same format as for the <i>printf</i>
command or the <i>printf()</i> function, taking either no
argument or exactly one unsigned integer argument.</p>
<p style="margin-left:11%;"><b>&minus;&minus;byte&minus;subst=</b><i>formatstring</i></p>
<p style="margin-left:22%;">When this option is given,
bytes in the input that are not valid in the source encoding
are replaced with a placeholder string that is constructed
from the given <i>formatstring</i>, applied to the
byte&rsquo;s value. The <i>formatstring</i> must be a format
string in the same format as for the <i>printf</i> command
or the <i>printf()</i> function, taking either no argument
or exactly one unsigned integer argument.</p>
<p style="margin-left:11%;"><b>&minus;&minus;widechar&minus;subst=</b><i>formatstring</i></p>
<p style="margin-left:22%;">When this option is given, wide
characters in the input that are not valid in the source
encoding are replaced with a placeholder string that is
constructed from the given <i>formatstring</i>, applied to
the byte&rsquo;s value. The <i>formatstring</i> must be a
format string in the same format as for the <i>printf</i>
command or the <i>printf()</i> function, taking either no
argument or exactly one unsigned integer argument.</p>
<p style="margin-left:11%; margin-top: 1em">Options
controlling error output: <b><br>
&minus;s</b>, <b>&minus;&minus;silent</b></p>
<p style="margin-left:22%;">When this option is given,
error messages about invalid or unconvertible characters are
omitted, but the actual converted text is unaffected.</p>
<p style="margin-left:11%; margin-top: 1em">The <b>iconv
&minus;l</b> or <b>iconv &minus;&minus;list</b> command
lists the names of the supported encodings, in a system
dependent format. For the libiconv implementation, the names
are printed in upper case, separated by whitespace, and
alias names of an encoding are listed on the same line as
the encoding itself.</p>
<h2>EXAMPLES
<a name="EXAMPLES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>iconv
&minus;f ISO&minus;8859&minus;1 &minus;t UTF&minus;8</b></p>
<p style="margin-left:22%;">converts input from the old
West-European encoding ISO&minus;8859&minus;1 to
Unicode.</p>
<p style="margin-left:11%; margin-top: 1em"><b>iconv
&minus;f KOI8&minus;R
&minus;&minus;byte&minus;subst=&quot;&lt;0x%x&gt;&quot; <br>
&minus;&minus;unicode&minus;subst=&quot;&lt;U+%04X&gt;&quot;</b></p>
<p style="margin-left:22%;">converts input from the old
Russian encoding KOI8&minus;R to the locale encoding,
substituting an angle bracket notation with hexadecimal
numbers for invalid bytes and for valid but unconvertible
characters.</p>
<p style="margin-left:11%;"><b>iconv
&minus;&minus;list</b></p>
<p style="margin-left:22%;">lists the supported
encodings.</p>
<h2>CONFORMING TO
<a name="CONFORMING TO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3),
<b>locale</b>(7)</p>
<hr>
</body>
</html>

View File

@ -0,0 +1,206 @@
<!-- Creator : groff version 1.22.3 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>ICONV</title>
</head>
<body>
<h1 align="center">ICONV</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#RETURN VALUE">RETURN VALUE</a><br>
<a href="#ERRORS">ERRORS</a><br>
<a href="#CONFORMING TO">CONFORMING TO</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">iconv &minus;
perform character set conversion</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>#include
&lt;iconv.h&gt;</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>size_t iconv
(iconv_t</b> <i>cd</i><b>, <br>
const char* *</b> <i>inbuf</i><b>, size_t *</b>
<i>inbytesleft</i><b>, <br>
char* *</b> <i>outbuf</i><b>, size_t *</b>
<i>outbytesleft</i><b>);</b></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The argument
<i>cd</i> must be a conversion descriptor created using the
function <b>iconv_open</b>.</p>
<p style="margin-left:11%; margin-top: 1em">The main case
is when <i>inbuf</i> is not NULL and <i>*inbuf</i> is not
NULL. In this case, the <b>iconv</b> function converts the
multibyte sequence starting at <i>*inbuf</i> to a multibyte
sequence starting at <i>*outbuf</i>. At most
<i>*inbytesleft</i> bytes, starting at <i>*inbuf</i>, will
be read. At most <i>*outbytesleft</i> bytes, starting at
<i>*outbuf</i>, will be written.</p>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv</b> function converts one multibyte character at a
time, and for each character conversion it increments
<i>*inbuf</i> and decrements <i>*inbytesleft</i> by the
number of converted input bytes, it increments
<i>*outbuf</i> and decrements <i>*outbytesleft</i> by the
number of converted output bytes, and it updates the
conversion state contained in <i>cd</i>. If the character
encoding of the input is stateful, the <b>iconv</b> function
can also convert a sequence of input bytes to an update of
the conversion state without producing any output bytes;
such input is called a <i>shift sequence</i>. The conversion
can stop for four reasons:</p>
<p style="margin-left:11%; margin-top: 1em">1. An invalid
multibyte sequence is encountered in the input. In this case
it sets <b>errno</b> to <b>EILSEQ</b> and returns
(size_t)(&minus;1). <i>*inbuf</i> is left pointing to the
beginning of the invalid multibyte sequence.</p>
<p style="margin-left:11%; margin-top: 1em">2. The input
byte sequence has been entirely converted, i.e.
<i>*inbytesleft</i> has gone down to 0. In this case
<b>iconv</b> returns the number of non-reversible
conversions performed during this call.</p>
<p style="margin-left:11%; margin-top: 1em">3. An
incomplete multibyte sequence is encountered in the input,
and the input byte sequence terminates after it. In this
case it sets <b>errno</b> to <b>EINVAL</b> and returns
(size_t)(&minus;1). <i>*inbuf</i> is left pointing to the
beginning of the incomplete multibyte sequence.</p>
<p style="margin-left:11%; margin-top: 1em">4. The output
buffer has no more room for the next converted character. In
this case it sets <b>errno</b> to <b>E2BIG</b> and returns
(size_t)(&minus;1).</p>
<p style="margin-left:11%; margin-top: 1em">A different
case is when <i>inbuf</i> is NULL or <i>*inbuf</i> is NULL,
but <i>outbuf</i> is not NULL and <i>*outbuf</i> is not
NULL. In this case, the <b>iconv</b> function attempts to
set <i>cd</i>&rsquo;s conversion state to the initial state
and store a corresponding shift sequence at <i>*outbuf</i>.
At most <i>*outbytesleft</i> bytes, starting at
<i>*outbuf</i>, will be written. If the output buffer has no
more room for this reset sequence, it sets <b>errno</b> to
<b>E2BIG</b> and returns (size_t)(&minus;1). Otherwise it
increments <i>*outbuf</i> and decrements
<i>*outbytesleft</i> by the number of bytes written.</p>
<p style="margin-left:11%; margin-top: 1em">A third case is
when <i>inbuf</i> is NULL or <i>*inbuf</i> is NULL, and
<i>outbuf</i> is NULL or <i>*outbuf</i> is NULL. In this
case, the <b>iconv</b> function sets <i>cd</i>&rsquo;s
conversion state to the initial state.</p>
<h2>RETURN VALUE
<a name="RETURN VALUE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv</b> function returns the number of characters
converted in a non-reversible way during this call;
reversible conversions are not counted. In case of error, it
sets <b>errno</b> and returns (size_t)(&minus;1).</p>
<h2>ERRORS
<a name="ERRORS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The following
errors can occur, among others:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p><b>E2BIG</b></p></td>
<td width="2%"></td>
<td width="78%">
<p>There is not sufficient room at <i>*outbuf</i>.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p><b>EILSEQ</b></p></td>
<td width="2%"></td>
<td width="78%">
<p>An invalid multibyte sequence has been encountered in
the input.</p></td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p><b>EINVAL</b></p></td>
<td width="2%"></td>
<td width="78%">
<p>An incomplete multibyte sequence has been encountered in
the input.</p></td></tr>
</table>
<h2>CONFORMING TO
<a name="CONFORMING TO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3),
<b>iconvctl</b>(3) <b>iconv_close</b>(3)</p>
<hr>
</body>
</html>

View File

@ -0,0 +1,89 @@
<!-- Creator : groff version 1.22.3 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>ICONV_CLOSE</title>
</head>
<body>
<h1 align="center">ICONV_CLOSE</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#RETURN VALUE">RETURN VALUE</a><br>
<a href="#CONFORMING TO">CONFORMING TO</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">iconv_close
&minus; deallocate descriptor for character set
conversion</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>#include
&lt;iconv.h&gt;</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>int
iconv_close (iconv_t</b> <i>cd</i><b>);</b></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv_close</b> function deallocates a conversion
descriptor <i>cd</i> previously allocated using
<b>iconv_open</b>.</p>
<h2>RETURN VALUE
<a name="RETURN VALUE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">When
successful, the <b>iconv_close</b> function returns 0. In
case of error, it sets <b>errno</b> and returns
&minus;1.</p>
<h2>CONFORMING TO
<a name="CONFORMING TO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3)
<b>iconv</b>(3)</p>
<hr>
</body>
</html>

View File

@ -0,0 +1,345 @@
<!-- Creator : groff version 1.22.3 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>ICONV_OPEN</title>
</head>
<body>
<h1 align="center">ICONV_OPEN</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#RETURN VALUE">RETURN VALUE</a><br>
<a href="#ERRORS">ERRORS</a><br>
<a href="#CONFORMING TO">CONFORMING TO</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">iconv_open
&minus; allocate descriptor for character set conversion</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>#include
&lt;iconv.h&gt;</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>iconv_t
iconv_open (const char*</b> <i>tocode</i><b>, const
char*</b> <i>fromcode</i><b>);</b></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv_open</b> function allocates a conversion descriptor
suitable for converting byte sequences from character
encoding <i>fromcode</i> to character encoding
<i>tocode</i>.</p>
<p style="margin-left:11%; margin-top: 1em">The values
permitted for <i>fromcode</i> and <i>tocode</i> and the
supported combinations are system dependent. For the
libiconv library, the following encodings are supported, in
all combinations. <br>
European languages</p>
<p style="margin-left:22%;">ASCII,
ISO&minus;8859&minus;{1,2,3,4,5,7,9,10,13,14,15,16},
KOI8&minus;R, KOI8&minus;U, KOI8&minus;RU,
CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
Mac{Cyrillic,Ukraine,Greek,Turkish}, Macintosh</p>
<p style="margin-left:11%;">Semitic languages</p>
<p style="margin-left:22%;">ISO&minus;8859&minus;{6,8},
CP{1255,1256}, CP862, Mac{Hebrew,Arabic}</p>
<p style="margin-left:11%;">Japanese</p>
<p style="margin-left:22%;">EUC&minus;JP, SHIFT_JIS, CP932,
ISO&minus;2022&minus;JP, ISO&minus;2022&minus;JP&minus;2,
ISO&minus;2022&minus;JP&minus;1,
ISO-2022&minus;JP&minus;MS</p>
<p style="margin-left:11%;">Chinese</p>
<p style="margin-left:22%;">EUC&minus;CN, HZ, GBK, CP936,
GB18030, EUC&minus;TW, BIG5, CP950, BIG5&minus;HKSCS,
BIG5&minus;HKSCS:2004, BIG5&minus;HKSCS:2001,
BIG5&minus;HKSCS:1999, ISO&minus;2022&minus;CN,
ISO&minus;2022&minus;CN&minus;EXT</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p>Korean</p></td>
<td width="2%"></td>
<td width="50%">
<p>EUC&minus;KR, CP949, ISO&minus;2022&minus;KR, JOHAB</p></td>
<td width="28%">
</td></tr>
</table>
<p style="margin-left:11%;">Armenian</p>
<p style="margin-left:22%;">ARMSCII&minus;8</p>
<p style="margin-left:11%;">Georgian</p>
<p style="margin-left:22%;">Georgian&minus;Academy,
Georgian&minus;PS</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p>Tajik</p></td>
<td width="2%"></td>
<td width="35%">
<p>KOI8&minus;T</p></td>
<td width="43%">
</td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p>Kazakh</p></td>
<td width="2%"></td>
<td width="35%">
<p>PT154, RK1048</p></td>
<td width="43%">
</td></tr>
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p>Thai</p></td>
<td width="2%"></td>
<td width="35%">
<p>TIS&minus;620, CP874, MacThai</p></td>
<td width="43%">
</td></tr>
</table>
<p style="margin-left:11%;">Laotian</p>
<p style="margin-left:22%;">MuleLao&minus;1, CP1133</p>
<p style="margin-left:11%;">Vietnamese</p>
<p style="margin-left:22%;">VISCII, TCVN, CP1258</p>
<p style="margin-left:11%;">Platform specifics</p>
<p style="margin-left:22%;">HP&minus;ROMAN8, NEXTSTEP</p>
<p style="margin-left:11%;">Full Unicode</p>
<p style="margin-left:22%;">UTF&minus;8 <br>
UCS&minus;2, UCS&minus;2BE, UCS&minus;2LE <br>
UCS&minus;4, UCS&minus;4BE, UCS&minus;4LE <br>
UTF&minus;16, UTF&minus;16BE, UTF&minus;16LE <br>
UTF&minus;32, UTF&minus;32BE, UTF&minus;32LE <br>
UTF&minus;7 <br>
C99, JAVA</p>
<p style="margin-left:11%;">Full Unicode, in terms of
<b>uint16_t</b> or <b>uint32_t</b></p>
<p style="margin-left:22%;">(with machine dependent
endianness and alignment) <br>
UCS&minus;2&minus;INTERNAL, UCS&minus;4&minus;INTERNAL</p>
<p style="margin-left:11%;">Locale dependent, in terms of
<b>char</b> or <b>wchar_t</b></p>
<p style="margin-left:22%;">(with machine dependent
endianness and alignment, and with semantics depending on
the OS and the current LC_CTYPE locale facet) <br>
char, wchar_t</p>
<p style="margin-left:11%; margin-top: 1em">When configured
with the option
<b>&minus;&minus;enable&minus;extra&minus;encodings</b>, it
also provides support for a few extra encodings: <br>
European languages</p>
<p style="margin-left:22%;">CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}</p>
<p style="margin-left:11%;">Semitic languages</p>
<p style="margin-left:22%;">CP864</p>
<p style="margin-left:11%;">Japanese</p>
<p style="margin-left:22%;">EUC&minus;JISX0213,
Shift_JISX0213, ISO&minus;2022&minus;JP&minus;3</p>
<p style="margin-left:11%;">Chinese</p>
<p style="margin-left:22%;">BIG5&minus;2003
(experimental)</p>
<p style="margin-left:11%;">Turkmen</p>
<p style="margin-left:22%;">TDS565</p>
<p style="margin-left:11%;">Platform specifics</p>
<p style="margin-left:22%;">ATARIST,
RISCOS&minus;LATIN1</p>
<p style="margin-left:11%;">EBCDIC compatible (not ASCII
compatible, very rarely used)</p>
<p style="margin-left:22%;">European languages: <br>
IBM-{037,273,277,278,280,282,284,285,297,423,500,870,871,875,880},
<br>
IBM-{905,924,1025,1026,1047,1112,1122,1123,1140,1141,1142,1143},
<br>
IBM-{1144,1145,1146,1147,1148,1149,1153,1154,1155,1156,1157,1158},
<br>
IBM-{1165,1166,4971} <br>
Semitic languages: <br>
IBM-{424,425,12712,16804} <br>
Persian: <br>
IBM-1097 <br>
Thai: <br>
IBM-{838,1160} <br>
Laotian: <br>
IBM-1132 <br>
Vietnamese: <br>
IBM-{1130,1164} <br>
Indic languages: <br>
IBM-1137</p>
<p style="margin-left:11%; margin-top: 1em">The empty
encoding name &quot;&quot; is equivalent to
&quot;char&quot;: it denotes the locale dependent character
encoding.</p>
<p style="margin-left:11%; margin-top: 1em">When the string
&quot;//TRANSLIT&quot; is appended to <i>tocode</i>,
transliteration is activated. This means that when a
character cannot be represented in the target character set,
it can be approximated through one or several characters
that look similar to the original character.</p>
<p style="margin-left:11%; margin-top: 1em">When the string
&quot;//IGNORE&quot; is appended to <i>tocode</i>,
characters that cannot be represented in the target
character set will be silently discarded.</p>
<p style="margin-left:11%; margin-top: 1em">The resulting
conversion descriptor can be used with <b>iconv</b> any
number of times. It remains valid until deallocated using
<b>iconv_close</b>.</p>
<p style="margin-left:11%; margin-top: 1em">A conversion
descriptor contains a conversion state. After creation using
<b>iconv_open</b>, the state is in the initial state. Using
<b>iconv</b> modifies the descriptor&rsquo;s conversion
state. (This implies that a conversion descriptor can not be
used in multiple threads simultaneously.) To bring the state
back to the initial state, use <b>iconv</b> with NULL as
<i>inbuf</i> argument.</p>
<h2>RETURN VALUE
<a name="RETURN VALUE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv_open</b> function returns a freshly allocated
conversion descriptor. In case of error, it sets
<b>errno</b> and returns (iconv_t)(&minus;1).</p>
<h2>ERRORS
<a name="ERRORS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The following
error can occur, among others:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p><b>EINVAL</b></p></td>
<td width="2%"></td>
<td width="78%">
<p>The conversion from <i>fromcode</i> to <i>tocode</i> is
not supported by the implementation.</p></td></tr>
</table>
<h2>CONFORMING TO
<a name="CONFORMING TO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">POSIX:2001</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>iconv</b>(3)
<b>iconvctl</b>(3) <b>iconv_close</b>(3)</p>
<hr>
</body>
</html>

View File

@ -0,0 +1,132 @@
<!-- Creator : groff version 1.22.3 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>ICONV_OPEN_INTO</title>
</head>
<body>
<h1 align="center">ICONV_OPEN_INTO</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#RETURN VALUE">RETURN VALUE</a><br>
<a href="#ERRORS">ERRORS</a><br>
<a href="#CONFORMING TO">CONFORMING TO</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">iconv_open_into
&minus; initialize descriptor for character set
conversion</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>#include
&lt;iconv.h&gt;</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>int
iconv_open_into (const char*</b> <i>tocode</i><b>, const
char*</b> <i>fromcode</i><b>, <br>
iconv_allocation_t*</b> <i>resultp</i><b>);</b></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv_open_into</b> function initializes a conversion
descriptor suitable for converting byte sequences from
character encoding <i>fromcode</i> to character encoding
<i>tocode</i>. The conversion descriptor is stored in the
memory pointed to by <i>resultp</i>.</p>
<p style="margin-left:11%; margin-top: 1em">The values
permitted for <i>fromcode</i> and <i>tocode</i> are the same
as for the function <b>iconv_open</b>.</p>
<p style="margin-left:11%; margin-top: 1em">After a
successful return from this function, <i>resultp</i> can be
be used as an <b>iconv_t</b> object with the <b>iconv</b>
function.</p>
<h2>RETURN VALUE
<a name="RETURN VALUE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconv_open_into</b> function fills <b>*</b><i>resultp</i>
and returns 0 if it succeeds. In case of error, it sets
<b>errno</b> and returns &minus;1.</p>
<h2>ERRORS
<a name="ERRORS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The following
error can occur, among others:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p><b>EINVAL</b></p></td>
<td width="2%"></td>
<td width="78%">
<p>The conversion from <i>fromcode</i> to <i>tocode</i> is
not supported by the implementation.</p></td></tr>
</table>
<h2>CONFORMING TO
<a name="CONFORMING TO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">This function
is implemented only in GNU libiconv and not in other
<b>iconv</b> implementations. It is not backed by a
standard. You can test for its presence through
<b>(_LIBICONV_VERSION &gt;= 0x010D)</b>.</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3)
<b>iconv</b>(3)</p>
<hr>
</body>
</html>

View File

@ -0,0 +1,170 @@
<!-- Creator : groff version 1.22.3 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
p { margin-top: 0; margin-bottom: 0; vertical-align: top }
pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
table { margin-top: 0; margin-bottom: 0; vertical-align: top }
h1 { text-align: center }
</style>
<title>ICONVCTL</title>
</head>
<body>
<h1 align="center">ICONVCTL</h1>
<a href="#NAME">NAME</a><br>
<a href="#SYNOPSIS">SYNOPSIS</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#REQUEST VALUES">REQUEST VALUES</a><br>
<a href="#RETURN VALUE">RETURN VALUE</a><br>
<a href="#ERRORS">ERRORS</a><br>
<a href="#CONFORMING TO">CONFORMING TO</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>
<hr>
<h2>NAME
<a name="NAME"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">iconvctl
&minus; control iconv behavior</p>
<h2>SYNOPSIS
<a name="SYNOPSIS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>#include
&lt;iconv.h&gt;</b></p>
<p style="margin-left:11%; margin-top: 1em"><b>int iconvctl
(iconv_t</b> <i>cd</i> <b>, int</b> <i>request</i><b>, void
*</b> <i>argument</i><b>);</b></p>
<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The argument
<i>cd</i> must be a conversion descriptor created using the
function <b>iconv_open</b>.</p>
<p style="margin-left:11%; margin-top: 1em"><b>iconvctl</b>
queries or adjusts the behavior of the <b>iconv</b>
function, when invoked with the specified conversion
descriptor, depending on the request value.</p>
<h2>REQUEST VALUES
<a name="REQUEST VALUES"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The following
are permissible values for the <i>request</i> parameter.
<b><br>
ICONV_TRIVIALP</b></p>
<p style="margin-left:22%;"><i>argument</i> should be an
<b>int *</b> which will receive 1 if the conversion is
trivial, or 0 otherwise.</p>
<p style="margin-left:11%;"><b>ICONV_GET_TRANSLITERATE</b></p>
<p style="margin-left:22%;"><i>argument</i> should be an
<b>int *</b> which will receive 1 if transliteration is
enabled in the conversion, or 0 otherwise.</p>
<p style="margin-left:11%;"><b>ICONV_SET_TRANSLITERATE</b></p>
<p style="margin-left:22%;"><i>argument</i> should be a
<b>const int *</b>, pointing to an <b>int</b> value. A
non-zero value is used to enable transliteration in the
conversion. A zero value disables it.</p>
<p style="margin-left:11%;"><b>ICONV_GET_DISCARD_ILSEQ</b></p>
<p style="margin-left:22%;"><i>argument</i> should be an
<b>int *</b> which will receive 1 if &quot;illegal sequence
discard and continue&quot; is enabled in the conversion, or
0 otherwise.</p>
<p style="margin-left:11%;"><b>ICONV_SET_DISCARD_ILSEQ</b></p>
<p style="margin-left:22%;"><i>argument</i> should be a
<b>const int *</b>, pointing to an <b>int</b> value. A
non-zero value is used to enable &quot;illegal sequence
discard and continue&quot; in the conversion. A zero value
disables it.</p>
<h2>RETURN VALUE
<a name="RETURN VALUE"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The
<b>iconvctl</b> function returns 0 if it succeeds. In case
of error, it sets <b>errno</b> and returns &minus;1.</p>
<h2>ERRORS
<a name="ERRORS"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">The following
errors can occur, among others:</p>
<table width="100%" border="0" rules="none" frame="void"
cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="11%"></td>
<td width="9%">
<p><b>EINVAL</b></p></td>
<td width="2%"></td>
<td width="35%">
<p>The request is invalid.</p></td>
<td width="43%">
</td></tr>
</table>
<h2>CONFORMING TO
<a name="CONFORMING TO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em">This function
is implemented only in GNU libiconv and not in other
<b>iconv</b> implementations. It is not backed by a
standard. You can test for its presence through
<b>(_LIBICONV_VERSION &gt;= 0x0108)</b>.</p>
<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>
<p style="margin-left:11%; margin-top: 1em"><b>iconv_open</b>(3)
<b>iconv</b>(3)</p>
<hr>
</body>
</html>

View File

@ -0,0 +1,108 @@
.\" Copyright (c) Free Software Foundation, Inc.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 3 of
.\" the License, or (at your option) any later version.
.\"
.\" References consulted:
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
.\" POSIX 2001 draft6
.\"
.TH ICONV 1 "March 31, 2007" "GNU" "Linux Programmer's Manual"
.SH NAME
iconv \- character set conversion
.SH SYNOPSIS
.nf
iconv [\fIOPTION\fP...] [\fB\-f\fP \fIencoding\fP] [\fB\-t\fP \fIencoding\fP] [\fIinputfile\fP ...]
iconv \fB\-l\fP
.fi
.SH DESCRIPTION
The \fBiconv\fP program converts text from one encoding to another encoding.
More precisely, it converts \fBfrom\fP the encoding given for the \fB\-f\fP
option \fBto\fP the encoding given for the \fB\-t\fP option. Either of these
encodings defaults to the encoding of the current locale. All the
\fIinputfile\fPs are read and converted in turn; if no \fIinputfile\fP is
given, the standard input is used. The converted text is printed to standard
output.
.PP
The encodings permitted are system dependent. For the libiconv implementation,
they are listed in the iconv_open(3) manual page.
.PP
Options controlling the input and output format:
.TP
\fB\-f\fP \fIencoding\fP, \fB\-\-from\-code=\fP\fIencoding\fP
Specifies the encoding of the input.
.TP
\fB\-t\fP \fIencoding\fP, \fB\-\-to\-code=\fP\fIencoding\fP
Specifies the encoding of the output.
.PP
Options controlling conversion problems:
.TP
\fB\-c\fP
When this option is given, characters that cannot be converted are silently
discarded, instead of leading to a conversion error.
.TP
\fB\-\-unicode\-subst=\fP\fIformatstring\fP
When this option is given, Unicode characters that cannot be represented in
the target encoding are replaced with a placeholder string that is constructed
from the given \fIformatstring\fP, applied to the Unicode code point. The
\fIformatstring\fP must be a format string in the same format as for the
.I printf
command or the
.I printf()
function, taking either no argument or exactly one unsigned integer argument.
.TP
\fB\-\-byte\-subst=\fP\fIformatstring\fP
When this option is given, bytes in the input that are not valid in the source
encoding are replaced with a placeholder string that is constructed from the
given \fIformatstring\fP, applied to the byte's value. The \fIformatstring\fP
must be a format string in the same format as for the
.I printf
command or the
.I printf()
function, taking either no argument or exactly one unsigned integer argument.
.TP
\fB\-\-widechar\-subst=\fP\fIformatstring\fP
When this option is given, wide characters in the input that are not valid in
the source encoding are replaced with a placeholder string that is constructed
from the given \fIformatstring\fP, applied to the byte's value. The
\fIformatstring\fP must be a format string in the same format as for the
.I printf
command or the
.I printf()
function, taking either no argument or exactly one unsigned integer argument.
.PP
Options controlling error output:
.TP
\fB\-s\fP, \fB\-\-silent\fP
When this option is given, error messages about invalid or unconvertible
characters are omitted, but the actual converted text is unaffected.
.PP
The \fBiconv \-l\fP or \fBiconv \-\-list\fP command lists the names of the
supported encodings, in a system dependent format. For the libiconv
implementation, the names are printed in upper case, separated by whitespace,
and alias names of an encoding are listed on the same line as the encoding
itself.
.SH EXAMPLES
.TP
\fBiconv \-f ISO\-8859\-1 \-t UTF\-8\fP
converts input from the old West-European encoding ISO\-8859\-1 to Unicode.
.PP
.nf
\fBiconv \-f KOI8\-R \-\-byte\-subst="<0x%x>"\fP
\fB \-\-unicode\-subst="<U+%04X>"\fP
.fi
.RS
converts input from the old Russian encoding KOI8\-R to the locale encoding,
substituting an angle bracket notation with hexadecimal numbers for invalid
bytes and for valid but unconvertible characters.
.RE
.TP
\fBiconv \-\-list\fP
lists the supported encodings.
.SH "CONFORMING TO"
POSIX:2001
.SH "SEE ALSO"
.BR iconv_open (3),
.BR locale (7)

View File

@ -0,0 +1,92 @@
.\" Copyright (c) Free Software Foundation, Inc.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 3 of
.\" the License, or (at your option) any later version.
.\"
.\" References consulted:
.\" GNU glibc-2 source code and manual
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
.\"
.TH ICONV 3 "September 7, 2008" "GNU" "Linux Programmer's Manual"
.SH NAME
iconv \- perform character set conversion
.SH SYNOPSIS
.nf
.B #include <iconv.h>
.sp
.BI "size_t iconv (iconv_t " cd ,
.BI " const char* * " inbuf ", size_t * "inbytesleft ,
.BI " char* * " outbuf ", size_t * "outbytesleft );
.fi
.SH DESCRIPTION
The argument \fIcd\fP must be a conversion descriptor created using the
function \fBiconv_open\fP.
.PP
The main case is when \fIinbuf\fP is not NULL and \fI*inbuf\fP is not NULL.
In this case, the \fBiconv\fP function converts the multibyte sequence
starting at \fI*inbuf\fP to a multibyte sequence starting at \fI*outbuf\fP.
At most \fI*inbytesleft\fP bytes, starting at \fI*inbuf\fP, will be read.
At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
.PP
The \fBiconv\fP function converts one multibyte character at a time, and for
each character conversion it increments \fI*inbuf\fP and decrements
\fI*inbytesleft\fP by the number of converted input bytes, it increments
\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of converted
output bytes, and it updates the conversion state contained in \fIcd\fP.
If the character encoding of the input is stateful, the \fBiconv\fP function
can also convert a sequence of input bytes to an update of the conversion state
without producing any output bytes; such input is called a \fIshift sequence\fP.
The conversion can stop for four reasons:
.PP
1. An invalid multibyte sequence is encountered in the input. In this case
it sets \fBerrno\fP to \fBEILSEQ\fP and returns (size_t)(\-1). \fI*inbuf\fP
is left pointing to the beginning of the invalid multibyte sequence.
.PP
2. The input byte sequence has been entirely converted, i.e. \fI*inbytesleft\fP
has gone down to 0. In this case \fBiconv\fP returns the number of
non-reversible conversions performed during this call.
.PP
3. An incomplete multibyte sequence is encountered in the input, and the
input byte sequence terminates after it. In this case it sets \fBerrno\fP to
\fBEINVAL\fP and returns (size_t)(\-1). \fI*inbuf\fP is left pointing to the
beginning of the incomplete multibyte sequence.
.PP
4. The output buffer has no more room for the next converted character. In
this case it sets \fBerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1).
.PP
A different case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, but
\fIoutbuf\fP is not NULL and \fI*outbuf\fP is not NULL. In this case, the
\fBiconv\fP function attempts to set \fIcd\fP's conversion state to the
initial state and store a corresponding shift sequence at \fI*outbuf\fP.
At most \fI*outbytesleft\fP bytes, starting at \fI*outbuf\fP, will be written.
If the output buffer has no more room for this reset sequence, it sets
\fBerrno\fP to \fBE2BIG\fP and returns (size_t)(\-1). Otherwise it increments
\fI*outbuf\fP and decrements \fI*outbytesleft\fP by the number of bytes
written.
.PP
A third case is when \fIinbuf\fP is NULL or \fI*inbuf\fP is NULL, and
\fIoutbuf\fP is NULL or \fI*outbuf\fP is NULL. In this case, the \fBiconv\fP
function sets \fIcd\fP's conversion state to the initial state.
.SH "RETURN VALUE"
The \fBiconv\fP function returns the number of characters converted in a
non-reversible way during this call; reversible conversions are not counted.
In case of error, it sets \fBerrno\fP and returns (size_t)(\-1).
.SH ERRORS
The following errors can occur, among others:
.TP
.B E2BIG
There is not sufficient room at \fI*outbuf\fP.
.TP
.B EILSEQ
An invalid multibyte sequence has been encountered in the input.
.TP
.B EINVAL
An incomplete multibyte sequence has been encountered in the input.
.SH "CONFORMING TO"
POSIX:2001
.SH "SEE ALSO"
.BR iconv_open (3),
.BR iconvctl (3)
.BR iconv_close (3)

View File

@ -0,0 +1,31 @@
.\" Copyright (c) Free Software Foundation, Inc.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 3 of
.\" the License, or (at your option) any later version.
.\"
.\" References consulted:
.\" GNU glibc-2 source code and manual
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
.\"
.TH ICONV_CLOSE 3 "March 31, 2007" "GNU" "Linux Programmer's Manual"
.SH NAME
iconv_close \- deallocate descriptor for character set conversion
.SH SYNOPSIS
.nf
.B #include <iconv.h>
.sp
.BI "int iconv_close (iconv_t " cd );
.fi
.SH DESCRIPTION
The \fBiconv_close\fP function deallocates a conversion descriptor \fIcd\fP
previously allocated using \fBiconv_open\fP.
.SH "RETURN VALUE"
When successful, the \fBiconv_close\fP function returns 0. In case of error,
it sets \fBerrno\fP and returns \-1.
.SH "CONFORMING TO"
POSIX:2001
.SH "SEE ALSO"
.BR iconv_open (3)
.BR iconv (3)

View File

@ -0,0 +1,254 @@
.\" Copyright (c) Free Software Foundation, Inc.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 3 of
.\" the License, or (at your option) any later version.
.\"
.\" References consulted:
.\" GNU glibc-2 source code and manual
.\" OpenGroup's Single Unix specification http://www.UNIX-systems.org/online.html
.\"
.TH ICONV_OPEN 3 "January 23, 2022" "GNU" "Linux Programmer's Manual"
.SH NAME
iconv_open \- allocate descriptor for character set conversion
.SH SYNOPSIS
.nf
.B #include <iconv.h>
.sp
.BI "iconv_t iconv_open (const char* " tocode ", const char* " fromcode );
.fi
.SH DESCRIPTION
The \fBiconv_open\fP function allocates a conversion descriptor suitable
for converting byte sequences from character encoding \fIfromcode\fP to
character encoding \fItocode\fP.
.PP
The values permitted for \fIfromcode\fP and \fItocode\fP and the supported
combinations are system dependent. For the libiconv library, the following
encodings are supported, in all combinations.
.TP
European languages
.nf
.fi
ASCII, ISO\-8859\-{1,2,3,4,5,7,9,10,13,14,15,16},
KOI8\-R, KOI8\-U, KOI8\-RU,
CP{1250,1251,1252,1253,1254,1257}, CP{850,866,1131},
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
Mac{Cyrillic,Ukraine,Greek,Turkish},
Macintosh
.TP
Semitic languages
.nf
.fi
ISO\-8859\-{6,8}, CP{1255,1256}, CP862, Mac{Hebrew,Arabic}
.TP
Japanese
.nf
.fi
EUC\-JP, SHIFT_JIS, CP932, ISO\-2022\-JP, ISO\-2022\-JP\-2, ISO\-2022\-JP\-1,
ISO-2022\-JP\-MS
.TP
Chinese
.nf
.fi
EUC\-CN, HZ, GBK, CP936, GB18030, EUC\-TW, BIG5, CP950, BIG5\-HKSCS,
BIG5\-HKSCS:2004, BIG5\-HKSCS:2001, BIG5\-HKSCS:1999, ISO\-2022\-CN,
ISO\-2022\-CN\-EXT
.TP
Korean
.nf
.fi
EUC\-KR, CP949, ISO\-2022\-KR, JOHAB
.TP
Armenian
.nf
.fi
ARMSCII\-8
.TP
Georgian
.nf
.fi
Georgian\-Academy, Georgian\-PS
.TP
Tajik
.nf
.fi
KOI8\-T
.TP
Kazakh
.nf
.fi
PT154, RK1048
.TP
Thai
.nf
.fi
TIS\-620, CP874, MacThai
.TP
Laotian
.nf
.fi
MuleLao\-1, CP1133
.TP
Vietnamese
.nf
.fi
VISCII, TCVN, CP1258
.TP
Platform specifics
.nf
.fi
HP\-ROMAN8, NEXTSTEP
.TP
Full Unicode
.nf
.fi
UTF\-8
.nf
.fi
UCS\-2, UCS\-2BE, UCS\-2LE
.nf
.fi
UCS\-4, UCS\-4BE, UCS\-4LE
.nf
.fi
UTF\-16, UTF\-16BE, UTF\-16LE
.nf
.fi
UTF\-32, UTF\-32BE, UTF\-32LE
.nf
.fi
UTF\-7
.nf
.fi
C99, JAVA
.TP
Full Unicode, in terms of \fBuint16_t\fP or \fBuint32_t\fP
(with machine dependent endianness and alignment)
.nf
.fi
UCS\-2\-INTERNAL, UCS\-4\-INTERNAL
.TP
Locale dependent, in terms of \fBchar\fP or \fBwchar_t\fP
(with machine dependent endianness and alignment, and with semantics
depending on the OS and the current LC_CTYPE locale facet)
.nf
.fi
char, wchar_t
.PP
When configured with the option \fB\-\-enable\-extra\-encodings\fP, it also
provides support for a few extra encodings:
.TP
European languages
.nf
CP{437,737,775,852,853,855,857,858,860,861,863,865,869,1125}
.fi
.TP
Semitic languages
.nf
.fi
CP864
.TP
Japanese
.nf
.fi
EUC\-JISX0213, Shift_JISX0213, ISO\-2022\-JP\-3
.TP
Chinese
.nf
.fi
BIG5\-2003 (experimental)
.TP
Turkmen
.nf
.fi
TDS565
.TP
Platform specifics
.nf
.fi
ATARIST, RISCOS\-LATIN1
.PP
.TP
EBCDIC compatible (not ASCII compatible, very rarely used)
.nf
.fi
European languages:
.nf
.fi
IBM-{037,273,277,278,280,282,284,285,297,423,500,870,871,875,880},
IBM-{905,924,1025,1026,1047,1112,1122,1123,1140,1141,1142,1143},
IBM-{1144,1145,1146,1147,1148,1149,1153,1154,1155,1156,1157,1158},
IBM-{1165,1166,4971}
.nf
.fi
Semitic languages:
.nf
.fi
IBM-{424,425,12712,16804}
.nf
.fi
Persian:
.nf
.fi
IBM-1097
.nf
.fi
Thai:
.nf
.fi
IBM-{838,1160}
.nf
.fi
Laotian:
.nf
.fi
IBM-1132
.nf
.fi
Vietnamese:
.nf
.fi
IBM-{1130,1164}
.nf
.fi
Indic languages:
.nf
.fi
IBM-1137
.PP
The empty encoding name "" is equivalent to "char": it denotes the
locale dependent character encoding.
.PP
When the string "//TRANSLIT" is appended to \fItocode\fP, transliteration
is activated. This means that when a character cannot be represented in the
target character set, it can be approximated through one or several characters
that look similar to the original character.
.PP
When the string "//IGNORE" is appended to \fItocode\fP, characters that
cannot be represented in the target character set will be silently discarded.
.PP
The resulting conversion descriptor can be used with \fBiconv\fP any number
of times. It remains valid until deallocated using \fBiconv_close\fP.
.PP
A conversion descriptor contains a conversion state. After creation using
\fBiconv_open\fP, the state is in the initial state. Using \fBiconv\fP
modifies the descriptor's conversion state. (This implies that a conversion
descriptor can not be used in multiple threads simultaneously.) To bring the
state back to the initial state, use \fBiconv\fP with NULL as \fIinbuf\fP
argument.
.SH "RETURN VALUE"
The \fBiconv_open\fP function returns a freshly allocated conversion
descriptor. In case of error, it sets \fBerrno\fP and returns (iconv_t)(\-1).
.SH ERRORS
The following error can occur, among others:
.TP
.B EINVAL
The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
implementation.
.SH "CONFORMING TO"
POSIX:2001
.SH "SEE ALSO"
.BR iconv (3)
.BR iconvctl (3)
.BR iconv_close (3)

View File

@ -0,0 +1,47 @@
.\" Copyright (c) Free Software Foundation, Inc.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 3 of
.\" the License, or (at your option) any later version.
.\"
.\" References consulted:
.\" iconv.h
.\"
.TH ICONV_OPEN_INTO 3 "September 21, 2008" "GNU" "Linux Programmer's Manual"
.SH NAME
iconv_open_into \- initialize descriptor for character set conversion
.SH SYNOPSIS
.nf
.B #include <iconv.h>
.sp
.BI "int iconv_open_into (const char* " tocode ", const char* " fromcode ","
.BI " iconv_allocation_t* " resultp );
.fi
.SH DESCRIPTION
The \fBiconv_open_into\fP function initializes a conversion descriptor suitable
for converting byte sequences from character encoding \fIfromcode\fP to
character encoding \fItocode\fP. The conversion descriptor is stored in the
memory pointed to by \fIresultp\fP.
.PP
The values permitted for \fIfromcode\fP and \fItocode\fP are the same as for
the function \fBiconv_open\fP.
.PP
After a successful return from this function, \fIresultp\fP can be be used
as an \fBiconv_t\fP object with the \fBiconv\fP function.
.SH "RETURN VALUE"
The \fBiconv_open_into\fP function fills \fB*\fP\fIresultp\fP and returns 0 if
it succeeds. In case of error, it sets \fBerrno\fP and returns \-1.
.SH ERRORS
The following error can occur, among others:
.TP
.B EINVAL
The conversion from \fIfromcode\fP to \fItocode\fP is not supported by the
implementation.
.SH "CONFORMING TO"
This function is implemented only in GNU libiconv and not in other \fBiconv\fP
implementations. It is not backed by a standard. You can test for its presence
through \fB(_LIBICONV_VERSION >= 0x010D)\fP.
.SH "SEE ALSO"
.BR iconv_open (3)
.BR iconv (3)

View File

@ -0,0 +1,67 @@
.\" Copyright (c) Perry Rapp
.\" Copyright (c) Free Software Foundation, Inc.
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 3 of
.\" the License, or (at your option) any later version.
.\"
.\" References consulted:
.\" iconv.h
.\"
.TH ICONVCTL 3 "March 31, 2007" "GNU" "Linux Programmer's Manual"
.SH NAME
iconvctl \- control iconv behavior
.SH SYNOPSIS
.nf
.B #include <iconv.h>
.sp
.BI "int iconvctl (iconv_t " cd " , int " request ", void * " argument );
.fi
.SH DESCRIPTION
The argument \fIcd\fP must be a conversion descriptor created using the
function \fBiconv_open\fP.
.PP
\fBiconvctl\fP queries or adjusts the behavior of the \fBiconv\fP function,
when invoked with the specified conversion descriptor, depending on the
request value.
.SH "REQUEST VALUES"
The following are permissible values for the \fIrequest\fP parameter.
.TP
.B ICONV_TRIVIALP
\fIargument\fP should be an \fBint *\fP which will receive 1 if the
conversion is trivial, or 0 otherwise.
.TP
.B ICONV_GET_TRANSLITERATE
\fIargument\fP should be an \fBint *\fP which will receive 1 if
transliteration is enabled in the conversion, or 0 otherwise.
.TP
.B ICONV_SET_TRANSLITERATE
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
A non-zero value is used to enable transliteration in the conversion. A zero
value disables it.
.TP
.B ICONV_GET_DISCARD_ILSEQ
\fIargument\fP should be an \fBint *\fP which will receive 1 if
"illegal sequence discard and continue" is enabled in the conversion,
or 0 otherwise.
.TP
.B ICONV_SET_DISCARD_ILSEQ
\fIargument\fP should be a \fBconst int *\fP, pointing to an \fBint\fP value.
A non-zero value is used to enable "illegal sequence discard and continue"
in the conversion. A zero value disables it.
.SH "RETURN VALUE"
The \fBiconvctl\fP function returns 0 if it succeeds. In case of error, it sets
\fBerrno\fP and returns \-1.
.SH ERRORS
The following errors can occur, among others:
.TP
.B EINVAL
The request is invalid.
.SH "CONFORMING TO"
This function is implemented only in GNU libiconv and not in other \fBiconv\fP
implementations. It is not backed by a standard. You can test for its presence
through \fB(_LIBICONV_VERSION >= 0x0108)\fP.
.SH "SEE ALSO"
.BR iconv_open (3)
.BR iconv (3)

658
po/Makefile Normal file
View File

@ -0,0 +1,658 @@
# Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2000-2020 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
#
# Origin: gettext-0.21
GETTEXT_MACRO_VERSION = 0.20
PACKAGE = libiconv
VERSION = 1.17
PACKAGE_BUGREPORT =
SED = /usr/bin/sed
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
localedir = ${datarootdir}/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_DATA = ${INSTALL} -m 644
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
# ${SHELL} /Users/yangzuhao/Downloads/libiconv-1.17/build-aux/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, $(MKDIR_P) is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
mkinstalldirs = $(SHELL) ${SHELL} /Users/yangzuhao/Downloads/libiconv-1.17/build-aux/install-sh -d
install_sh = $(SHELL) ${SHELL} /Users/yangzuhao/Downloads/libiconv-1.17/build-aux/install-sh
MKDIR_P = /opt/homebrew/bin/gmkdir -p
mkdir_p = $(MKDIR_P)
# When building gettext-tools, we prefer to use the built programs
# rather than installed programs. However, we can't do that when we
# are cross compiling.
CROSS_COMPILING = @CROSS_COMPILING@
GMSGFMT_ = /opt/homebrew/bin/msgfmt
GMSGFMT_no = /opt/homebrew/bin/msgfmt
GMSGFMT_yes = /opt/homebrew/bin/msgfmt
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
XGETTEXT_ = /opt/homebrew/bin/xgettext
XGETTEXT_no = /opt/homebrew/bin/xgettext
XGETTEXT_yes = /opt/homebrew/bin/xgettext
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
MSGMERGE = /opt/homebrew/bin/msgmerge
MSGMERGE_UPDATE = /opt/homebrew/bin/msgmerge --update
MSGMERGE_FOR_MSGFMT_OPTION = --for-msgfmt
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
POFILES = af.po bg.po ca.po cs.po da.po de.po el.po eo.po es.po et.po fi.po fr.po ga.po gl.po hr.po hu.po id.po it.po ja.po ko.po lt.po nl.po pl.po pt_BR.po rm.po ro.po ru.po sk.po sl.po sq.po sr.po sv.po tr.po uk.po vi.po wa.po zh_CN.po zh_TW.po
GMOFILES = af.gmo bg.gmo ca.gmo cs.gmo da.gmo de.gmo el.gmo eo.gmo es.gmo et.gmo fi.gmo fr.gmo ga.gmo gl.gmo hr.gmo hu.gmo id.gmo it.gmo ja.gmo ko.gmo lt.gmo nl.gmo pl.gmo pt_BR.gmo rm.gmo ro.gmo ru.gmo sk.gmo sl.gmo sq.gmo sr.gmo sv.gmo tr.gmo uk.gmo vi.gmo wa.gmo zh_CN.gmo zh_TW.gmo
UPDATEPOFILES = af.po-update bg.po-update ca.po-update cs.po-update da.po-update de.po-update el.po-update eo.po-update es.po-update et.po-update fi.po-update fr.po-update ga.po-update gl.po-update hr.po-update hu.po-update id.po-update it.po-update ja.po-update ko.po-update lt.po-update nl.po-update pl.po-update pt_BR.po-update rm.po-update ro.po-update ru.po-update sk.po-update sl.po-update sq.po-update sr.po-update sv.po-update tr.po-update uk.po-update vi.po-update wa.po-update zh_CN.po-update zh_TW.po-update
DUMMYPOFILES = af.nop bg.nop ca.nop cs.nop da.nop de.nop el.nop eo.nop es.nop et.nop fi.nop fr.nop ga.nop gl.nop hr.nop hu.nop id.nop it.nop ja.nop ko.nop lt.nop nl.nop pl.nop pt_BR.nop rm.nop ro.nop ru.nop sk.nop sl.nop sq.nop sr.nop sv.nop tr.nop uk.nop vi.nop wa.nop zh_CN.nop zh_TW.nop
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
POTFILES = \
../src/iconv.c
CATALOGS = af.gmo bg.gmo ca.gmo cs.gmo da.gmo de.gmo el.gmo eo.gmo es.gmo et.gmo fi.gmo fr.gmo ga.gmo gl.gmo hr.gmo hu.gmo id.gmo it.gmo ja.gmo ko.gmo lt.gmo nl.gmo pl.gmo pt_BR.gmo rm.gmo ro.gmo ru.gmo sk.gmo sl.gmo sq.gmo sr.gmo sv.gmo tr.gmo uk.gmo vi.gmo wa.gmo zh_CN.gmo zh_TW.gmo
POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
POFILESDEPS_yes = $(POFILESDEPS_)
POFILESDEPS_no =
POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
DISTFILESDEPS_ = update-po
DISTFILESDEPS_yes = $(DISTFILESDEPS_)
DISTFILESDEPS_no =
DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
# Makevars gets inserted here. (Don't remove this line!)
# Makefile variables for libiconv/po.
#
# Copyright (C) 2003-2019 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation gives
# unlimited permission to use, copy, distribute, and modify it.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = \
--keyword=_ --flag=_:1:pass-c-format \
--keyword=N_ --flag=N_:1:pass-c-format \
--flag=error:3:c-format --flag=error_at_line:5:c-format
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty. If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU = yes
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-gnu-libiconv@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no
# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS =
# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
MSGINIT_OPTIONS =
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed. Possible values are "yes" and "no". Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = yes
# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist". Possible values are "yes" and
# "no". Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = yes
all: all-no
.SUFFIXES:
.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs.
# The GNU Coding Standards say in
# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
# "GNU distributions usually contain some files which are not source files
# ... . Since these files normally appear in the source directory, they
# should always appear in the source directory, not in the build directory.
# So Makefile rules to update them should put the updated files in the
# source directory."
# Therefore we put these files in the source directory, not the build directory.
# During .po -> .gmo conversion, take into account the most recent changes to
# the .pot file. This eliminates the need to update the .po files when the
# .pot file has changed, which would be troublesome if the .po files are put
# under version control.
$(GMOFILES): $(srcdir)/$(DOMAIN).pot
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
cd $(srcdir) && \
rm -f $${lang}.gmo && \
$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \
$(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \
mv t-$${lang}.gmo $${lang}.gmo && \
rm -f $${lang}.1po
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all-yes: $(srcdir)/stamp-po
all-no:
# Ensure that the gettext macros and this Makefile.in.in are in sync.
CHECK_MACRO_VERSION = \
test "$(GETTEXT_MACRO_VERSION)" = "0.20" \
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version 0.20" 1>&2; \
exit 1; \
}
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
# we don't want to bother translators with empty POT files). We assume that
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target).
# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS
# have been loosely updated. Its purpose is that when a developer or translator
# checks out the package from a version control system, and the $(DOMAIN).pot
# file is not under version control, "make" will update the $(DOMAIN).pot and
# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This
# timestamp would not be necessary if updating the $(CATALOGS) would always
# touch them; however, the rule for $(POFILES) has been designed to not touch
# files that don't need to be changed.
$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot
@$(CHECK_MACRO_VERSION)
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
echo "touch $(srcdir)/stamp-po" && \
echo timestamp > $(srcdir)/stamp-poT && \
mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \
}
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
# The determination of whether the package xyz is a GNU one is based on the
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
package_gnu="$(PACKAGE_GNU)"; \
test -n "$$package_gnu" || { \
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU libiconv' /dev/null '{}' ';' 2>/dev/null; \
else \
LC_ALL=C grep -i 'GNU libiconv' $(top_srcdir)/* 2>/dev/null; \
fi; \
} | grep -v 'libtool:' >/dev/null; then \
package_gnu=yes; \
else \
package_gnu=no; \
fi; \
}; \
if test "$$package_gnu" = "yes"; then \
package_prefix='GNU '; \
else \
package_prefix=''; \
fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
else \
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
fi; \
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address" \
$(XGETTEXT_OPTIONS) --flag=error:3:c-format --flag=error_at_line:5:c-format \
;; \
*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--package-name="$${package_prefix}libiconv" \
--package-version='1.17' \
--msgid-bugs-address="$$msgid_bugs_address" \
$(XGETTEXT_OPTIONS) --flag=error:3:c-format --flag=error_at_line:5:c-format \
;; \
esac
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot-header; then \
sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
rm -f $(DOMAIN).1po \
|| exit 1; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
}
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
# every "make" invocation, only create it when it is missing.
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(POFILESDEPS)
@test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) \
&& { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
0.1[6-7] | 0.1[6-7].*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \
esac; \
}; \
else \
$(MAKE) $${lang}.po-create; \
fi
install: install-exec install-data
install-exec:
install-data: install-data-no
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
for file in Makevars; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
fi; \
done; \
done
install-strip: install
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-no
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
installdirs-data-no:
installdirs-data-yes:
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
fi; \
done; \
done
# Define this as empty until I found a useful application.
installcheck:
uninstall: uninstall-exec uninstall-data
uninstall-exec:
uninstall-data: uninstall-data-no
if test "$(PACKAGE)" = "gettext-tools"; then \
for file in $(DISTFILES.common) Makevars.template; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
uninstall-data-no:
uninstall-data-yes:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
done; \
done
check: all
info dvi ps pdf html tags TAGS ctags CTAGS ID:
install-dvi install-ps install-pdf install-html:
mostlyclean:
rm -f remove-potcdate.sed
rm -f $(srcdir)/stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: $(srcdir)/stamp-po $(DISTFILES)
@dists="$(DISTFILES)"; \
if test "$(PACKAGE)" = "gettext-tools"; then \
dists="$$dists Makevars.template"; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
dists="$$dists $(DOMAIN).pot stamp-po"; \
else \
case $(XGETTEXT) in \
:) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \
*) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \
esac; \
fi; \
if test -f $(srcdir)/ChangeLog; then \
dists="$$dists ChangeLog"; \
fi; \
for i in 0 1 2 3 4 5 6 7 8 9; do \
if test -f $(srcdir)/ChangeLog.$$i; then \
dists="$$dists ChangeLog.$$i"; \
fi; \
done; \
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
for file in $$dists; do \
if test -f $$file; then \
cp -p $$file $(distdir) || exit 1; \
else \
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
fi; \
done
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for creating PO files.
.nop.po-create:
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
exit 1
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
0.1[6-7] | 0.1[6-7].*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
esac; \
}; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
$(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
# because execution permission bits may not work on the current file system.
# Use /bin/sh, which is the shell determined by autoconf for the use by its
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status POTFILES.in LINGUAS
cd $(top_builddir) \
&& /bin/sh ./config.status $(subdir)/$@.in po-directories
force:
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# Special Makefile rules for English message catalogs with quotation marks.
#
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
# This file, Rules-quot, and its auxiliary files (listed under
# DISTFILES.common.extra1) are free software; the Free Software Foundation
# gives unlimited permission to use, copy, distribute, and modify them.
DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
.SUFFIXES: .insert-header .po-update-en
en@quot.po-create:
$(MAKE) en@quot.po-update
en@boldquot.po-create:
$(MAKE) en@boldquot.po-update
en@quot.po-update: en@quot.po-update-en
en@boldquot.po-update: en@boldquot.po-update-en
.insert-header.po-update-en:
@lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
ll=`echo $$lang | sed -e 's/@.*//'`; \
LC_ALL=C; export LC_ALL; \
cd $(srcdir); \
if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \
| $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \
{ case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \
$(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \
;; \
*) \
$(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \
;; \
esac } 2>/dev/null > $$tmpdir/$$lang.new.po \
; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "creation of $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
en@quot.insert-header: insert-header.sin
sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
en@boldquot.insert-header: insert-header.sin
sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
mostlyclean: mostlyclean-quot
mostlyclean-quot:
rm -f *.insert-header

510
po/Makefile.in Normal file
View File

@ -0,0 +1,510 @@
# Makefile for PO directory in any package using GNU gettext.
# Copyright (C) 1995-2000 Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2000-2020 Free Software Foundation, Inc.
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
#
# Origin: gettext-0.21
GETTEXT_MACRO_VERSION = 0.20
PACKAGE = libiconv
VERSION = 1.17
PACKAGE_BUGREPORT =
SED = /usr/bin/sed
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
exec_prefix = ${prefix}
datarootdir = ${prefix}/share
datadir = ${datarootdir}
localedir = ${datarootdir}/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_DATA = ${INSTALL} -m 644
# We use $(mkdir_p).
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
# ${SHELL} /Users/yangzuhao/Downloads/libiconv-1.17/build-aux/install-sh does not start with $(SHELL), so we add it.
# In automake >= 1.10, $(MKDIR_P) is derived from ${MKDIR_P}, which is defined
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
# versions, $(mkinstalldirs) and $(install_sh) are unused.
mkinstalldirs = $(SHELL) ${SHELL} /Users/yangzuhao/Downloads/libiconv-1.17/build-aux/install-sh -d
install_sh = $(SHELL) ${SHELL} /Users/yangzuhao/Downloads/libiconv-1.17/build-aux/install-sh
MKDIR_P = /opt/homebrew/bin/gmkdir -p
mkdir_p = $(MKDIR_P)
# When building gettext-tools, we prefer to use the built programs
# rather than installed programs. However, we can't do that when we
# are cross compiling.
CROSS_COMPILING = @CROSS_COMPILING@
GMSGFMT_ = /opt/homebrew/bin/msgfmt
GMSGFMT_no = /opt/homebrew/bin/msgfmt
GMSGFMT_yes = /opt/homebrew/bin/msgfmt
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
XGETTEXT_ = /opt/homebrew/bin/xgettext
XGETTEXT_no = /opt/homebrew/bin/xgettext
XGETTEXT_yes = /opt/homebrew/bin/xgettext
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
MSGMERGE = /opt/homebrew/bin/msgmerge
MSGMERGE_UPDATE = /opt/homebrew/bin/msgmerge --update
MSGMERGE_FOR_MSGFMT_OPTION = --for-msgfmt
MSGINIT = msginit
MSGCONV = msgconv
MSGFILTER = msgfilter
POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
POTFILES = \
CATALOGS = @CATALOGS@
POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
POFILESDEPS_yes = $(POFILESDEPS_)
POFILESDEPS_no =
POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
DISTFILESDEPS_ = update-po
DISTFILESDEPS_yes = $(DISTFILESDEPS_)
DISTFILESDEPS_no =
DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
# Makevars gets inserted here. (Don't remove this line!)
all: all-no
.SUFFIXES:
.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update
# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs.
# The GNU Coding Standards say in
# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
# "GNU distributions usually contain some files which are not source files
# ... . Since these files normally appear in the source directory, they
# should always appear in the source directory, not in the build directory.
# So Makefile rules to update them should put the updated files in the
# source directory."
# Therefore we put these files in the source directory, not the build directory.
# During .po -> .gmo conversion, take into account the most recent changes to
# the .pot file. This eliminates the need to update the .po files when the
# .pot file has changed, which would be troublesome if the .po files are put
# under version control.
$(GMOFILES): $(srcdir)/$(DOMAIN).pot
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \
cd $(srcdir) && \
rm -f $${lang}.gmo && \
$(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \
$(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \
mv t-$${lang}.gmo $${lang}.gmo && \
rm -f $${lang}.1po
.sin.sed:
sed -e '/^#/d' $< > t-$@
mv t-$@ $@
all-yes: $(srcdir)/stamp-po
all-no:
# Ensure that the gettext macros and this Makefile.in.in are in sync.
CHECK_MACRO_VERSION = \
test "$(GETTEXT_MACRO_VERSION)" = "0.20" \
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version 0.20" 1>&2; \
exit 1; \
}
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
# we don't want to bother translators with empty POT files). We assume that
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target).
# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS
# have been loosely updated. Its purpose is that when a developer or translator
# checks out the package from a version control system, and the $(DOMAIN).pot
# file is not under version control, "make" will update the $(DOMAIN).pot and
# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This
# timestamp would not be necessary if updating the $(CATALOGS) would always
# touch them; however, the rule for $(POFILES) has been designed to not touch
# files that don't need to be changed.
$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot
@$(CHECK_MACRO_VERSION)
test ! -f $(srcdir)/$(DOMAIN).pot || \
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
echo "touch $(srcdir)/stamp-po" && \
echo timestamp > $(srcdir)/stamp-poT && \
mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \
}
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
# The determination of whether the package xyz is a GNU one is based on the
# heuristic whether some file in the top level directory mentions "GNU xyz".
# If GNU 'find' is available, we avoid grepping through monster files.
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
package_gnu="$(PACKAGE_GNU)"; \
test -n "$$package_gnu" || { \
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU libiconv' /dev/null '{}' ';' 2>/dev/null; \
else \
LC_ALL=C grep -i 'GNU libiconv' $(top_srcdir)/* 2>/dev/null; \
fi; \
} | grep -v 'libtool:' >/dev/null; then \
package_gnu=yes; \
else \
package_gnu=no; \
fi; \
}; \
if test "$$package_gnu" = "yes"; then \
package_prefix='GNU '; \
else \
package_prefix=''; \
fi; \
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
else \
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
fi; \
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--msgid-bugs-address="$$msgid_bugs_address" \
$(XGETTEXT_OPTIONS) --flag=error:3:c-format --flag=error_at_line:5:c-format \
;; \
*) \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
--package-name="$${package_prefix}libiconv" \
--package-version='1.17' \
--msgid-bugs-address="$$msgid_bugs_address" \
$(XGETTEXT_OPTIONS) --flag=error:3:c-format --flag=error_at_line:5:c-format \
;; \
esac
test ! -f $(DOMAIN).po || { \
if test -f $(srcdir)/$(DOMAIN).pot-header; then \
sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \
rm -f $(DOMAIN).1po \
|| exit 1; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
else \
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
else \
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
fi; \
}
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
# every "make" invocation, only create it when it is missing.
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(POFILESDEPS)
@test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
if test -f "$(srcdir)/$${lang}.po"; then \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \
cd $(srcdir) \
&& { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
0.1[6-7] | 0.1[6-7].*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \
*) \
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \
esac; \
}; \
else \
$(MAKE) $${lang}.po-create; \
fi
install: install-exec install-data
install-exec:
install-data: install-data-no
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
for file in Makevars; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
fi; \
done; \
done
install-strip: install
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-no
if test "$(PACKAGE)" = "gettext-tools"; then \
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
installdirs-data-no:
installdirs-data-yes:
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
for file in *; do \
if test -f $$file; then \
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
fi; \
done); \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
else \
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
:; \
else \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
fi; \
fi; \
fi; \
done; \
done
# Define this as empty until I found a useful application.
installcheck:
uninstall: uninstall-exec uninstall-data
uninstall-exec:
uninstall-data: uninstall-data-no
if test "$(PACKAGE)" = "gettext-tools"; then \
for file in $(DISTFILES.common) Makevars.template; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
uninstall-data-no:
uninstall-data-yes:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
done; \
done
check: all
info dvi ps pdf html tags TAGS ctags CTAGS ID:
install-dvi install-ps install-pdf install-html:
mostlyclean:
rm -f remove-potcdate.sed
rm -f $(srcdir)/stamp-poT
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: $(srcdir)/stamp-po $(DISTFILES)
@dists="$(DISTFILES)"; \
if test "$(PACKAGE)" = "gettext-tools"; then \
dists="$$dists Makevars.template"; \
fi; \
if test -f $(srcdir)/$(DOMAIN).pot; then \
dists="$$dists $(DOMAIN).pot stamp-po"; \
else \
case $(XGETTEXT) in \
:) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \
*) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \
esac; \
fi; \
if test -f $(srcdir)/ChangeLog; then \
dists="$$dists ChangeLog"; \
fi; \
for i in 0 1 2 3 4 5 6 7 8 9; do \
if test -f $(srcdir)/ChangeLog.$$i; then \
dists="$$dists ChangeLog.$$i"; \
fi; \
done; \
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
for file in $$dists; do \
if test -f $$file; then \
cp -p $$file $(distdir) || exit 1; \
else \
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
fi; \
done
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
# General rule for creating PO files.
.nop.po-create:
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
exit 1
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
cd $(srcdir); \
if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
0.1[6-7] | 0.1[6-7].*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
*) \
$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
esac; \
}; then \
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.po failed!" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
fi
$(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
# because execution permission bits may not work on the current file system.
# Use /bin/sh, which is the shell determined by autoconf for the use by its
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
&& /bin/sh ./config.status $(subdir)/$@.in po-directories
force:
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

1
po/POTFILES Normal file
View File

@ -0,0 +1 @@
../src/iconv.c

167
src/Makefile Normal file
View File

@ -0,0 +1,167 @@
# Makefile for libiconv/src
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = .
top_srcdir = ..
# Directories used by "make install":
prefix = /Users/yangzuhao/Downloads/libiconv-1.17/output
local_prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib
datarootdir = ${prefix}/share
datadir = ${datarootdir}
localedir = ${datarootdir}/locale
# Programs used by "make":
CC = gcc
CFLAGS = -g -O2
CPPFLAGS =
LDFLAGS =
INCLUDES = -I. -I$(srcdir) -I.. -I../include -I$(srcdir)/../include -I../srclib -I$(srcdir)/../srclib
LIBTOOL = /bin/sh $(top_builddir)/libtool
LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
WINDRES =
RM = rm -f
# Programs used by "make install":
INSTALL = /opt/homebrew/bin/ginstall -c
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DATA = ${INSTALL} -m 644
mkinstalldirs = $(SHELL) ../build-aux/mkinstalldirs
# Programs used by "make install-strip":
STRIP = /usr/bin/strip
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
install_sh = ${SHELL} /Users/yangzuhao/Downloads/libiconv-1.17/build-aux/install-sh
#### End of system configuration section. ####
SHELL = /bin/sh
PACKAGE_VERSION = 1.17
# Needed by $(LIBTOOL).
top_builddir = ..
# Needed by SET_RELOCATABLE.
EXEEXT =
# Needed by RELOCATABLE_LDFLAGS.
host = aarch64-apple-darwin22.4.0
OBJECTS_RES_yes = iconv.res
OBJECTS_RES_no =
# We cannot link with libintl until libiconv is installed. (When we call
# libtool with arguments "../lib/libiconv.la -lintl", libtool will call ld
# with "../lib/.libs/libiconv.so $libdir/libintl.so $libdir/libiconv.so",
# (remember that $libdir/libintl.la lists $libdir/libiconv.so as a dependency),
# and this gives a fatal linker error on Solaris because the two libiconv.so
# files are different but have the same soname.
# So we can link the iconv executable only after we have installed libiconv,
# i.e. during "make install". The intermediate 'iconv' executable is built
# without internationalization and not linked with libintl.
all : iconv_no_i18n$(EXEEXT) iconv.o $(OBJECTS_RES_no)
test `ls -ld . | sed -e 's/^d\(.........\).*/\1/'` = rwxrwxrwx || chmod 777 .
# This is the temporary iconv executable, without internationalization.
iconv_no_i18n$(EXEEXT) : iconv_no_i18n.o ../lib/libiconv.la $(OBJECTS_RES_no)
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) iconv_no_i18n.o ../srclib/libicrt.a ../lib/libiconv.la $(OBJECTS_RES_no) -o $@
iconv_no_i18n.o : $(srcdir)/iconv_no_i18n.c $(srcdir)/iconv.c
$(CC) -c $(INCLUDES) -I../lib $(CFLAGS) $(CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" -DLOCALEDIR=\"$(localedir)\" $(srcdir)/iconv_no_i18n.c
iconv.o : $(srcdir)/iconv.c
$(CC) -c $(INCLUDES) -I../lib $(CFLAGS) $(CPPFLAGS) -DINSTALLDIR=\"$(bindir)\" -DLOCALEDIR=\"$(localedir)\" $(srcdir)/iconv.c
iconv.res : $(srcdir)/../windows/iconv.rc
$(WINDRES) `$(SHELL) $(srcdir)/../windows/windres-options --escape $(PACKAGE_VERSION)` -i $(srcdir)/../windows/iconv.rc -o iconv.res --output-format=coff
# The following rule is necessary to avoid a toplevel "make -n check" failure.
../lib/libiconv.la :
cd ../lib && $(MAKE) libiconv.la
# Support for relocatability.
RELOCATABLE_LIBRARY_PATH = $(libdir)
RELOCATABLE_SRC_DIR = $(top_srcdir)/srclib
RELOCATABLE_BUILD_DIR = ../srclib
RELOCATABLE_CONFIG_H_DIR = ..
RELOCATABLE_LDFLAGS =
RELOCATABLE_STRIP = :
INSTALL_PROGRAM_ENV =
iconv_LDFLAGS = `if test -n '$(RELOCATABLE_LDFLAGS)'; then $(RELOCATABLE_LDFLAGS) $(bindir); fi`
# During "make install", we can build the final iconv executable.
# On HP-UX, in order to ensure that the new libiconv.sl will override the old
# one that is hardcoded in libintl.sl, we need to mention libiconv.sl before
# libintl.sl on the link command line. We have to bypass libtool in order to
# achieve this.
# On Solaris, the linker gives an error if we are using libintl.so and it
# refers to a libiconv.so in $prefix/lib since then it sees two libiconv.so's,
# one in $prefix/lib and one in ../lib/.libs. So we have to avoid using
# ../lib/libiconv.la entirely.
install : all force
if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
case "darwin22.4.0" in \
hpux*) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.o ../srclib/libicrt.a -L$(DESTDIR)$(libdir) -liconv $(OBJECTS_RES_no) `if test -n '$(DESTDIR)'; then echo " -Wl,+b -Wl,$(libdir)"; fi` -o iconv$(EXEEXT);; \
*) $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) $(iconv_LDFLAGS) iconv.o ../srclib/libicrt.a $(DESTDIR)$(libdir)/libiconv.la $(OBJECTS_RES_no) -o iconv$(EXEEXT);; \
esac
$(INSTALL_PROGRAM_ENV) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv$(EXEEXT) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
install-strip : force
case '$(INSTALL_PROGRAM)' in \
*/install-reloc) \
$(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)' RELOCATABLE_STRIP='$(STRIP)' ;; \
*) \
$(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)' INSTALL_PROGRAM='$(INSTALL_STRIP_PROGRAM)' ;; \
esac
installdirs : force
if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
uninstall : force
$(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(bindir)/iconv$(EXEEXT)
check : all
mostlyclean : clean
clean : force
$(RM) *.o *.lo iconv.res iconv_no_i18n iconv_no_i18n$(EXEEXT) iconv$(EXEEXT) core *.stackdump
$(RM) -r .libs _libs
distclean : clean
$(RM) Makefile
maintainer-clean : distclean
# List of source files.
SOURCE_FILES = \
Makefile.in \
iconv.c iconv_no_i18n.c
# List of distributed files imported from other packages.
IMPORTED_FILES =
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES =
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
force :

3151
srclib/Makefile Normal file

File diff suppressed because it is too large Load Diff

0
srclib/malloc/.dirstamp Normal file
View File

View File

1
stamp-h1 Normal file
View File

@ -0,0 +1 @@
timestamp for config.h

531
tests/Makefile Normal file
View File

@ -0,0 +1,531 @@
# Makefile for libiconv/tests
#### Start of system configuration section. ####
# Directories used by "make":
srcdir = .
# Programs used by "make":
CC = gcc
CFLAGS = -g -O2
CPPFLAGS =
LDFLAGS =
INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include -I../srclib -I$(srcdir)/../srclib -I..
LIBTOOL = /bin/sh $(top_builddir)/libtool
LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
RM = rm -f
#### End of system configuration section. ####
SHELL = /bin/sh
# Needed by $(LIBTOOL).
top_builddir = ..
all :
check : all table-from table-to ../src/iconv_no_i18n is-native test-shiftseq test-to-wchar
$(SHELL) $(srcdir)/check-stateless $(srcdir) ASCII
# /* General multi-byte encodings */
$(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/genutf8.c ../srclib/libicrt.a -o genutf8 && \
./genutf8 > UTF-8.TXT && \
$(SHELL) $(srcdir)/check-stateless . UTF-8 && \
$(RM) -r genutf8 genutf8.dSYM UTF-8.TXT
$(SHELL) $(srcdir)/check-stateful $(srcdir) UCS-2BE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UCS-2LE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UCS-4BE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UCS-4LE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UTF-16
$(SHELL) $(srcdir)/check-stateful $(srcdir) UTF-16BE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UTF-16LE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UTF-32
$(SHELL) $(srcdir)/check-stateful $(srcdir) UTF-32BE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UTF-32LE
$(SHELL) $(srcdir)/check-stateful $(srcdir) UTF-7
# /* 8-bit encodings */
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-1
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-2
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-3
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-4
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-5
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-6
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-7
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-8
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-9
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-10
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-11
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-13
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-14
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-15
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-8859-16
$(SHELL) $(srcdir)/check-stateless $(srcdir) KOI8-R
$(SHELL) $(srcdir)/check-stateless $(srcdir) KOI8-U
$(SHELL) $(srcdir)/check-stateless $(srcdir) KOI8-RU
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1250
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1251
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1252
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1253
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1254
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1255
$(SHELL) $(srcdir)/check-stateful $(srcdir) CP1255
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1256
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1257
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1258
$(SHELL) $(srcdir)/check-stateful $(srcdir) CP1258
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP850
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP862
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP866
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1131
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacRoman
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacCentralEurope
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacIceland
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacCroatian
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacRomania
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacCyrillic
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacUkraine
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacGreek
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacTurkish
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacHebrew
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacArabic
$(SHELL) $(srcdir)/check-stateless $(srcdir) MacThai
$(SHELL) $(srcdir)/check-stateless $(srcdir) HP-ROMAN8
$(SHELL) $(srcdir)/check-stateless $(srcdir) NEXTSTEP
$(SHELL) $(srcdir)/check-stateless $(srcdir) ARMSCII-8
$(SHELL) $(srcdir)/check-stateless $(srcdir) Georgian-Academy
$(SHELL) $(srcdir)/check-stateless $(srcdir) Georgian-PS
$(SHELL) $(srcdir)/check-stateless $(srcdir) KOI8-T
$(SHELL) $(srcdir)/check-stateless $(srcdir) PT154
$(SHELL) $(srcdir)/check-stateless $(srcdir) RK1048
$(SHELL) $(srcdir)/check-stateless $(srcdir) MuleLao-1
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1133
$(SHELL) $(srcdir)/check-stateless $(srcdir) TIS-620
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP874
$(SHELL) $(srcdir)/check-stateless $(srcdir) VISCII
$(SHELL) $(srcdir)/check-stateless $(srcdir) TCVN
$(SHELL) $(srcdir)/check-stateful $(srcdir) TCVN
# /* CJK character sets */
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO646-JP
$(SHELL) $(srcdir)/check-stateless $(srcdir) JIS_X0201
# $(SHELL) $(srcdir)/check-stateless $(srcdir) JIS_X0208 # redundant, see EUC-JP
# $(SHELL) $(srcdir)/check-stateless $(srcdir) JIS_X0212 # redundant, see EUC-JP
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO646-CN
# $(SHELL) $(srcdir)/check-stateless $(srcdir) GB_2312-80 # redundant, see EUC-CN
$(SHELL) $(srcdir)/check-stateless $(srcdir) ISO-IR-165
# $(SHELL) $(srcdir)/check-stateless $(srcdir) KSC_5601 # redundant, see EUC-KR
# /* CJK encodings */
$(SHELL) $(srcdir)/check-stateless $(srcdir) EUC-JP
$(SHELL) $(srcdir)/check-stateless $(srcdir) SHIFT_JIS
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP932
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-JP
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-JP-2
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-JP-1
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-JP-MS
$(SHELL) $(srcdir)/check-stateless $(srcdir) EUC-CN
$(SHELL) $(srcdir)/check-stateless $(srcdir) GBK
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP936
$(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/gengb18030z.c ../srclib/libicrt.a -o gengb18030z && \
{ cat $(srcdir)/GB18030-BMP.TXT ; ./gengb18030z ; } | sort > GB18030.TXT && \
{ test $(srcdir) = . || cp $(srcdir)/GB18030.IRREVERSIBLE.TXT GB18030.IRREVERSIBLE.TXT; } && \
$(SHELL) $(srcdir)/check-stateless . GB18030 && \
{ test $(srcdir) = . || $(RM) GB18030.IRREVERSIBLE.TXT; } && \
$(RM) -r gengb18030z gengb18030z.dSYM GB18030.TXT
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-CN
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-CN-EXT
$(SHELL) $(srcdir)/check-stateful $(srcdir) HZ
$(SHELL) $(srcdir)/check-stateless $(srcdir) EUC-TW
$(SHELL) $(srcdir)/check-stateless $(srcdir) BIG5
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP950
$(SHELL) $(srcdir)/check-stateless $(srcdir) BIG5-HKSCS:1999
$(SHELL) $(srcdir)/check-stateful $(srcdir) BIG5-HKSCS:1999
$(SHELL) $(srcdir)/check-stateless $(srcdir) BIG5-HKSCS:2001
$(SHELL) $(srcdir)/check-stateful $(srcdir) BIG5-HKSCS:2001
$(SHELL) $(srcdir)/check-stateless $(srcdir) BIG5-HKSCS:2004
$(SHELL) $(srcdir)/check-stateful $(srcdir) BIG5-HKSCS:2004
$(SHELL) $(srcdir)/check-stateless $(srcdir) BIG5-HKSCS:2008
$(SHELL) $(srcdir)/check-stateful $(srcdir) BIG5-HKSCS:2008
$(SHELL) $(srcdir)/check-stateless $(srcdir) EUC-KR
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP949
$(SHELL) $(srcdir)/check-stateless $(srcdir) JOHAB
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-KR
# /* system dependent and extra encodings */
$(MAKE) check-extra
# /* transliteration */
$(SHELL) $(srcdir)/check-translit $(srcdir) Quotes UTF-8 ISO-8859-1
$(SHELL) $(srcdir)/check-translit $(srcdir) Quotes UTF-8 ASCII
$(SHELL) $(srcdir)/check-translit $(srcdir) Translit1 ISO-8859-1 ASCII
$(SHELL) $(srcdir)/check-translitfailure $(srcdir) TranslitFail1 ISO-8859-1 ASCII
# /* substitution */
$(SHELL) $(srcdir)/check-subst
# /* shift sequence before invalid multibyte character */
./test-shiftseq
# /* conversion to wchar_t */
./test-to-wchar
check-extra: check-extra-no
check-extra-no:
check-extra-yes: all table-from table-to ../src/iconv_no_i18n
# /* AIX specific encodings */
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP856
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP922
# $(SHELL) $(srcdir)/check-stateless $(srcdir) CP943
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1046
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1124
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1129
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1161
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1162
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1163
# /* OSF/1 specific encodings */
$(SHELL) $(srcdir)/check-stateless $(srcdir) DEC-KANJI
$(SHELL) $(srcdir)/check-stateless $(srcdir) DEC-HANYU
# /* DOS specific encodings */
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP437
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP737
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP775
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP852
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP853
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP855
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP857
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP858
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP860
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP861
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP863
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP864
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP865
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP869
$(SHELL) $(srcdir)/check-stateless $(srcdir) CP1125
# /* z/OS specific encodings, i.e. EBCDIC encodings */
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-037
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-273
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-277
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-278
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-280
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-282
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-284
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-285
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-297
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-423
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-424
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-425
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-500
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-838
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-870
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-871
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-875
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-880
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-905
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-924
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1025
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1026
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1047
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1097
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1112
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1122
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1123
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1130
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1132
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1137
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1140
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1141
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1142
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1143
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1144
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1145
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1146
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1147
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1148
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1149
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1153
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1154
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1155
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1156
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1157
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1158
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1160
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1164
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1165
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-1166
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-4971
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-12712
$(SHELL) $(srcdir)/check-stateless $(srcdir) IBM-16804
# /* Extra encodings */
$(SHELL) $(srcdir)/check-stateless $(srcdir) EUC-JISX0213
$(SHELL) $(srcdir)/check-stateless $(srcdir) SHIFT_JISX0213
$(SHELL) $(srcdir)/check-stateful $(srcdir) ISO-2022-JP-3
$(SHELL) $(srcdir)/check-stateless $(srcdir) BIG5-2003
$(SHELL) $(srcdir)/check-stateless $(srcdir) TDS565
$(SHELL) $(srcdir)/check-stateless $(srcdir) ATARIST
$(SHELL) $(srcdir)/check-stateless $(srcdir) RISCOS-LATIN1
table-from : table-from.o ../lib/libiconv.la
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) table-from.o ../srclib/libicrt.a ../lib/libiconv.la -o $@
table-from.o : $(srcdir)/table-from.c
$(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/table-from.c
table-to : table-to.o ../lib/libiconv.la
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) table-to.o ../srclib/libicrt.a ../lib/libiconv.la -o $@
table-to.o : $(srcdir)/table-to.c
$(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/table-to.c
is-native : is-native.o
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) is-native.o ../srclib/libicrt.a -o $@
is-native.o : $(srcdir)/is-native.c
$(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/is-native.c
test-shiftseq : test-shiftseq.o ../lib/libiconv.la
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) test-shiftseq.o ../srclib/libicrt.a ../lib/libiconv.la -o $@
test-shiftseq.o : $(srcdir)/test-shiftseq.c
$(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/test-shiftseq.c
test-to-wchar : test-to-wchar.o ../lib/libiconv.la
$(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) test-to-wchar.o ../srclib/libicrt.a ../lib/libiconv.la -o $@
test-to-wchar.o : $(srcdir)/test-to-wchar.c
$(CC) -c $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(srcdir)/test-to-wchar.c
# The following rule is necessary to avoid a toplevel "make -n check" failure.
../lib/libiconv.la :
cd ../lib && $(MAKE) libiconv.la
mostlyclean : clean
clean : force
$(RM) *.o *.lo table-from table-from table-to table-to is-native is-native test-shiftseq test-shiftseq test-to-wchar test-to-wchar tmp-* genutf8 genutf8 UTF-8.TXT gengb18030z gengb18030z GB18030.TXT core *.stackdump
$(RM) -r .libs _libs
distclean : clean
$(RM) Makefile
maintainer-clean : distclean
# List of source files.
SOURCE_FILES = \
Makefile.in \
table-from.c table-to.c uniq-u.c \
check-stateful check-stateful.bat \
check-stateless check-stateless.bat \
check-translit check-translit.bat \
check-translitfailure \
ASCII.TXT \
genutf8.c \
UCS-2BE-snippet UCS-2BE-snippet.UTF-8 \
UCS-2LE-snippet UCS-2LE-snippet.UTF-8 \
UCS-4BE-snippet UCS-4BE-snippet.UTF-8 \
UCS-4LE-snippet UCS-4LE-snippet.UTF-8 \
UTF-16-snippet UTF-16-snippet.UTF-8 \
UTF-16BE-snippet UTF-16BE-snippet.UTF-8 \
UTF-16LE-snippet UTF-16LE-snippet.UTF-8 \
UTF-32-snippet UTF-32-snippet.UTF-8 \
UTF-32BE-snippet UTF-32BE-snippet.UTF-8 \
UTF-32LE-snippet UTF-32LE-snippet.UTF-8 \
UTF-7-snippet UTF-7-snippet.UTF-8 \
ISO-8859-1.TXT \
ISO-8859-2.TXT \
ISO-8859-3.TXT \
ISO-8859-4.TXT \
ISO-8859-5.TXT \
ISO-8859-6.TXT \
ISO-8859-7.TXT \
ISO-8859-8.TXT \
ISO-8859-9.TXT \
ISO-8859-10.TXT \
ISO-8859-11.TXT \
ISO-8859-13.TXT \
ISO-8859-14.TXT \
ISO-8859-15.TXT \
ISO-8859-16.TXT \
KOI8-R.TXT \
KOI8-U.TXT \
KOI8-RU.TXT \
CP1250.TXT \
CP1251.TXT \
CP1252.TXT \
CP1253.TXT \
CP1254.TXT \
CP1255.TXT CP1255.IRREVERSIBLE.TXT \
CP1255-snippet CP1255-snippet.UTF-8 \
CP1256.TXT \
CP1257.TXT \
CP1258.TXT CP1258.IRREVERSIBLE.TXT \
CP1258-snippet CP1258-snippet.UTF-8 \
CP850.TXT \
CP862.TXT \
CP866.TXT \
CP1131.TXT \
MacRoman.TXT \
MacCentralEurope.TXT \
MacIceland.TXT \
MacCroatian.TXT \
MacRomania.TXT \
MacCyrillic.TXT \
MacUkraine.TXT \
MacGreek.TXT \
MacTurkish.TXT \
MacHebrew.TXT \
MacArabic.TXT \
MacThai.TXT \
HP-ROMAN8.TXT \
NEXTSTEP.TXT \
ARMSCII-8.TXT ARMSCII-8.IRREVERSIBLE.TXT \
Georgian-Academy.TXT \
Georgian-PS.TXT \
KOI8-T.TXT \
PT154.TXT \
RK1048.TXT \
MuleLao-1.TXT \
CP1133.TXT \
TIS-620.TXT \
CP874.TXT \
VISCII.TXT \
TCVN.TXT TCVN.IRREVERSIBLE.TXT \
TCVN-snippet TCVN-snippet.UTF-8 \
ISO646-JP.TXT \
JIS_X0201.TXT \
ISO646-CN.TXT \
ISO-IR-165.TXT ISO-IR-165.IRREVERSIBLE.TXT \
EUC-JP.TXT EUC-JP.IRREVERSIBLE.TXT \
SHIFT_JIS.TXT \
CP932.TXT CP932.IRREVERSIBLE.TXT \
ISO-2022-JP-snippet ISO-2022-JP-snippet.UTF-8 \
ISO-2022-JP-2-snippet ISO-2022-JP-2-snippet.UTF-8 \
ISO-2022-JP-1-snippet ISO-2022-JP-1-snippet.UTF-8 \
ISO-2022-JP-MS-snippet ISO-2022-JP-MS-snippet.alt ISO-2022-JP-MS-snippet.UTF-8 \
EUC-CN.TXT \
GBK.TXT \
CP936.TXT \
gengb18030z.c GB18030-BMP.TXT GB18030.IRREVERSIBLE.TXT \
ISO-2022-CN-snippet ISO-2022-CN-snippet.UTF-8 \
ISO-2022-CN-EXT-snippet ISO-2022-CN-EXT-snippet.UTF-8 \
HZ-snippet HZ-snippet.UTF-8 \
EUC-TW.TXT EUC-TW.IRREVERSIBLE.TXT \
BIG5.TXT \
CP950.TXT CP950.IRREVERSIBLE.TXT \
BIG5-HKSCS-1999.TXT BIG5-HKSCS-1999.IRREVERSIBLE.TXT \
BIG5-HKSCS-1999-snippet BIG5-HKSCS-1999-snippet.UTF-8 \
BIG5-HKSCS-2001.TXT BIG5-HKSCS-2001.IRREVERSIBLE.TXT \
BIG5-HKSCS-2001-snippet BIG5-HKSCS-2001-snippet.UTF-8 \
BIG5-HKSCS-2004.TXT BIG5-HKSCS-2004.IRREVERSIBLE.TXT \
BIG5-HKSCS-2004-snippet BIG5-HKSCS-2004-snippet.UTF-8 \
BIG5-HKSCS-2008.TXT BIG5-HKSCS-2008.IRREVERSIBLE.TXT \
BIG5-HKSCS-2008-snippet BIG5-HKSCS-2008-snippet.UTF-8 \
EUC-KR.TXT \
CP949.TXT \
JOHAB.TXT \
ISO-2022-KR-snippet \
ISO-2022-KR-snippet.UTF-8 \
Quotes.UTF-8 Quotes.ISO-8859-1 Quotes.ASCII \
Translit1.ISO-8859-1 Translit1.ASCII \
TranslitFail1.ISO-8859-1 \
is-native.c \
check-subst \
test-shiftseq.c \
test-to-wchar.c \
CP856.TXT \
CP922.TXT \
CP1046.TXT \
CP1124.TXT \
CP1129.TXT \
CP1161.TXT CP1161.IRREVERSIBLE.TXT \
CP1162.TXT \
CP1163.TXT CP1163.IRREVERSIBLE.TXT \
DEC-KANJI.TXT \
DEC-HANYU.TXT DEC-HANYU.IRREVERSIBLE.TXT \
CP437.TXT \
CP737.TXT \
CP775.TXT \
CP852.TXT \
CP853.TXT \
CP855.TXT \
CP857.TXT \
CP858.TXT \
CP860.TXT \
CP861.TXT \
CP863.TXT \
CP864.TXT \
CP865.TXT \
CP869.TXT \
CP1125.TXT \
IBM-037.TXT \
IBM-273.TXT \
IBM-277.TXT \
IBM-278.TXT \
IBM-280.TXT \
IBM-282.TXT \
IBM-284.TXT \
IBM-285.TXT \
IBM-297.TXT \
IBM-423.TXT \
IBM-424.TXT \
IBM-425.TXT \
IBM-4971.TXT \
IBM-500.TXT \
IBM-838.TXT IBM-838.IRREVERSIBLE.TXT \
IBM-870.TXT \
IBM-871.TXT \
IBM-875.TXT \
IBM-880.TXT \
IBM-905.TXT \
IBM-924.TXT \
IBM-1025.TXT \
IBM-1026.TXT \
IBM-1047.TXT \
IBM-1097.TXT \
IBM-1112.TXT \
IBM-1122.TXT \
IBM-1123.TXT \
IBM-1130.TXT \
IBM-1132.TXT \
IBM-1137.TXT \
IBM-1140.TXT \
IBM-1141.TXT \
IBM-1142.TXT \
IBM-1143.TXT \
IBM-1144.TXT \
IBM-1145.TXT \
IBM-1146.TXT \
IBM-1147.TXT \
IBM-1148.TXT \
IBM-1149.TXT \
IBM-1153.TXT \
IBM-1154.TXT \
IBM-1155.TXT \
IBM-1156.TXT \
IBM-1157.TXT \
IBM-1158.TXT \
IBM-1160.TXT IBM-1160.IRREVERSIBLE.TXT \
IBM-1164.TXT \
IBM-1165.TXT \
IBM-1166.TXT \
IBM-12712.TXT \
IBM-16804.TXT \
EUC-JISX0213.TXT \
SHIFT_JISX0213.TXT \
ISO-2022-JP-3-snippet ISO-2022-JP-3-snippet.UTF-8 \
BIG5-2003.TXT BIG5-2003.IRREVERSIBLE.TXT \
TDS565.TXT \
ATARIST.TXT \
RISCOS-LATIN1.TXT
# List of distributed files imported from other packages.
IMPORTED_FILES = \
qemu.h
# List of distributed files generated by autotools or Makefile.devel.
GENERATED_FILES =
# List of distributed files generated by "make".
DISTRIBUTED_BUILT_FILES =
# List of distributed files.
DISTFILES = $(SOURCE_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES)
distdir : $(DISTFILES)
for file in $(DISTFILES); do \
if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \
cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \
done
force :