⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 libiconv-1.9.2-src.diff

📁 libiconv是一个很不错的字符集转换库。程序接口也很简单
💻 DIFF
📖 第 1 页 / 共 2 页
字号:
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' libiconv-1.9.2-orig/autoconf/install-reloc libiconv-1.9.2-src/autoconf/install-reloc
--- libiconv-1.9.2-orig/autoconf/install-reloc	2003-07-01 14:06:57.000000000 +0200
+++ libiconv-1.9.2-src/autoconf/install-reloc	2004-10-05 20:15:07.140625000 +0200
@@ -109,11 +109,11 @@ IFS="$save_IFS"
 test -n "$libdirs" || exit 0
 
 # Compile wrapper.
-installdir=`echo "$destprog" | sed -e 's,/[^/]*$,,'`
-func_verbose $compile_command -I"$builddir" -I"$srcdir" -I"$config_h_dir" -DHAVE_CONFIG_H -DNO_XMALLOC -D"INSTALLPREFIX=\"$prefix\"" -D"INSTALLDIR=\"$installdir\"" -D"LIBPATHVAR=\"$library_path_var\"" -D"LIBDIRS=$libdirs" "$srcdir"/relocwrapper.c "$srcdir"/progname.c "$srcdir"/progreloc.c "$srcdir"/xreadlink.c "$srcdir"/readlink.c "$srcdir"/canonicalize.c "$srcdir"/relocatable.c "$srcdir"/setenv.c "$srcdir"/strerror.c -o $destprog.wrapper || exit $?
+# installdir=`echo "$destprog" | sed -e 's,/[^/]*$,,'`
+# func_verbose $compile_command -I"$builddir" -I"$srcdir" -I"$config_h_dir" -DHAVE_CONFIG_H -DNO_XMALLOC -D"INSTALLPREFIX=\"$prefix\"" -D"INSTALLDIR=\"$installdir\"" -D"LIBPATHVAR=\"$library_path_var\"" -D"LIBDIRS=$libdirs" "$srcdir"/relocwrapper.c "$srcdir"/progname.c "$srcdir"/progreloc.c "$srcdir"/xreadlink.c "$srcdir"/readlink.c "$srcdir"/canonicalize.c "$srcdir"/relocatable.c "$srcdir"/setenv.c "$srcdir"/strerror.c -o $destprog.wrapper || exit $?
 
 # Rename $destprog.wrapper -> $destprog -> $destprog.bin.
-ln -f $destprog $destprog.bin || exit 1
-mv $destprog.wrapper $destprog || exit 1
+# ln -f $destprog $destprog.bin || exit 1
+# mv $destprog.wrapper $destprog || exit 1
 
 exit 0
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' libiconv-1.9.2-orig/include/iconv.h.in libiconv-1.9.2-src/include/iconv.h.in
--- libiconv-1.9.2-orig/include/iconv.h.in	2003-04-14 15:51:06.000000000 +0200
+++ libiconv-1.9.2-src/include/iconv.h.in	2004-10-02 21:16:25.796875000 +0200
@@ -22,7 +22,17 @@
 #define _LIBICONV_H
 
 #define _LIBICONV_VERSION 0x0109    /* version number: (major<<8) + minor */
-extern int _libiconv_version;       /* Likewise */
+
+#ifdef LIBICONV_STATIC
+#define LIBICONV_DLL_EXPORTED
+#else /* LIBICONV_STATIC */
+#ifdef BUILDING_LIBICONV
+#define LIBICONV_DLL_EXPORTED __declspec(dllexport)
+#else
+#define LIBICONV_DLL_EXPORTED __declspec(dllimport)
+#endif
+#endif /* LIBICONV_STATIC */ 
+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
@@ -69,7 +79,7 @@ extern "C" {
 #ifndef LIBICONV_PLUG
 #define iconv_open libiconv_open
 #endif
-extern iconv_t iconv_open (const char* tocode, const char* fromcode);
+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
@@ -79,13 +89,13 @@ extern iconv_t iconv_open (const char* t
 #ifndef LIBICONV_PLUG
 #define iconv libiconv
 #endif
-extern size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
+extern LIBICONV_DLL_EXPORTED size_t iconv (iconv_t cd, @ICONV_CONST@ 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);
+extern LIBICONV_DLL_EXPORTED int iconv_close (iconv_t cd);
 
 
 #ifndef LIBICONV_PLUG
@@ -94,7 +104,7 @@ extern int iconv_close (iconv_t cd);
 
 /* Control of attributes. */
 #define iconvctl libiconvctl
-extern int iconvctl (iconv_t cd, int request, void* argument);
+extern LIBICONV_DLL_EXPORTED int iconvctl (iconv_t cd, int request, void* argument);
 
 /* Requests for iconvctl. */
 #define ICONV_TRIVIALP            0  /* int *argument */
@@ -105,7 +115,7 @@ extern int iconvctl (iconv_t cd, int req
 
 /* Listing of locale independent encodings. */
 #define iconvlist libiconvlist
-extern void iconvlist (int (*do_one) (unsigned int namescount,
+extern LIBICONV_DLL_EXPORTED void iconvlist (int (*do_one) (unsigned int namescount,
                                       const char * const * names,
                                       void* data),
                        void* data);
@@ -117,7 +127,7 @@ extern void iconvlist (int (*do_one) (un
    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,
+extern LIBICONV_DLL_EXPORTED void libiconv_set_relocation_prefix (const char *orig_prefix,
 					    const char *curr_prefix);
 
 #endif
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' libiconv-1.9.2-orig/lib/Makefile.in libiconv-1.9.2-src/lib/Makefile.in
--- libiconv-1.9.2-orig/lib/Makefile.in	2003-05-18 16:19:16.000000000 +0200
+++ libiconv-1.9.2-src/lib/Makefile.in	2004-10-13 23:59:07.421875000 +0200
@@ -4,6 +4,8 @@
 
 # Directories used by "make":
 srcdir = @srcdir@
+resdir = @top_builddir@res
+vpath %.rc @top_builddir@res
 
 # Directories used by "make install":
 prefix = @prefix@
@@ -15,21 +17,22 @@ libdir = @libdir@
 CC = @CC@
 CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@	 -Wl,--major-image-version=$(MAJOR) -Wl,--minor-image-version=$(MINOR) 
 INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include
-DEFS = -DLIBDIR=\"$(libdir)\" \
--DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
+DEFS =  -DINSTALLDIR=\"$(prefix)\"  -DLIBDIR=\"$(libdir)\" \
+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DNO_XMALLOC \
 -Dset_relocation_prefix=libiconv_set_relocation_prefix \
--Drelocate=libiconv_relocate @DEFS@
+-Drelocate=libiconv_relocate @DEFS@	-DINSTALLDIR=\"$(prefix)/bin\" 
 LIBTOOL = @LIBTOOL@
 LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
 LIBTOOL_LINK = $(LIBTOOL) --mode=link
 LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
 LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
+RCTOOL_COMPILE = RCTOOL
 CP = cp
 MV = mv
-LN = @LN@
-LN_S = @LN_S@
+LN = cp -fp
+LN_S = cp -fp
 RM = rm -f
 
 # Programs used by "make install":
@@ -38,8 +41,17 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 mkinstalldirs = $(SHELL) @top_srcdir@/autoconf/mkinstalldirs
 
+# Rule to make compiled resource (Windows)
+%-rc.o: %.rc
+	windres --include-dir $(resdir) -i $< -o $@
+
 #### End of system configuration section. ####
 
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+MAJOR=$(shell echo $(VERSION) | sed -e "s/\..*$$//")
+MINOR=$(shell echo $(VERSION) | sed -e "s/^[^\.]*\.0*\([^.]*\).*$$/\1/")
+
 SHELL = /bin/sh
 
 # Before making a release, change this according to the libtool documentation,
@@ -52,12 +64,19 @@ top_builddir = ..
 SOURCES = $(srcdir)/iconv.c $(srcdir)/../libcharset/lib/localcharset.c $(srcdir)/relocatable.c
 
 OBJECTS = iconv.lo localcharset.lo relocatable.lo
+libiconv_dll_OBJECTS = $(OBJECTS:.lo=.o) libiconv-dllversion.o libiconv-dll-rc.o
 
-all : @PLUGLIB@ libiconv.la
+all : @PLUGLIB@ libiconv.la	libiconv.dll
 
 libiconv.la : $(OBJECTS)
 	$(LIBTOOL_LINK) $(CC) $(LDFLAGS) -o libiconv.la -rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined $(OBJECTS)
 
+libiconv.dll: libiconv.la libiconv-dllversion.lo libiconv-dll-rc.lo
+	cd .libs && o2dll -o libiconv.dll -l libiconv $(libiconv_dll_OBJECTS) $(LIBS)
+	cp -fp libiconv.la libiconv.la.orig
+	sed -e "s/libiconv.a/libiconv.dll.a/" libiconv.la.orig > libiconv.la
+	cp -fp .libs/libiconv*.dll $@
+
 libiconv_plug.so : libiconv_plug_@OS@.so
 	$(RM) libiconv_plug.so
 	$(LN_S) libiconv_plug_@OS@.so libiconv_plug.so
@@ -97,6 +116,12 @@ localcharset.lo : $(srcdir)/../libcharse
 relocatable.lo : $(srcdir)/relocatable.c $(srcdir)/relocatable.h
 	$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(srcdir)/relocatable.c
 
+libiconv-dllversion.lo: $(resdir)/libiconv-dllversion.c
+	$(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $(resdir)/libiconv-dllversion.c
+
+libiconv-dll-rc.lo: $(resdir)/libiconv-dll.rc
+	$(RCTOOL_COMPILE) $(resdir)/libiconv-dll.rc
+
 # 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
@@ -108,6 +133,9 @@ install : all force
 	if [ ! -d $(DESTDIR)$(exec_prefix) ] ; then $(mkinstalldirs) $(DESTDIR)$(exec_prefix) ; fi
 	if [ ! -d $(DESTDIR)$(libdir) ] ; then $(mkinstalldirs) $(DESTDIR)$(libdir) ; fi
 	$(LIBTOOL_INSTALL) $(INSTALL_DATA) libiconv.la $(DESTDIR)$(libdir)/libiconv.la
+	$(INSTALL_DATA) .libs/libiconv.lib $(DESTDIR)$(libdir)/libiconv.lib
+	$(INSTALL_DATA) .libs/libiconv-bcc.lib $(DESTDIR)$(libdir)/libiconv-bcc.lib
+	$(INSTALL_DATA) .libs/libiconv2.def $(DESTDIR)$(libdir)/libiconv2.def
 	if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
 
 installdirs : force
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' libiconv-1.9.2-orig/libcharset/include/libcharset.h.in libiconv-1.9.2-src/libcharset/include/libcharset.h.in
--- libiconv-1.9.2-orig/libcharset/include/libcharset.h.in	2003-04-05 11:33:32.000000000 +0200
+++ libiconv-1.9.2-src/libcharset/include/libcharset.h.in	2004-10-02 21:17:21.125000000 +0200
@@ -19,6 +19,16 @@
 #ifndef _LIBCHARSET_H
 #define _LIBCHARSET_H
 
+#ifdef LIBCHARSET_STATIC
+#define LIBCHARSET_DLL_EXPORTED 
+#else /* LIBCHARSET_STATIC */
+#ifdef BUILDING_LIBCHARSET
+#define LIBCHARSET_DLL_EXPORTED __declspec(dllexport)
+#else
+#define LIBCHARSET_DLL_EXPORTED __declspec(dllimport)
+#endif
+#endif /* LIBCHARSET_STATIC */
+
 #include <localcharset.h>
 
 
@@ -34,7 +44,7 @@ extern "C" {
    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,
+extern LIBCHARSET_DLL_EXPORTED void libcharset_set_relocation_prefix (const char *orig_prefix,
 					      const char *curr_prefix);
 
 
diff -ipuwrN -x '*.bak' -x '*.orig' -x '*.rej' -x '*.new' libiconv-1.9.2-orig/libcharset/include/localcharset.h.in libiconv-1.9.2-src/libcharset/include/localcharset.h.in
--- libiconv-1.9.2-orig/libcharset/include/localcharset.h.in	2003-02-26 10:58:43.000000000 +0100
+++ libiconv-1.9.2-src/libcharset/include/localcharset.h.in	2004-10-02 21:17:21.125000000 +0200
@@ -20,6 +20,15 @@
 #ifndef _LOCALCHARSET_H
 #define _LOCALCHARSET_H
 
+#ifdef LIBCHARSET_STATIC
+#define LIBCHARSET_DLL_EXPORTED 
+#else /* LIBCHARSET_STATIC */
+#ifdef BUILDING_LIBCHARSET
+#define LIBCHARSET_DLL_EXPORTED __declspec(dllexport)
+#else
+#define LIBCHARSET_DLL_EXPORTED __declspec(dllimport)
+#endif
+#endif /* LIBCHARSET_STATIC */
 
 #ifdef __cplusplus
 extern "C" {
@@ -31,7 +40,7 @@ extern "C" {
    The result must not be freed; it is statically allocated.
    If the canonical name cannot be determined, the result is a non-canonical
    name.  */
-extern const char * locale_charset (void);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -