Commit Graph

9115 Commits

Author SHA1 Message Date
pierre
3f4dd5ac9b * Fix parameter type for sigsuspend syscall for OpenBSD
git-svn-id: trunk@19609 -
2011-11-08 17:01:02 +00:00
pierre
de2bd0d896 Avoid false problem report on SYS_dup due to SYS_dup2
git-svn-id: trunk@19601 -
2011-11-07 13:05:39 +00:00
sergei
ebe1d74d6e * Moved multiple similar checks for FPC_HAS_FEATURE_EXITCODE and FPC_LIMITED_EXITCODE to Halt() procedure. Now these checks appear only once.
git-svn-id: trunk@19597 -
2011-11-05 16:48:12 +00:00
sergei
56900b4754 * RTL: clean up exception handling code (functionality is not changed).
* changed fpc_pushexceptobj to normal procedure, it does not need to be a compilerproc.

git-svn-id: trunk@19596 -
2011-11-05 16:28:37 +00:00
michael
2625b1dfa4 * Improved efficiency of Now/Date/Time
git-svn-id: trunk@19572 -
2011-11-02 14:33:33 +00:00
michael
86c0b324fd * Added ReReadTimeZone
git-svn-id: trunk@19569 -
2011-11-01 18:05:38 +00:00
paul
60de075ebe rtl: initialize CodePage field of ReadStr/WriteStr Text variables
git-svn-id: trunk@19567 -
2011-10-31 07:07:24 +00:00
florian
d6e429e871 * .lpi version update
git-svn-id: trunk@19557 -
2011-10-30 14:24:03 +00:00
paul
5c00cdf40d rtl: correct ifdef for a code which assigns a codepage to textrec to use FPC_HAS_CPSTRING
git-svn-id: trunk@19548 -
2011-10-27 01:24:00 +00:00
florian
72425b49c9 * fixes bootstrapping with upcoming 2.6.x
git-svn-id: trunk@19547 -
2011-10-26 19:26:10 +00:00
paul
b7185a554c rtl:
- replace ifndef ver2_4 with ifdef FPC_HAS_CPSTRING for places with TextRec.CodePage access
  - convert codepages for Read and Write text file operations

git-svn-id: trunk@19545 -
2011-10-25 08:40:49 +00:00
paul
ef0c4a1e5c rtl: fix fpc_AnsiStr_To_AnsiStr source codepage check (less conversions should be done now from AnsiString type to the same codepage strings)
git-svn-id: trunk@19544 -
2011-10-25 07:57:31 +00:00
paul
e08c68f308 rtl: set codepages for TextRec field when Text file is opened + update this field for standard IO files when cwstring is used
git-svn-id: trunk@19543 -
2011-10-25 06:27:54 +00:00
paul
1ccf16358c rtl: init widestring and unitcodestring managers before initialization of Standard IO files (stdin,stdout,stderr)
git-svn-id: trunk@19542 -
2011-10-25 02:29:29 +00:00
paul
2254dad68a rtl: add SetTextCodePage, GetTextCodePage functions which set/get TTextRec.CodePage field
git-svn-id: trunk@19541 -
2011-10-25 02:16:34 +00:00
paul
e46e2c3ebd compiler, rtl: extend TextRec record with CodePage field
git-svn-id: trunk@19540 -
2011-10-25 02:09:57 +00:00
paul
270fb09e87 rtl: add WideStringManager.GetStandardCodePageProc method to retrieve system ansi and console code pages
git-svn-id: trunk@19539 -
2011-10-25 01:39:11 +00:00
paul
3e29f0b179 rtl: make cwstring.pp dependent of dynlibs, load iconvctl dynamically
git-svn-id: trunk@19538 -
2011-10-25 01:25:23 +00:00
Jonas Maebe
9ee27c1606 * support for iOS-specific location of "localtime" time zone file
(problem reported at http://blogs.embarcadero.com/ao/2011/10/20/39180 )

git-svn-id: trunk@19537 -
2011-10-24 19:24:57 +00:00
florian
3c0256bd7b * patch by Ludo Brands to fix #20481: GetFileType cannot be used on windows to determine if a handle is a console handle because the function does not distinguish between consoles and printers, resolves #20481
git-svn-id: trunk@19532 -
2011-10-23 14:20:00 +00:00
olivier
dbaf153163 * revert part of r19256. While this declaration seems not consistent with
Haiku headers, it avoid some segmentation faults with threaded programs.

git-svn-id: trunk@19531 -
2011-10-22 23:12:20 +00:00
Jonas Maebe
01b980a462 * added "inc" extension to {$i winiconv}
git-svn-id: trunk@19529 -
2011-10-22 08:59:07 +00:00
Jonas Maebe
2b63a7d66f * fixed compilation on darwin/arm after r19522
* replaced defined(arm) with defined(cpuarm) checks (cleaner)

git-svn-id: trunk@19528 -
2011-10-22 08:40:37 +00:00
olivier
07eed52fd8 * fix some pthread declarations probably inherited from the BeOS port.
Finally fix a deadlock when launching Lazarus with thread support.

git-svn-id: trunk@19526 -
2011-10-21 22:24:03 +00:00
paul
5d7d143300 rtl: transliterate characters if possible intead of replacing them with "?" chars while converting between codepages
git-svn-id: trunk@19522 -
2011-10-21 03:23:23 +00:00
paul
c1866d5c17 compiler:
- don't pass CP_NONE encoding to internal functions. They handled it as 0 encoding. This will optimize the generated code a bit.
  - convert all king of string/char/pchar constants to local ansistring def if they needs to be passed to rawbytestring type. They should not get a CP_NONE codepage (delphi compatible)
  - don't convert left and right arguments of string concatenation to ansistring type if they are already ansistrings but with different codepage - RTL already handles different codepages in concat routine
  - fix resultdef for ansistring concatenations inside assignments - return def of left assignment operand if it is already ansistring - this reduces amount of unneeded condepage conversions since concat functions can return result in any desired codepage
rtl: remove CP_NONE comparisions from most of RTL functions, replace 0 constant with CP_ACP
tests: add test to check various conversions to RawByteString type

git-svn-id: trunk@19519 -
2011-10-20 09:25:51 +00:00
sergei
f4023ef49e - Removed outdated VER2_0 defines
git-svn-id: trunk@19513 -
2011-10-19 11:39:59 +00:00
paul
212b14a46b rtl: set string codepage for all cases in fpc_AnsiStr_Concat
git-svn-id: trunk@19509 -
2011-10-19 01:06:04 +00:00
marco
94e03df0e1 * Applied patch from Lacak2 that improved compare() functionality for
values with inequal length. Mantis #20505

git-svn-id: trunk@19508 -
2011-10-18 20:21:34 +00:00
sergei
a32fdc3ae6 + Added a simple helper tcg.g_call, intended to replace allocallcpuregisters+a_call_name+deallocallcpuregisters sequence which is used all over the place.
* Refactored code generation for tcgonnonde and tcgtryexceptnode, simplifying both compiler and generated code. Merged compilerprocs called in sequence into larger ones (fpc_popobjectstack+fpc_destroyexception -> fpc_doneexception, fpc_popsecondobjectstack+fpc_destroyexception+fpc_reraise -> fpc_raise_nested).

git-svn-id: trunk@19506 -
2011-10-18 15:46:15 +00:00
sergei
9b2614684e * Return values of get_caller_addr and get_caller_frame was undefined for nil argument.
Moreover, these function have nothing to do with assembler at all.

git-svn-id: trunk@19502 -
2011-10-16 13:18:21 +00:00
sergei
8e41ecfd54 * Made a stupid mistake in r19460: restoring rbp from rbp-relative reference will obviously crash. This went unnoticed however, because PASCALMAIN does not return and wrong code is never executed. Fixed by storing rbp in non-volatile register instead of local var.
git-svn-id: trunk@19501 -
2011-10-16 12:38:47 +00:00
Jonas Maebe
5122411409 * mark strcopy/strlcopy as "overload" in the interface of the strings unit
for overloading with sysutils versions (fixes r19488)

git-svn-id: trunk@19490 -
2011-10-15 12:32:21 +00:00
Jonas Maebe
c7b83717cb - removed stray "overload" modifiers in the implementation for strcopy and
strlcopy (only existed for generic and i386 versions)

git-svn-id: trunk@19488 -
2011-10-15 11:40:16 +00:00
sergei
018fdaf839 - Removed unnecessary operations: SetLength before widestringmanager calls (widestringmanager does the allocation) and zero-termination after SetLength (SetLength does zero-termination).
git-svn-id: trunk@19483 -
2011-10-13 17:10:12 +00:00
sergei
b36a930f26 - Cleaned out REGCALL defines
git-svn-id: trunk@19482 -
2011-10-13 17:02:23 +00:00
sergei
0d3fa2d2db - Cleaned out VER2_2 defines
git-svn-id: trunk@19479 -
2011-10-13 10:19:13 +00:00
sergei
ea571ba1a3 * Use variables instead of direct indexing into stack, eliminates warnings at compilation.
git-svn-id: trunk@19478 -
2011-10-13 08:19:09 +00:00
paul
5bf39cd1c1 rtl: remove ver2_2 define
git-svn-id: trunk@19471 -
2011-10-12 01:55:46 +00:00
paul
6131a9188c rtl: fix wince compilation, reimplement WinCEWide2AnsiMove, WinCEAnsi2WideMove by copying win32 code
git-svn-id: trunk@19470 -
2011-10-12 01:50:14 +00:00
pierre
216113e80d Fix compilation error introduced in my last patch for non-openbsd systems
git-svn-id: trunk@19468 -
2011-10-11 23:07:20 +00:00
pierre
6bf4bf8043 * Correct StatFS record to fix crash in test/units/dos/tdos.pp test
git-svn-id: trunk@19467 -
2011-10-11 22:38:54 +00:00
sergei
369725f2c4 * Get8087CW: Make sure that high bits of result are clear.
git-svn-id: trunk@19465 -
2011-10-11 10:34:52 +00:00
sergei
9df8be501a - Removed outdated FPC_HAS_RIP_RELATIVE defines, these seem to be the last ones in RTL.
git-svn-id: trunk@19464 -
2011-10-11 09:11:32 +00:00
sergei
4a3c7f7ef4 * Get8087CW: use fixed stack.
* Set8087CW: updated to i386 version, eliminates need of PIC code in assembler.
* GetSSECSR: updated similar to Get8087CW, it is somewhat shorter that way.

git-svn-id: trunk@19463 -
2011-10-11 09:08:09 +00:00
sergei
1404b7397a - Win64, EXE_Entry: removed messing with gs:[0], it won't work anyway.
- Also don't modify rsp in the middle of procedure, x86_64 targets use fixed stack.
- Cleaned outdated FPC_HAS_RIP_RELATIVE and VER2_2 defines.

git-svn-id: trunk@19460 -
2011-10-11 08:38:10 +00:00
pierre
fb6f01714a + cthreads added to units list
git-svn-id: trunk@19453 -
2011-10-10 22:20:39 +00:00
pierre
6e3c6319c2 * New file for cthreads unit support
git-svn-id: trunk@19452 -
2011-10-10 22:19:11 +00:00
pierre
473829f8bd i386 cpu specific units rules updated
git-svn-id: trunk@19449 -
2011-10-10 21:43:07 +00:00
pierre
ec6e21d15b Make __progname_storage external
git-svn-id: trunk@19448 -
2011-10-10 21:39:39 +00:00