Commit Graph

34883 Commits

Author SHA1 Message Date
pierre
32f7104ffe * Fix failure of webtbs/tw17560:
the C structure sem (also TSemaphore record) used in cthreads unit
    inside cIntSemaphoreInit function via
    a GetMem(sizeof(TSempahore). sem was a simple cint
    value which lead to memoryt overwriting past end of
    allocated memory in sem_XXX calls.

git-svn-id: trunk@19176 -
2011-09-22 11:37:27 +00:00
michael
1579470a68 * Also check TMPDIR, a UNIX standard used by a.o. iOS (mantis #20248)
git-svn-id: trunk@19175 -
2011-09-22 11:29:50 +00:00
michael
e46bc70389 * Added example for compression level (Bug 20322)
git-svn-id: trunk@19174 -
2011-09-22 11:25:57 +00:00
michael
e0f458a7e9 * Applied patch from Daniel Gaspary to add compression level to individual items (Bug 20322)
git-svn-id: trunk@19173 -
2011-09-22 11:22:03 +00:00
paul
935a030dca rtl: enable character unit compilation for win32
git-svn-id: trunk@19172 -
2011-09-22 02:07:05 +00:00
paul
eefdd29151 tests: removed accidentally committed test file
git-svn-id: trunk@19171 -
2011-09-22 00:56:24 +00:00
paul
59a69eaeba rtl: add TCharacter class implementation by Inoussa. At this moment only BMP(0-$FFFF) UnicodeChar are handled.
tests: add character unit tests
(mantis #0020302)

git-svn-id: trunk@19170 -
2011-09-22 00:52:51 +00:00
florian
f14e0a25c6 * reduce code size of dummy threading routines
* threading manager of the embedded target uses only one dummy routine to reduce code size

git-svn-id: trunk@19169 -
2011-09-21 21:00:15 +00:00
florian
375f83c874 * moved heap manager on embedded systems into a separate unit
* moved console io on embedded systems into a seperate unit, this unit might setup input/output e.g. to be redirected to a serial port
* cleanup of the embedded system unit

git-svn-id: trunk@19168 -
2011-09-21 20:57:37 +00:00
pierre
10586b19c3 * Reading tsettings field by field
git-svn-id: trunk@19167 -
2011-09-21 15:34:16 +00:00
Jonas Maebe
2b54010d28 * fixed errors with make -j <high number> caused by a wrong fpvectorial
dependency rule resulting in fcl-base to be concurrently compiled multiple
    times

git-svn-id: trunk@19166 -
2011-09-21 12:33:09 +00:00
paul
828367bebd compiler:
- return default compiler codepage to 8859-1
  - emit ansistring constants in CP_NONE by default
  - add new modeswitch systemcodepage which sets default compiler codepage to system and emits ansistring constants with systemcodepage as delphi do
  - add new mode DelphiUnicode with has the same switches as delphi mode + systemcodepage switch. Later it will also have string = unicodestring by default.

git-svn-id: trunk@19165 -
2011-09-21 01:23:42 +00:00
sergei
f2852137c8 * DisposeAnsiString doesn't need to exist as a separate procedure, because it is only called from a single place. Merging it into caller yields somewhat more efficient code.
* DisposeWideString,DisposeUnicodeString: likewise.

git-svn-id: trunk@19163 -
2011-09-20 18:53:29 +00:00
sergei
c73b6cfbd4 - removed register lists after pure assembler procedures
- removed {$ifdef FPC_HAS_RIP_RELATIVE}, it is obsolete because rip-releative referencing is supported in at least two releases by now.
+ added nostackframe to simple assembler procedures
* Inclocked, Declocked: do not duplicate entire procedures, Win64 and Linux versions differ in a single instruction.

git-svn-id: trunk@19162 -
2011-09-20 17:57:58 +00:00
pierre
841b3e4179 TImportLibWin.generateimportlib method:
local procedure AddImport: Use same RIP relative code
  as in ogcoff unit for x86_64 CPU to allow a VMA above
  0x100000000 even when using.
  TImportLibWin.generateidatasection;
  also used RIP base for import libraries created using -WI option.

git-svn-id: trunk@19161 -
2011-09-20 15:25:13 +00:00
sergei
f35a8179b1 * Status codes are identical for win32 and win64, moved them to syswin.inc.
git-svn-id: trunk@19160 -
2011-09-20 15:01:22 +00:00
paul
6972947c6b compiler: remove unused variable
git-svn-id: trunk@19159 -
2011-09-20 13:44:53 +00:00
sergei
b0c2548019 * Use '.tls' as name for sec_threadvar sections for all Windows and WinCE targets, not just i386-win32.
git-svn-id: trunk@19157 -
2011-09-19 22:27:53 +00:00
pierre
313daaa44a Use Windows TLS Callback by default
git-svn-id: trunk@19151 -
2011-09-19 18:39:31 +00:00
sergei
6f20627220 * Use rip-relative offsets in assembler, fixes linking text mode IDE with internal linker. The better way would be to get rid of this assembler altogether.
git-svn-id: trunk@19149 -
2011-09-19 15:18:28 +00:00
paul
8b0cb2c1d5 compiler:
- don't parse '(' token after the type declaration inside the type block
  - replace parse of "string<codepage>" to "type AnsiString(codepage)" for delphi compatibility
  - fix tests to use "type AnsiString(codepage)"

git-svn-id: trunk@19148 -
2011-09-19 04:11:57 +00:00
paul
eca53485b8 compiler: cleanup
git-svn-id: trunk@19147 -
2011-09-19 02:57:47 +00:00
paul
9c39ad5428 compiler: winlike widestrings should not contain "encoding" and "element size" fields
git-svn-id: trunk@19146 -
2011-09-19 02:13:09 +00:00
paul
41e85bc36a compiler:
- emit ansistring constants with compiler codepage if no codepage is explicitly set
  - set default compiler codepage to default system codepage (delphi compatible)
  + tests

git-svn-id: trunk@19145 -
2011-09-19 01:04:56 +00:00
paul
4d3da666db compiler: replace string codepage comparison to numeric. store codepage as number in current settings
git-svn-id: trunk@19144 -
2011-09-19 00:48:43 +00:00
florian
030bcd083b * cwstring is unix only
git-svn-id: trunk@19143 -
2011-09-18 20:41:37 +00:00
Jonas Maebe
85ed1b87d9 * fixed wrong use of CompareTextUnicodeStringProc() in
fpc_ansistr_compare_equal(). "make cycle" now works under Linux, but
    there is probably still a bug somewhere because I don't think that the
    compiler should ever trigger the code path the contained this bug

git-svn-id: trunk@19139 -
2011-09-18 11:17:37 +00:00
marco
e343e6263b * Patch to fix createevent call on wince if the last param
is nil. (last param contains security settings not   available on wince?). Patch
   by Fabio, Mantis #20280

git-svn-id: trunk@19138 -
2011-09-18 10:53:48 +00:00
paul
528f7fbb06 rtl: manual merge some cpstrnew changes which was impossible to merge using regular tools due to the merge conflicts
git-svn-id: trunk@19137 -
2011-09-18 01:40:56 +00:00
florian
867fc54147 * changing tests to fix regressions is only the last resort, so this should be sorted out by other means, r19117 reverted
--- Reverse-merging r19117 into '.':
U    tests\tbs\tb0349.pp
U    tests\tbs\tb0503.pp
 G   .
--- Recording mergeinfo for reverse merge of r19117 into '.':
 G   .

git-svn-id: trunk@19136 -
2011-09-17 18:21:25 +00:00
florian
edaa0b3014 * changing tests to fix regressions is only the last resort, so this should be sorted out by other means, r19116 reverted
--- Reverse-merging r19116 into '.':
U    tests\webtbs\tw4675.pp
U    tests\webtbs\tw7758.pp
U    tests\webtbs\tw18702.pp
U    tests\webtbs\tw3595.pp
U    tests\webtbs\tw5001.pp
U    tests\webtbs\tw2250.pp
U    tests\webtbs\tw3492.pp
U    tests\webtbs\tw16004.pp
 G   .
--- Recording mergeinfo for reverse merge of r19116 into '.':
 G   .

git-svn-id: trunk@19135 -
2011-09-17 18:19:47 +00:00
paul
1f129cfee0 packages: replace UTF8String to AnsiString at least for now.
git-svn-id: trunk@19134 -
2011-09-17 16:08:24 +00:00
paul
85450d5469 compiler utils: manual merge some cpstrnew changes which was impossible to merge using regular tools due to the merge conflicts
git-svn-id: trunk@19133 -
2011-09-17 15:43:36 +00:00
paul
fd5a15fda5 rtl: manual merge some cpstrnew changes which was impossible to merge using regular tools due to the merge conflicts
git-svn-id: trunk@19132 -
2011-09-17 15:39:46 +00:00
paul
aba0106366 compiler: manual merge some cpstrnew changes which was impossible to merge using regular tools due to the merge conflicts
git-svn-id: trunk@19131 -
2011-09-17 15:36:56 +00:00
florian
f238c9161b + declaration of missing BufLen
git-svn-id: trunk@19130 -
2011-09-17 15:34:36 +00:00
florian
3e7ee21230 * booltype => pasbool8type
git-svn-id: trunk@19129 -
2011-09-17 15:33:49 +00:00
paul
631c545423 merge r19075 from cpstrnew branch by paul:
rtl: change UTF8Decode, UTF8Encode, AnsiToUTF8, UTF8ToAnsi to use RawByteString as arguments/result for compatibility with the old code and also with delphi

git-svn-id: trunk@19128 -
2011-09-17 14:30:17 +00:00
paul
f3ebaab222 merge r19075 from cpstrnew branch by paul:
compiler: partly revert r17434 because of a test regression. Also this is delphi compatible (although delphi does not know a {$codepage} directive)

git-svn-id: trunk@19127 -
2011-09-17 14:26:30 +00:00
paul
1e3239915f merge r19074 from cpstrnew branch by paul:
tests: fix 2 tests. $FFFF chars are now valid characters for the compiler

git-svn-id: trunk@19126 -
2011-09-17 14:23:58 +00:00
paul
23ea810e0c merge r17608 from cpstrnew branch by inoussa:
tests

git-svn-id: trunk@19125 -
2011-09-17 14:21:28 +00:00
paul
5ac95bc27a merge r17607 from cpstrnew branch by inoussa:
Updated to take care of the code page : fpc_ansistr_to_chararray, fpc_ansistr_to_widechararray

git-svn-id: trunk@19124 -
2011-09-17 14:18:53 +00:00
paul
a87bb4283d merge r17604 from cpstrnew branch by inoussa:
tests

git-svn-id: trunk@19123 -
2011-09-17 14:13:49 +00:00
paul
05d66e31ce merge r17603 from cpstrnew branch by inoussa:
Updated to take care of the code page : fpc_char_to_ansistr, fpc_pchar_to_ansistr, fpc_AnsiStr_To_ShortStr

git-svn-id: trunk@19122 -
2011-09-17 14:07:20 +00:00
paul
aaf5392315 merge r17601 from cpstrnew branch by inoussa:
Correct fpc_ansistr_to_ansistr and fpc_short_to_ansistr and test

git-svn-id: trunk@19121 -
2011-09-17 14:03:10 +00:00
paul
7c21524892 merge r17587 from cpstrnew branch by inoussa:
fpc_AnsiStr_To_AnsiStr : avoid code page conversion when possible.

git-svn-id: trunk@19120 -
2011-09-17 13:59:38 +00:00
paul
1d2778af24 merge r17554 from cpstrnew branch by inoussa:
new tests.

git-svn-id: trunk@19119 -
2011-09-17 13:57:24 +00:00
paul
005795495d merge r17552 from cpstrnew branch by inoussa:
*In normal procedure "var" and "out" RawByteString parameters does not accept other string types. Procedures with
"compilerproc" directive or the newly added "rtlproc" directive accept that. Please note that it is up to the
procedure coder to ensure the correctness of the code page in that case. The new directive is needed to handle 
the RTL procedures/functions that are not marked as "compilerproc" such as "UniqueString", "Insert" and "Delete".

*Correct "fpc_ansistr_concat" to handle code page correctly.

*Default "ansitring" type is now created with code page set to "0" instead of "65535". Before that change it was 
impossible to distinguish a "RawByteString" with the default "ansistring". At runtime "ansistring" variable'code
page is set to DefaultSystemCodePage

*UniqueString flavor of "SetLength" has been updated to release memory when shrinked to at least 50%, like ansitring
does.

git-svn-id: trunk@19118 -
2011-09-17 13:52:09 +00:00
paul
0c3ccadf07 merge r17488 from cpstrnew branch by michael:
* Updates from Inoussa

git-svn-id: trunk@19117 -
2011-09-17 13:46:45 +00:00
paul
cf77233a52 merge r17487 from cpstrnew branch by michael:
* UPdates from inoussa

git-svn-id: trunk@19116 -
2011-09-17 13:43:15 +00:00