Commit 36ece22c78c0117c6da605cedb6bd1805179939c
- Diff rendering mode:
- inline
- side by side
Makefiles/gmake/android/sys.mak
(24 / 0)
|   | |||
| 1 | # Time-stamp: <10/02/16 10:44:52 ptr> | ||
| 2 | # | ||
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2010 | ||
| 4 | # Petr Ovtchenkov | ||
| 5 | # | ||
| 6 | # Portion Copyright (c) 1999-2001 | ||
| 7 | # Parallel Graphics Ltd. | ||
| 8 | # | ||
| 9 | # Licensed under the Academic Free License version 3.0 | ||
| 10 | # | ||
| 11 | |||
| 12 | INSTALL := /usr/bin/install | ||
| 13 | |||
| 14 | STRIP := /usr/bin/strip | ||
| 15 | |||
| 16 | INSTALL_SO := ${INSTALL} -c -m 0755 ${_INSTALL_STRIP_OPTION} | ||
| 17 | INSTALL_A := ${INSTALL} -c -m 0644 | ||
| 18 | INSTALL_EXE := ${INSTALL} -c -m 0755 | ||
| 19 | INSTALL_D := ${INSTALL} -d -m 0755 | ||
| 20 | INSTALL_F := ${INSTALL} -c -p -m 0644 | ||
| 21 | |||
| 22 | # bash's built-in test is like extern | ||
| 23 | # EXT_TEST := /usr/bin/test | ||
| 24 | EXT_TEST := test |
|   | |||
| 1 | # Time-stamp: <10/02/16 10:45:45 ptr> | ||
| 2 | # | ||
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2010 | ||
| 4 | # Petr Ovtchenkov | ||
| 5 | # | ||
| 6 | # Portion Copyright (c) 1999-2001 | ||
| 7 | # Parallel Graphics Ltd. | ||
| 8 | # | ||
| 9 | # Licensed under the Academic Free License version 3.0 | ||
| 10 | # | ||
| 11 | |||
| 12 | SO := so | ||
| 13 | |||
| 14 | ARCH := a | ||
| 15 | ifdef TARGET_OS | ||
| 16 | AR := ${TARGET_OS}-ar | ||
| 17 | STRIP := $(TARGET_OS)-strip | ||
| 18 | else | ||
| 19 | AR := ar | ||
| 20 | STRIP := strip | ||
| 21 | endif | ||
| 22 | AR_INS_R := -rs | ||
| 23 | AR_EXTR := -x | ||
| 24 | AR_OUT = $@ | ||
| 25 | |||
| 26 | install-strip: _INSTALL_STRIP_OPTION = -s | ||
| 27 | |||
| 28 | install-strip: _SO_STRIP_OPTION = -S | ||
| 29 | |||
| 30 | install-strip-shared: _INSTALL_STRIP_OPTION = -s | ||
| 31 | |||
| 32 | install-strip-shared: _SO_STRIP_OPTION = -S |
Makefiles/gmake/app/gcc.mak
(17 / 2)
|   | |||
| 1 | # -*- Makefile -*- Time-stamp: <08/10/22 15:48:09 ptr> | ||
| 1 | # -*- Makefile -*- Time-stamp: <10/02/16 10:10:05 ptr> | ||
| 2 | 2 | # | |
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2008 | ||
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2010 | ||
| 4 | 4 | # Petr Ovtchenkov | |
| 5 | 5 | # | |
| 6 | 6 | # Portion Copyright (c) 1999-2001 | |
| … | … | ||
| 33 | 33 | endif | |
| 34 | 34 | endif | |
| 35 | 35 | ||
| 36 | # Android NDK 1.5 r1, in pre-build gcc 4.2.1 no libsupc++, is we should link with libstdc++? | ||
| 37 | #ifeq ($(OSNAME),android) | ||
| 38 | #NOT_USE_NOSTDLIB := 1 | ||
| 39 | #endif | ||
| 40 | |||
| 36 | 41 | endif | |
| 37 | 42 | ||
| 38 | 43 | ifndef NOT_USE_NOSTDLIB | |
| … | … | ||
| 45 | 45 | _USE_NOSTDLIB := 1 | |
| 46 | 46 | endif | |
| 47 | 47 | ||
| 48 | ifeq ($(OSNAME),android) | ||
| 49 | _USE_NOSTDLIB := 1 | ||
| 50 | endif | ||
| 51 | |||
| 48 | 52 | ifeq ($(OSNAME),openbsd) | |
| 49 | 53 | _USE_NOSTDLIB := 1 | |
| 50 | 54 | endif | |
| … | … | ||
| 149 | 149 | START_OBJ := $(shell for o in crt1.o crti.o crtbegin.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | |
| 150 | 150 | END_OBJ := $(shell for o in crtend.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | |
| 151 | 151 | STDLIBS = ${STLPORT_LIB} ${_LGCC_S} -lpthread -lc -lm | |
| 152 | endif | ||
| 153 | |||
| 154 | ifeq ($(OSNAME),android) | ||
| 155 | START_OBJ := $(shell for o in crti.o crtbegin.o crtbegin_dynamic.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | ||
| 156 | END_OBJ := $(shell for o in crtend.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | ||
| 157 | STDLIBS = ${STLPORT_LIB} ${_LGCC_S} -lc -lm | ||
| 152 | 158 | endif | |
| 153 | 159 | ||
| 154 | 160 | ifeq ($(OSNAME),openbsd) |
Makefiles/gmake/gcc.mak
(8 / 2)
|   | |||
| 1 | # Time-stamp: <08/10/22 14:57:26 ptr> | ||
| 1 | # Time-stamp: <10/02/18 10:06:21 ptr> | ||
| 2 | 2 | # | |
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2008 | ||
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2010 | ||
| 4 | 4 | # Petr Ovtchenkov | |
| 5 | 5 | # | |
| 6 | 6 | # Portion Copyright (c) 1999-2001 | |
| … | … | ||
| 105 | 105 | CFLAGS = -pthread $(OPT) | |
| 106 | 106 | # CXXFLAGS = -pthread -nostdinc++ -fexceptions $(OPT) | |
| 107 | 107 | CXXFLAGS = -pthread -fexceptions $(OPT) | |
| 108 | endif | ||
| 109 | |||
| 110 | ifeq ($(OSNAME),android) | ||
| 111 | CCFLAGS = -mandroid --sysroot=$(SYSROOT) $(OPT) | ||
| 112 | CFLAGS = -mandroid --sysroot=$(SYSROOT) $(OPT) | ||
| 113 | CXXFLAGS = -mandroid --sysroot=$(SYSROOT) -fno-exceptions -fno-rtti $(OPT) | ||
| 108 | 114 | endif | |
| 109 | 115 | ||
| 110 | 116 | ifeq ($(OSNAME),openbsd) |
Makefiles/gmake/lib/gcc.mak
(30 / 2)
|   | |||
| 1 | # -*- makefile -*- Time-stamp: <08/10/22 15:51:41 ptr> | ||
| 1 | # -*- makefile -*- Time-stamp: <10/03/05 23:16:47 ptr> | ||
| 2 | 2 | # | |
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2008 | ||
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2010 | ||
| 4 | 4 | # Petr Ovtchenkov | |
| 5 | 5 | # | |
| 6 | 6 | # Portion Copyright (c) 1999-2001 | |
| … | … | ||
| 42 | 42 | endif | |
| 43 | 43 | endif | |
| 44 | 44 | ||
| 45 | # Android NDK 1.5 r1, in pre-build gcc 4.2.1 no libsupc++, is we should link with libstdc++? | ||
| 46 | #ifeq ($(OSNAME),android) | ||
| 47 | #NOT_USE_NOSTDLIB := 1 | ||
| 48 | #endif | ||
| 49 | |||
| 45 | 50 | endif | |
| 46 | 51 | ||
| 47 | 52 | ifndef NOT_USE_NOSTDLIB | |
| … | … | ||
| 54 | 54 | _USE_NOSTDLIB := 1 | |
| 55 | 55 | endif | |
| 56 | 56 | ||
| 57 | ifeq ($(OSNAME),android) | ||
| 58 | _USE_NOSTDLIB := 1 | ||
| 59 | endif | ||
| 60 | |||
| 57 | 61 | ifeq ($(OSNAME),openbsd) | |
| 58 | 62 | _USE_NOSTDLIB := 1 | |
| 59 | 63 | endif | |
| … | … | ||
| 168 | 168 | STDLIBS = ${STLPORT_LIB} ${_LGCC_S} -lpthread -lc -lm | |
| 169 | 169 | endif | |
| 170 | 170 | ||
| 171 | ifeq ($(OSNAME),android) | ||
| 172 | START_OBJ := $(shell for o in crti.o crtbegin.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | ||
| 173 | #START_A_OBJ := $(shell for o in crti.o crtbeginT.o; do ${CXX} -print-file-name=$$o; done) | ||
| 174 | END_OBJ := $(shell for o in crtend.o crtn.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | ||
| 175 | # Android's libthread_db has undefined symbol: | ||
| 176 | # libthread_db.so: undefined reference to `ps_pglobal_lookup' | ||
| 177 | # U ps_pglobal_lookup | ||
| 178 | # that never defined in shipout runtime (*.o, *.a, *.so). | ||
| 179 | # Checked for Android NDK 1.5 r1 and 1.6 r1. | ||
| 180 | STDLIBS = ${_LGCC_S} -Wl,-Bstatic -lthread_db -Wl,-Bdynamic -lc -lm | ||
| 181 | # STDLIBS = ${_LGCC_S} -Wl,--whole-archive -lthread_db -Wl,--no-whole-archive -lc -lm | ||
| 182 | endif | ||
| 183 | |||
| 171 | 184 | ifeq ($(OSNAME),openbsd) | |
| 172 | 185 | START_OBJ := $(shell for o in crtbeginS.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | |
| 173 | 186 | END_OBJ := $(shell for o in crtendS.o; do ${CXX} ${CXXFLAGS} -print-file-name=$$o; done) | |
| … | … | ||
| 268 | 268 | endif | |
| 269 | 269 | ||
| 270 | 270 | ifeq ($(OSNAME),linux) | |
| 271 | dbg-shared: LDFLAGS += -shared -Wl,-h$(SO_NAME_DBGxx) ${NOSTDLIB} | ||
| 272 | stldbg-shared: LDFLAGS += -shared -Wl,-h$(SO_NAME_STLDBGxx) ${NOSTDLIB} | ||
| 273 | release-shared: LDFLAGS += -shared -Wl,-h$(SO_NAMExx) ${NOSTDLIB} | ||
| 274 | endif | ||
| 275 | |||
| 276 | ifeq ($(OSNAME),android) | ||
| 271 | 277 | dbg-shared: LDFLAGS += -shared -Wl,-h$(SO_NAME_DBGxx) ${NOSTDLIB} | |
| 272 | 278 | stldbg-shared: LDFLAGS += -shared -Wl,-h$(SO_NAME_STLDBGxx) ${NOSTDLIB} | |
| 273 | 279 | release-shared: LDFLAGS += -shared -Wl,-h$(SO_NAMExx) ${NOSTDLIB} |
Makefiles/gmake/sysid.mak
(31 / 6)
|   | |||
| 1 | # Time-stamp: <08/10/22 18:37:19 ptr> | ||
| 1 | # Time-stamp: <10/02/18 10:07:18 ptr> | ||
| 2 | 2 | # | |
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2008 | ||
| 3 | # Copyright (c) 1997-1999, 2002, 2003, 2005-2010 | ||
| 4 | 4 | # Petr Ovtchenkov | |
| 5 | 5 | # | |
| 6 | 6 | # Portion Copyright (c) 1999-2001 | |
| … | … | ||
| 45 | 45 | endif | |
| 46 | 46 | ||
| 47 | 47 | else | |
| 48 | OSNAME := $(shell echo ${TARGET_OS} | sed 's/^[a-z0-9_]\+-[a-z0-9]\+-\([a-z]\+\).*/\1/' | sed 's/^[a-z0-9_]\+-\([a-z]\+\).*/\1/' ) | ||
| 49 | OSREL := $(shell echo ${TARGET_OS} | sed 's/^[[:alnum:]_]\+-[a-z0-9]\+-[a-z]\+\([a-zA-Z.0-9]*\).*//' | sed 's/^[a-z0-9_]\+-[a-z]\+\([a-zA-Z.0-9]*\).*/ | ||
| 48 | ifneq ($(TARGET_OS),arm-eabi) | ||
| 49 | OSNAME := $(shell echo ${TARGET_OS} | sed -e 's/^[a-z0-9_]\+-[a-z0-9]\+-\([a-z]\+\).*/\1/' -e 's/^[a-z0-9_]\+-\([a-z]\+\).*/\1/' ) | ||
| 50 | OSREL := $(shell echo ${TARGET_OS} | sed -e 's/^[[:alnum:]_]\+-[a-z0-9]\+-[a-z]\+\([a-zA-Z.0-9]*\).*/\1/' -e 's/^[a-z0-9_]\+-[a-z]\+\([a-zA-Z.0-9]*\).*/\1/' ) | ||
| 50 | 51 | M_ARCH := $(shell echo ${TARGET_OS} | sed 's/^\([a-z0-9_]\+\)-.*/\1/' ) | |
| 51 | 52 | P_ARCH := unknown | |
| 53 | else | ||
| 54 | # Assume android NDK 1.5 r1 | ||
| 55 | OSNAME := android | ||
| 56 | # don't know, what OS release | ||
| 57 | # Known at this time: | ||
| 58 | # Android 2.1 Release 1 | ||
| 59 | # Android 1.6 Release 2 | ||
| 60 | # Android 1.5 Release 3 | ||
| 61 | # Older: | ||
| 62 | # Android 2.0.1 Release 1 | ||
| 63 | # Android 2.0 Release 1 | ||
| 64 | # Android 1.1 | ||
| 65 | OSREL := | ||
| 66 | M_ARCH := arm | ||
| 67 | # ARM v5TE | ||
| 68 | P_ARCH := ARM_5TE | ||
| 69 | |||
| 70 | _TMP := $(shell ${TARGET_OS}-c++ -mandroid -print-file-name=libgcc.a | xargs dirname | xargs dirname | xargs dirname | xargs dirname | xargs dirname | xargs dirname | xargs dirname | xargs dirname | xargs dirname | xargs dirname | xargs dirname) | ||
| 71 | # NDK 1.5 r1: android-1.5 | ||
| 72 | # NDK 1.6 r1: android-3 or android-4 | ||
| 73 | ANDROID_REV := 4 | ||
| 74 | _TMP2 := $(shell echo $(_TMP) | grep -o -- '-.\..' | sed -e s/1\.6/$(ANDROID_REV)/) | ||
| 75 | SYSROOT ?= $(_TMP)/platforms/android$(_TMP2)/arch-arm | ||
| 76 | endif | ||
| 52 | 77 | # TARGET_OS | |
| 53 | 78 | endif | |
| 54 | 79 | ||
| 55 | 80 | NODENAME := $(shell uname -n | tr '[A-Z]' '[a-z]' ) | |
| 56 | 81 | SYSVER := $(shell uname -v ) | |
| 57 | USER := $(shell echo $$USER ) | ||
| 82 | USER := $(shell id -un ) | ||
| 58 | 83 | ||
| 59 | 84 | ifeq ($(OSNAME),freebsd) | |
| 60 | 85 | OSREL_MAJOR := $(shell echo ${OSREL} | tr '.-' ' ' | awk '{print $$1;}') | |
| … | … | ||
| 94 | 94 | ||
| 95 | 95 | # OS_VER := $(shell uname -s | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',_') | |
| 96 | 96 | ||
| 97 | BUILD_SYSTEM := $(shell echo `uname -n` `uname -s` `uname -r` `uname -v` `uname -m` $$USER) | ||
| 97 | BUILD_SYSTEM := $(shell { uname -n; uname -s; uname -r; uname -v; uname -m; id -un; } | tr '\n' ' ' ) | ||
| 98 | 98 | BUILD_DATE := $(shell date +'%Y/%m/%d %T %Z') | |
| 99 | 99 | ||
| 100 | 100 | BUILD_OSNAME := $(shell uname -s | tr '[A-Z]' '[a-z]' | tr ', /\\()"' ',//////' | tr ',/' ',-') |
src/Makefiles/gcc.mak
(6 / 1)
|   | |||
| 1 | # -*- Makefile -*- Time-stamp: <08/10/22 15:04:42 ptr> | ||
| 1 | # -*- Makefile -*- Time-stamp: <10/03/05 23:06:25 ptr> | ||
| 2 | 2 | ||
| 3 | 3 | SRCROOT := .. | |
| 4 | 4 | COMPILER_NAME := gcc | |
| … | … | ||
| 16 | 16 | ifeq ($(OSNAME),linux) | |
| 17 | 17 | DEFS += -D_GNU_SOURCE | |
| 18 | 18 | STDLIBS = -Wl,--whole-archive -lsupc++ ${_LGCC_EH} -Wl,--no-whole-archive ${_LGCC_S} -lpthread -lc -lm | |
| 19 | endif | ||
| 20 | |||
| 21 | ifeq ($(OSNAME),android) | ||
| 22 | DEFS += -D_GNU_SOURCE | ||
| 23 | STDLIBS = -Wl,--whole-archive ${_LGCC_EH} -Wl,--no-whole-archive ${_LGCC_S} -Wl,-Bstatic -lthread_db -Wl,-Bdynamic -lc -lm | ||
| 19 | 24 | endif | |
| 20 | 25 | ||
| 21 | 26 | ifeq ($(OSNAME),openbsd) |
src/_stdio_file.h
(5 / 3)
|   | |||
| 67 | 67 | ||
| 68 | 68 | #elif defined (__hpux) /* && defined(__hppa) && defined(__HP_aCC)) */ || \ | |
| 69 | 69 | defined (__MVS__) || \ | |
| 70 | defined (_STLP_USE_UCLIBC) /* should be before _STLP_USE_GLIBC */ | ||
| 70 | defined (_STLP_USE_UCLIBC) || /* should be before _STLP_USE_GLIBC */ \ | ||
| 71 | defined (__ANDROID__) /* should be before _STLP_USE_GLIBC */ | ||
| 71 | 72 | ||
| 72 | 73 | inline int _FILE_fd(const FILE *__f) { return fileno(__CONST_CAST(FILE*, __f)); } | |
| 73 | 74 | ||
| … | … | ||
| 114 | 114 | #endif /* _STLP_STDIO_FILE_H */ | |
| 115 | 115 | ||
| 116 | 116 | /* Local Variables: | |
| 117 | * mode:C++ | ||
| 118 | * End: */ | ||
| 117 | * mode: C++ | ||
| 118 | * End: | ||
| 119 | */ |
src/c_locale.h
(1 / 0)
|   | |||
| 34 | 34 | #include "stlport_prefix.h" | |
| 35 | 35 | ||
| 36 | 36 | #include <wchar.h> /* for mbstate_t */ | |
| 37 | #include <stddef.h> | ||
| 37 | 38 | #include <stl/c_locale.h> | |
| 38 | 39 | ||
| 39 | 40 | struct _Locale_name_hint; |
src/num_get_float.cpp
(2 / 1)
|   | |||
| 104 | 104 | typedef unsigned __int64 uint64; | |
| 105 | 105 | # define ULL(x) x##Ui64 | |
| 106 | 106 | #elif defined (__unix) || defined (__MINGW32__) || \ | |
| 107 | (defined (__DMC__) && (__LONGLONG)) || defined (__WATCOMC__) | ||
| 107 | (defined (__DMC__) && (__LONGLONG)) || defined (__WATCOMC__) || \ | ||
| 108 | defined(__ANDROID__) | ||
| 108 | 109 | typedef uint32_t uint32; | |
| 109 | 110 | typedef uint64_t uint64; | |
| 110 | 111 | # define ULL(x) x##ULL |
src/num_put_float.cpp
(1 / 1)
|   | |||
| 43 | 43 | # endif | |
| 44 | 44 | ||
| 45 | 45 | # if defined (__QNXNTO__) || ( defined(__GNUC__) && defined(__APPLE__) ) || defined(_STLP_USE_UCLIBC) /* 0.9.26 */ || \ | |
| 46 | defined(__FreeBSD__) | ||
| 46 | defined(__FreeBSD__) || defined(__ANDROID__) | ||
| 47 | 47 | # define USE_SPRINTF_INSTEAD | |
| 48 | 48 | # endif | |
| 49 | 49 |
src/time_facets.cpp
(6 / 0)
|   | |||
| 165 | 165 | static void __append(__iostring &buf, const string& name) | |
| 166 | 166 | { buf.append(name.data(), name.data() + name.size()); } | |
| 167 | 167 | ||
| 168 | #ifndef _STLP_NO_WCHAR_T | ||
| 168 | 169 | static void __append(__iowstring &buf, const wstring& name) | |
| 169 | 170 | { buf.append(name.data(), name.data() + name.size()); } | |
| 171 | #endif | ||
| 170 | 172 | ||
| 171 | 173 | static void __append(__iostring &buf, char *first, char *last, const ctype<char>& /* ct */) | |
| 172 | 174 | { buf.append(first, last); } | |
| 173 | 175 | ||
| 176 | #ifndef _STLP_NO_WCHAR_T | ||
| 174 | 177 | static void __append(__iowstring &buf, char *first, char *last, const ctype<wchar_t>& ct) { | |
| 175 | 178 | wchar_t _wbuf[64]; | |
| 176 | 179 | ct.widen(first, last, _wbuf); | |
| 177 | 180 | buf.append(_wbuf, _wbuf + (last - first)); | |
| 178 | 181 | } | |
| 182 | #endif | ||
| 179 | 183 | ||
| 180 | 184 | #if defined (__GNUC__) | |
| 181 | 185 | /* The number of days from the first day of the first ISO week of this | |
| … | … | ||
| 463 | 463 | const _Time_Info& table, const tm* t) | |
| 464 | 464 | { __write_formatted_timeT(buf, ct, format, modifier, table, t); } | |
| 465 | 465 | ||
| 466 | #ifndef _STLP_NO_WCHAR_T | ||
| 466 | 467 | void _STLP_CALL __write_formatted_time(__iowstring &buf, const ctype<wchar_t>& ct, | |
| 467 | 468 | char format, char modifier, | |
| 468 | 469 | const _WTime_Info& table, const tm* t) | |
| 469 | 470 | { __write_formatted_timeT(buf, ct, format, modifier, table, t); } | |
| 471 | #endif | ||
| 470 | 472 | ||
| 471 | 473 | static time_base::dateorder __get_date_order(_Locale_time* time) { | |
| 472 | 474 | const char * fmt = _Locale_d_fmt(time); |
stlport/stl/_new.h
(7 / 0)
|   | |||
| 43 | 43 | ||
| 44 | 44 | # if defined (_STLP_HAS_INCLUDE_NEXT) | |
| 45 | 45 | # include_next <new> | |
| 46 | # ifdef __ANDROID__ | ||
| 47 | inline void* operator new(size_t, void* p) { return p; } | ||
| 48 | inline void* operator new[](size_t, void *p) { return p; } | ||
| 49 | # endif | ||
| 46 | 50 | # else | |
| 47 | 51 | # include _STLP_NATIVE_CPP_RUNTIME_HEADER(new) | |
| 48 | 52 | # endif | |
| … | … | ||
| 116 | 116 | # if !defined (_STLP_USE_EXCEPTIONS) | |
| 117 | 117 | # ifndef _STLP_INTERNAL_CSTDIO | |
| 118 | 118 | # include <stl/_cstdio.h> | |
| 119 | # endif | ||
| 120 | # ifdef __ANDROID__ | ||
| 121 | # include <stdlib.h> /* for exit() in _STLP_THROW_BAD_ALLOC */ | ||
| 119 | 122 | # endif | |
| 120 | 123 | # define _STLP_THROW_BAD_ALLOC puts("out of memory\n"); exit(1) | |
| 121 | 124 | # else |
stlport/stl/c_locale.h
(22 / 10)
|   | |||
| 101 | 101 | * For narrow characters, we expose the lookup table interface. | |
| 102 | 102 | */ | |
| 103 | 103 | ||
| 104 | #if defined (_STLP_USE_GLIBC) | ||
| 104 | #ifdef _STLP_USE_GLIBC | ||
| 105 | # ifdef __ANDROID__ | ||
| 106 | # define _Locale_CNTRL _C | ||
| 107 | # define _Locale_UPPER _U | ||
| 108 | # define _Locale_LOWER _L | ||
| 109 | # define _Locale_DIGIT _N | ||
| 110 | # define _Locale_XDIGIT (_N|_X) | ||
| 111 | # define _Locale_PUNCT _P | ||
| 112 | # define _Locale_SPACE _S | ||
| 113 | # define _Locale_PRINT (_P|_U|_L|_N|_B) | ||
| 114 | # define _Locale_ALPHA (_U|_L) | ||
| 115 | # else | ||
| 105 | 116 | /* This section uses macros defined in the gnu libc ctype.h header */ | |
| 106 | # define _Locale_CNTRL _IScntrl | ||
| 107 | # define _Locale_UPPER _ISupper | ||
| 108 | # define _Locale_LOWER _ISlower | ||
| 109 | # define _Locale_DIGIT _ISdigit | ||
| 110 | # define _Locale_XDIGIT _ISxdigit | ||
| 111 | # define _Locale_PUNCT _ISpunct | ||
| 112 | # define _Locale_SPACE _ISspace | ||
| 113 | # define _Locale_PRINT _ISprint | ||
| 114 | # define _Locale_ALPHA _ISalpha | ||
| 117 | # define _Locale_CNTRL _IScntrl | ||
| 118 | # define _Locale_UPPER _ISupper | ||
| 119 | # define _Locale_LOWER _ISlower | ||
| 120 | # define _Locale_DIGIT _ISdigit | ||
| 121 | # define _Locale_XDIGIT _ISxdigit | ||
| 122 | # define _Locale_PUNCT _ISpunct | ||
| 123 | # define _Locale_SPACE _ISspace | ||
| 124 | # define _Locale_PRINT _ISprint | ||
| 125 | # define _Locale_ALPHA _ISalpha | ||
| 126 | # endif | ||
| 115 | 127 | #else | |
| 116 | 128 | /* Default values based on C++ Standard 22.2.1. | |
| 117 | 129 | * Under Windows the localisation implementation take care of mapping its |
stlport/stl/char_traits.h
(2 / 0)
|   | |||
| 70 | 70 | # elif defined(_LARGEFILE_SOURCE) || defined(_LARGEFILE64_SOURCE) /* || defined(__USE_FILE_OFFSET64) */ \ | |
| 71 | 71 | /* || (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) */ /* || defined (__sgi) && defined (_STLP_HAS_NO_NEW_C_HEADERS) */ | |
| 72 | 72 | typedef off64_t streamoff; | |
| 73 | # elif defined(__ANDROID__) | ||
| 74 | typedef long streamoff; | ||
| 73 | 75 | # else | |
| 74 | 76 | typedef off_t streamoff; | |
| 75 | 77 | # endif |
stlport/stl/config/_android.h
(91 / 0)
|   | |||
| 1 | #ifndef __stl_config__android_h | ||
| 2 | #define __stl_config__android_h | ||
| 3 | |||
| 4 | #define _STLP_PLATFORM "Android" | ||
| 5 | |||
| 6 | #include <features.h> | ||
| 7 | |||
| 8 | /* The Android C library is mostly glibc-like */ | ||
| 9 | #ifndef _STLP_USE_GLIBC | ||
| 10 | # define _STLP_USE_GLIBC 1 | ||
| 11 | #endif | ||
| 12 | |||
| 13 | /* ... and Unix-like */ | ||
| 14 | #ifndef _STLP_UNIX | ||
| 15 | # define _STLP_UNIX 1 | ||
| 16 | #endif | ||
| 17 | |||
| 18 | /* No RTTI support in runtime */ | ||
| 19 | #define _STLP_NO_TYPEINFO 1 | ||
| 20 | /* No exceptions in runtime */ | ||
| 21 | #define _STLP_NO_RTTI 1 | ||
| 22 | |||
| 23 | /* Have pthreads support */ | ||
| 24 | #define _PTHREADS | ||
| 25 | |||
| 26 | /* Don't have native <cplusplus> headers */ | ||
| 27 | /* #define _STLP_HAS_NO_NEW_C_HEADERS 1 */ | ||
| 28 | |||
| 29 | /* Android has defined wchar, but this functionality | ||
| 30 | not really implemented. We think that it present, | ||
| 31 | but see comments in Android NDK before real use | ||
| 32 | wchars. | ||
| 33 | */ | ||
| 34 | /* Don't use wchar.h etc. */ | ||
| 35 | /* #define _STLP_NO_WCHAR_T 1 */ | ||
| 36 | |||
| 37 | /* Don't have (working) native wide character support */ | ||
| 38 | #define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 | ||
| 39 | |||
| 40 | /* Words about wchar (above) is applicable for mbstate too */ | ||
| 41 | /* Don't use mbstate_t, define our own */ | ||
| 42 | /* #define _STLP_NO_NATIVE_MBSTATE_T 1 */ | ||
| 43 | |||
| 44 | /* No (proper) wide stream support in Android */ | ||
| 45 | #define _STLP_NO_NATIVE_WIDE_STREAMS 1 | ||
| 46 | |||
| 47 | /* C library is in the global namespace */ | ||
| 48 | #define _STLP_VENDOR_GLOBAL_CSTD 1 | ||
| 49 | |||
| 50 | /* Don't have underlying locale support. */ | ||
| 51 | #undef _STLP_REAL_LOCALE_IMPLEMENTED | ||
| 52 | |||
| 53 | /* No pthread_spinlock_t in Android */ | ||
| 54 | #define _STLP_DONT_USE_PTHREAD_SPINLOCK 1 | ||
| 55 | |||
| 56 | /* Little endian platform. */ | ||
| 57 | #define _STLP_LITTLE_ENDIAN 1 | ||
| 58 | |||
| 59 | /* No <exception> headers */ | ||
| 60 | #define _STLP_NO_EXCEPTION_HEADER 1 | ||
| 61 | |||
| 62 | /* No need to define our own namespace */ | ||
| 63 | #define _STLP_NO_OWN_NAMESPACE 1 | ||
| 64 | |||
| 65 | /* Need this to define STLport's own bad_alloc class (which won't be | ||
| 66 | * thrown in any case) | ||
| 67 | */ | ||
| 68 | #define _STLP_NEW_DONT_THROW_BAD_ALLOC 1 | ||
| 69 | |||
| 70 | /* Use __new_alloc instead of __node_alloc, so we don't need static functions. | ||
| 71 | #define _STLP_USE_SIMPLE_NODE_ALLOC 1 | ||
| 72 | */ | ||
| 73 | |||
| 74 | /* Don't use extern versions of range errors, so we don't need to | ||
| 75 | * compile as a library. | ||
| 76 | #define _STLP_USE_NO_EXTERN_RANGE_ERRORS 1 | ||
| 77 | */ | ||
| 78 | |||
| 79 | /* The system math library doesn't have long double variants, e.g | ||
| 80 | * sinl, cosl, etc | ||
| 81 | */ | ||
| 82 | #define _STLP_NO_VENDOR_MATH_L 1 | ||
| 83 | |||
| 84 | #define _STLP_USE_UNIX_IO 1 | ||
| 85 | |||
| 86 | /* bypass arch-arm/usr/include/new */ | ||
| 87 | #ifndef __NEW__ | ||
| 88 | # define __NEW__ | ||
| 89 | #endif | ||
| 90 | |||
| 91 | #endif /* __stl_config__android_h */ |
stlport/stl/config/_gcc.h
(11 / 3)
|   | |||
| 148 | 148 | # define _STLP_NO_VENDOR_MATH_F | |
| 149 | 149 | #endif | |
| 150 | 150 | ||
| 151 | #ifdef __ANDROID__ | ||
| 152 | # define _STLP_HAS_NO_NEW_C_HEADERS 1 | ||
| 153 | #endif | ||
| 154 | |||
| 151 | 155 | #if (__GNUC__ >= 3) | |
| 152 | # define _STLP_HAS_NO_NEW_C_HEADERS // experiment | ||
| 153 | 156 | # ifndef _STLP_HAS_NO_NEW_C_HEADERS | |
| 157 | # define _STLP_HAS_NO_NEW_C_HEADERS // experiment | ||
| 158 | # endif | ||
| 159 | # ifndef _STLP_HAS_NO_NEW_C_HEADERS | ||
| 154 | 160 | /* | |
| 155 | 161 | # ifndef _STLP_USE_UCLIBC | |
| 156 | 162 | */ | |
| … | … | ||
| 182 | 182 | # define _STLP_DEF_CONST_PLCT_NEW_BUG 1 | |
| 183 | 183 | #endif | |
| 184 | 184 | ||
| 185 | #undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT | ||
| 186 | #undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT | ||
| 185 | #ifndef __ANDROID__ | ||
| 186 | # undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT | ||
| 187 | # undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT | ||
| 188 | #endif | ||
| 187 | 189 | ||
| 188 | 190 | /* strict ANSI prohibits "long long" ( gcc) */ | |
| 189 | 191 | #if defined ( __STRICT_ANSI__ ) |
stlport/stl/config/_system.h
(5 / 0)
|   | |||
| 74 | 74 | # include <stl/config/_kai.h> | |
| 75 | 75 | # endif | |
| 76 | 76 | */ | |
| 77 | #elif defined (__ANDROID__) | ||
| 78 | # include <stl/config/_android.h> | ||
| 79 | # if defined (__GNUC__) | ||
| 80 | # include <stl/config/_gcc.h> | ||
| 81 | # endif | ||
| 77 | 82 | #elif defined (__FreeBSD__) | |
| 78 | 83 | # include <stl/config/_freebsd.h> | |
| 79 | 84 | # if defined (__GNUC__) |

