Commit graph

1344 commits

Author SHA1 Message Date
Andras Timar
aab14cb9fb fix prefix of command line switches (-- instead of -) 2012-01-11 19:25:45 +01:00
Caolán McNamara
c11bcb5be5 valgrind: error on startup in osl_unmapMappedFile 2012-01-06 12:11:02 +00:00
Michael Stahl
8b898fb94e sal: try to fix MinGW min/max breakage by inlining 2012-01-05 13:19:08 +01:00
Caolán McNamara
17642437fe reduce ifdef forest 2012-01-05 09:18:20 +00:00
Tor Lillqvist
0a5821652f Remove bogus one column indentation 2012-01-04 15:33:46 +02:00
Tor Lillqvist
d37157372d Handle /assets paths also in realpath_u() 2012-01-04 15:33:39 +02:00
Tor Lillqvist
d4b0e98d50 Probably using a local rtl::OString is better 2012-01-04 15:27:54 +02:00
Tor Lillqvist
90b1414960 Use the lo_apk_* functions for files under /assets 2012-01-04 00:17:25 +02:00
Tor Lillqvist
2717fe35ae Use sizeof(s)-1 instead of strlen(s) on string literals 2012-01-04 00:16:39 +02:00
Tor Lillqvist
2ad20308ed WaE: deprecated conversion from string constant to 'char*' 2012-01-03 11:06:23 +02:00
Olivier Hallot
85d1ce27ad Fix for fdo43460 Part XXVII getLength() to isEmpty()
Please find attached a partial fix for Easy Hack FDO43460

Part XXVII
Modules
padmin, pyuno, rdbmaker, regexp, registry, rsc, sal
2012-01-02 19:17:17 +01:00
Robert Nagy
891d78eb46 use the internal gethostbyname_r() implementation on OpenBSD too 2011-12-21 15:27:05 +01:00
Tor Lillqvist
e3ab0fd901 osl_unmapFile can't work for files bundled inside the .apk on Android
On Android, when an app is installed, arbitrary files bundled in the
app won't be unpacked into actual separate files in the file
system. They will exist only as archive entries in the .apk file
(which is a zip archive).

The SDK tooling puts such files under the /assets folder in the
.apk. The LibreOffice bootstrapping code for Android maps the .apk
file into memory.

osl_openFile() knows about the /assets special case, and uses a
separate abstraction for such memory-mapped files.

Obviously, when producing an .apk, one needs to make sure these
bundled files are not compressed, if one wants to be able to use them
directly from the memory-mapped .apk file. We do that in our test and
sample Android projects.

When mapping such files under /assets , just return a pointer to the
file's location inside the mapped .apk archive.

We can't use the old osl_unmapFile() on such mapped files, as that
would unexpectedly unmap fairly arbitrary pages of the .apk mapping,
wreaking havoc on later use of the same pages.

So, introduce a new osl_unmapMappedFile() function that takes also the
oslFileHandle originally passed to osl_mapFile(). Use this instead in
the few places where the code actually called osl_unmapFile(). Make
sure osl_mapFile() is nonexistent on Android.
2011-12-21 14:08:48 +02:00
Tor Lillqvist
527cca44ba Bin leftover unused files 2011-12-21 00:45:58 +02:00
Tor Lillqvist
a6eb07b239 Fix compiler warnings for Android 2011-12-20 01:12:22 +02:00
Stephan Bergmann
fb2078addc Clean up previous commit. 2011-12-19 16:47:13 +01:00
Moritz Bechler
32a6a0891f fdo#43095: allow the use of real access() calls 2011-12-19 16:36:31 +01:00
Stephan Bergmann
f039057048 Warning clean-up (Mac OS X). 2011-12-19 13:08:27 +01:00
Stephan Bergmann
5c43f54af8 At least GCC 4.5.1 does not allow #pragma GCC diagnostic inside functions. 2011-12-19 11:46:44 +01:00
Stephan Bergmann
8ee1a76b73 -Werror=shadow and -Werror=sign-promo fixes 2011-12-19 11:00:03 +01:00
Matúš Kukan
cf77e8a0b9 sal: add visibility symbols 2011-12-19 10:14:53 +01:00
Matúš Kukan
a9e130ab82 sal: convert to gbuild 2011-12-19 10:14:53 +01:00
Tor Lillqvist
b7bd441a7f Bin a few lines of weird crack 2011-12-13 15:10:30 +02:00
Caolán McNamara
42502c8484 || -> && 2011-12-07 11:36:01 +00:00
Arnaud Versini
8538a09660 Don't replace getpid on Linux when the system version is correct 2011-12-07 10:37:38 +02:00
Caolán McNamara
c8ef924060 normalize Red Hat, Inc. spellings, and bump to latest template 2011-12-06 21:24:37 +00:00
Bjoern Michaelsen
efd750d843 lp#726529: inline arm assembler is obsolete by now 2011-12-05 21:57:37 +01:00
Stephan Bergmann
90a3c0c0b4 ChildStatusProc needs to be extern "C". 2011-12-05 08:28:38 +01:00
Stephan Bergmann
a84d912b7b Improve ChildStatusProc diagnostics. 2011-12-02 14:57:52 +01:00
Tor Lillqvist
5510127e89 Android code refactorig and hacking
Sorry for the large unstructured commit. But hey, the Android code is
experimental so far.

Extract the native lo-bootstrap code into a fairly normal library
built in sal. (Previously it was the JNI part of the "Bootstrap" app.)
Just linkink normally to liblo-bootstrap from C++ code that uses it
works fine, no need to do a dlsym lookup.

Bootstrap is still a subclass of NativeActivity and can thus still be
used as an "app" (to start unit tests, or whatever), but can also be
used from some other app's Java code to just get access to the
lo-bootstrap native methods.

Introduce a new top-level "module", android, for Bootstrap and the
experiments with DocumentLoader.

Note that the experimental DocumentLoader app still crashes. It can't
create the com.sun.star.frame.Desktop instance.

I spent lots of time debugging in the painfully inadequate
ndk-gdb. (Even the newer gdb build from the "mingw-and-ndk" project is
quite crappy in many ways.) I should really experiment with
corresponding code on a normal platform first before even trying on
Android. Basically, I think that if I just can get the concept of Java
code that instantiates and uses LO components *in-process* working on
a normal desktop platform, it should work on Android, too.
2011-11-30 21:52:52 +02:00
Tor Lillqvist
203553e717 Refactor, make lo-bootstrap API usable from non-NativeActivity apps too 2011-11-29 01:37:03 +02:00
Tor Lillqvist
406947c633 Construct a .jar for use by future other Android-specific Java code, too 2011-11-29 01:37:02 +02:00
Norbert Thiebaud
8fc6fc97d5 remove include of pch header from sal 2011-11-27 13:18:15 -06:00
Norbert Thiebaud
e4610ffd2d remove PCH support in dmake-module 2011-11-27 12:26:12 -06:00
François Tigeot
3a1441c0d3 PDP_ENDIAN and variants are unused.
Remove their use from the code.
2011-11-25 14:38:11 +01:00
Tor Lillqvist
15f6fec4d4 Add lo_get_javavm() to get the JavaVM we are runnning in 2011-11-25 01:39:20 +02:00
Tor Lillqvist
1c08f9066c Replace also the std::type_info::before() in libgnustl_shared.so
It too suffers from the same problem as operator==: Compares name
pointers, not name strings. Thus with two things to patch, had to
refactor it.

(before() doesn't seem to get called when running the bridgetest at
least, though.)

Noticed that there is no need to wrap the replacement asm snippets
with dummy C functions. Just having them at the outermost level in the
source file works as expected.
2011-11-24 23:12:22 +02:00
Tor Lillqvist
de5840a524 Reduce logging verbosity and tune levels 2011-11-24 19:29:54 +02:00
Tor Lillqvist
5df8678709 Binary patch the mmapped libgnustl_shared.so from NDK r7
Poke in a jump to our replacement for std::type_info::operator==. See
http://code.google.com/p/android/issues/detail?id=22165 .
2011-11-24 19:20:14 +02:00
Tor Lillqvist
6f18ccfcd6 Add "clean" target 2011-11-24 19:20:11 +02:00
Michael Meeks
f1ef1ed690 version information from Arnaud on deprecating the getpid workaround. 2011-11-23 15:30:48 +00:00
Stephan Bergmann
0c7bff0271 Changed sal/log.h -> sal/log.hxx, drop _S from C++ streaming log macros.
A compile time check ensures the common case of streaming just a plain
C-style string literal still produces reasonably compact call-site code.
The format-string variants are still available in sal/detail/log.h, but
only to be used in obsolete osl/diagnose.h etc., and going to be removed
again eventually.
2011-11-23 15:50:58 +01:00
Jan Holesovsky
832e6d2293 Some trivial fixes for MinGW with -std=c++0x enabled; not finished. 2011-11-23 11:59:30 +01:00
Stephan Bergmann
70a6b9ffbd New sal/log.h obsoletes osl/diagnose.h and tools/debug.hxx.
* New SAL_INFO..., SAL_WARN... macros.
* New SAL_STREAM supersedes OSL_FORMAT.
* oustringostreaminserter.hxx moved from unotest to rtl (and always UTF-8 now).
* TODO to enable GCC __attribute__((format)) in sal/log.h (requires call-site
  cleanup).
* Further functionality in tools/debug.hxx (DBG_MEMTEST, DBG_CTOR, etc.) not yet
  addressed.
* Some replacements tools String -> rtl::OUString.
2011-11-22 09:41:47 +01:00
Michael Meeks
997ac87c86 remove extraneous endif. 2011-11-21 17:57:44 +00:00
Michael Meeks
fc1c44d1dd only build custom gethostbyname for OSX & IOS 2011-11-21 17:40:48 +00:00
Michael Meeks
441227374c Revert "Remove internal gethostbyname_r implementation." - OSX needs it
This reverts commit af19d9f563.
2011-11-21 17:40:47 +00:00
Arnaud Versini
513c888595 Remove internal backtrace and backtrace_symbols_fd 2011-11-21 17:10:08 +00:00
Arnaud Versini
af19d9f563 Remove internal gethostbyname_r implementation. 2011-11-21 17:10:07 +00:00
Arnaud Versini
161ff9a443 Replace gethostbyname by _osl_gethostbyname_r in socket.c . 2011-11-21 17:10:07 +00:00