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 -
* 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 -
- 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 -
- 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 -
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 -
- 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 -
- 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 -
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 -
--- 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 -
--- 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 -
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 -
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 -
*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 -