📄 stlport-4.5.3.patch
字号:
diff -urN STLport-4.5.3/Makefile STLport-4.5.3-devel/Makefile--- STLport-4.5.3/Makefile Wed Dec 31 17:00:00 1969+++ STLport-4.5.3-devel/Makefile Tue Jan 7 15:28:08 2003@@ -0,0 +1,44 @@+# Makefile to compile stlport with uClibc+#+# Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>+#+# This program is free software; 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 2 of the License, 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+# General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA++ARCH:=i386+PREFIX:=/usr/$(ARCH)-linux-uclibc+CROSS:= $(PREFIX)/../bin/$(ARCH)-linux-uclibc-+CC=$(CROSS)gcc+CXX=$(CROSS)g+++AR = $(CROSS)ar+STRIP = $(CROSS)strip --remove-section=.comment --remove-section=.note --strip-unneeded+.EXPORT_ALL_VARIABLES:++all:+ rm -f lib/lib*+ make -C src -f gcc-uClibc.mak all+ (cd lib; rm -f libstdc++_debug.so; \+ ln -fs libstdc++.so.4.5 libstdc++.so; \+ ln -fs libstdc++.so.4.5 libstdc++.so.0;)+ $(STRIP) lib/libstdc++.so.4.5; ++clean:+ make -C src -f gcc-uClibc.mak clean+ rm -rf lib/*++install:+ (cd lib; \+ cp -a libstdc++.a $(PREFIX)/lib; \+ cp -a libstdc++.so libstdc++.so.0 libstdc++.so.4.5 $(PREFIX)/lib;)+ cp -a stlport $(PREFIX)/include/c++diff -urN STLport-4.5.3/src/dll_main.cpp STLport-4.5.3-devel/src/dll_main.cpp--- STLport-4.5.3/src/dll_main.cpp Sat Feb 2 16:11:56 2002+++ STLport-4.5.3-devel/src/dll_main.cpp Tue Jan 7 15:28:08 2003@@ -52,7 +52,7 @@ # include <locale> # endif -# if defined (_STLP_UNIX)+# if defined (_STLP_UNIX) && defined (_STLP_PTHREADS) && ! defined (_STLP_USE_UCLIBC) # define _STLP_HAS_PERTHREAD_ALLOCATOR # include <stl/_pthread_alloc.h> # endifdiff -urN STLport-4.5.3/src/gcc-uClibc.mak STLport-4.5.3-devel/src/gcc-uClibc.mak--- STLport-4.5.3/src/gcc-uClibc.mak Wed Dec 31 17:00:00 1969+++ STLport-4.5.3-devel/src/gcc-uClibc.mak Tue Jan 7 15:28:08 2003@@ -0,0 +1,61 @@+#+# Basename for libraries+#+LIB_BASENAME:=libstdc+++LIB_SHAREDNAME:=$(LIB_BASENAME).so+LIB_SHAREDNAME_FULL:=$(LIB_SHAREDNAME).0++#+# guts for common stuff+#+#+LINK:=$(AR) -cr+#DYN_LINK:=$(CC) -fno-exceptions -lpthread -lm -shared -Wl,-soname=$(LIB_SHAREDNAME_FULL) -o+DYN_LINK:=$(CC) -fno-exceptions -shared -Wl,-soname=$(LIB_SHAREDNAME_FULL) -o++OBJEXT=o+DYNEXT=so+STEXT=a+RM=rm -rf+PATH_SEP=/+MKDIR=mkdir -p+COMP=GCC$(ARCH)+INSTALL_STEP = install_unix ++all: release_dynamic release_static+#all: all_dynamic all_static symbolic_links ++include common_macros.mak+STLDEBUG_NAME:=$(LIB_BASENAME).debug++# Lets disable exception support, since this saves over 200k...+DEFINE_FLAGS:= -fno-exceptions+#DEFINE_FLAGS:= -D_STLP_NO_EXCEPTIONS -fno-exceptions -DSTL_NO_EXCEPTIONS++#DEFINE_FLAGS+= -D_STLP_USE_UCLIBC -D_STLP_NO_WCHAR_T \+# -DUSE_SPRINTF_INSTEAD -D_ISOC99_SOURCE++WARNING_FLAGS:= -W -Wno-sign-compare -Wno-unused -Wno-uninitialized+INCLUDE_FLAGS = -I${STLPORT_DIR}+CXXFLAGS_COMMON = $(WARNING_FLAGS) $(DEFINE_FLAGS) $(INCLUDE_FLAGS)++CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -Os+CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -Os -fPIC++CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -O -g+CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -O -g -fPIC++CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG+CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG -fPIC++include common_percent_rules.mak+include common_rules.mak+++#install: all+# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib++#%.s: %.cpp+# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@++diff -urN STLport-4.5.3/src/num_put_float.cpp STLport-4.5.3-devel/src/num_put_float.cpp--- STLport-4.5.3/src/num_put_float.cpp Fri Jan 18 15:06:52 2002+++ STLport-4.5.3-devel/src/num_put_float.cpp Tue Jan 7 15:28:08 2003@@ -65,6 +65,12 @@ # endif +# if defined(_STLP_USE_UCLIBC)+# define __USE_ISOC99 1+# include <math.h>+# include <float.h>+# endif+ # include <cstdlib> #if defined (_MSC_VER) || defined (__MINGW32__) || defined (__BORLANDC__) || defined (__DJGPP) || defined (_STLP_SCO_OPENSERVER) || defined (__NCR_SVR)@@ -209,7 +215,7 @@ #ifdef USE_SPRINTF_INSTEAD -#elif defined (__hpux) || defined (__DJGPP) || ( defined(_STLP_USE_GLIBC) && ! defined (__MSL__) )+#elif defined (__hpux) || defined (__DJGPP) || ( defined(_STLP_USE_GLIBC) && ! defined (__MSL__) ) || defined (_STLP_USE_UCLIBC) # if defined (isfinite) inline bool _Stl_is_nan_or_inf(double x) { return !isfinite(x); } # else@@ -238,7 +244,7 @@ } inline bool _Stl_is_neg_inf(double x) { return _fpclass(x) == _FPCLASS_NINF; } inline bool _Stl_is_neg_nan(double x) { return _isnan(x) && _copysign(1., x) < 0 ; } -#elif defined(__MRC__) || defined(__SC__) //*TY 02/24/2000 - added support for MPW+#elif defined(__MRC__) || defined(__SC__) bool _Stl_is_nan_or_inf(double x) { return isnan(x) || !isfinite(x); } bool _Stl_is_inf(double x) { return !isfinite(x); } bool _Stl_is_neg_inf(double x) { return !isfinite(x) && signbit(x); }@@ -280,7 +286,7 @@ inline char* _Stl_qfcvtR(long double x, int n, int* pt, int* sign, char* buf) { return fcvtbuf(x, n, pt, sign, buf); } # endif-#elif defined (_STLP_USE_GLIBC)+#elif defined (_STLP_USE_GLIBC) || defined(_STLP_USE_UCLIBC) inline char* _Stl_ecvtR(double x, int n, int* pt, int* sign, char* buf) { return buf + ecvt_r(x, n, pt, sign, buf, NDIG+2); } inline char* _Stl_fcvtR(double x, int n, int* pt, int* sign, char* buf)diff -urN STLport-4.5.3/src/stdio_streambuf.cpp STLport-4.5.3-devel/src/stdio_streambuf.cpp--- STLport-4.5.3/src/stdio_streambuf.cpp Thu Jan 10 11:41:52 2002+++ STLport-4.5.3-devel/src/stdio_streambuf.cpp Tue Jan 7 15:28:08 2003@@ -82,7 +82,7 @@ _STLP_VENDOR_CSTD::fgetpos(_M_file, &pos); // added 21 june 00 mdb,rjf,wjs: glibc 2.2 changed fpos_t to be a struct instead // of a primitive type-#if (defined(__GLIBC__) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) )+#if defined(_STLP_USE_UCLIBC) || (defined(__GLIBC__) && defined(_STLP_USE_GLIBC) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) ) return pos_type((streamoff)pos.__pos); #elif defined(__ISCPP__) || defined(__MVS__) || (__OS400__) return pos_type(pos.__fpos_elem[ 0 ]);@@ -101,13 +101,16 @@ // added 21 june 00 mdb,rjf,wjs: glibc 2.2 changed fpos_t to be a struct instead // of a primitive type-#if (defined(__GLIBC__) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) )+#if (defined(__GLIBC__) && defined(_STLP_USE_GLIBC) && ( (__GLIBC__ > 2) || ( (__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 2) ) ) ) fpos_t p; p.__pos = pos; memset( &(p.__state), 0, sizeof(p.__state) ); #elif defined(__MVS__) || (__OS400__) fpos_t p; p.__fpos_elem[0] = pos;+#elif defined(_STLP_USE_UCLIBC)+ fpos_t p;+ p.__pos = pos; #else fpos_t p(pos); #endifdiff -urN STLport-4.5.3/stlport/config/_prolog.h STLport-4.5.3-devel/stlport/config/_prolog.h--- STLport-4.5.3/stlport/config/_prolog.h Sun Oct 28 13:26:44 2001+++ STLport-4.5.3-devel/stlport/config/_prolog.h Tue Jan 7 15:28:08 2003@@ -1,3 +1,8 @@+/* Evil hack to make sure everything behaves itself */+#define _STLP_USE_UCLIBC
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -