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
pierre
ad40c306cd
* Use recent libc __errno function for OpenBSD
...
git-svn-id: trunk@19447 -
2011-10-10 21:33:58 +00:00
marco
929342aaf0
* added unit bsd (needed for kevent/lnet). OpenBSD seems to have it.
...
git-svn-id: trunk@19446 -
2011-10-10 20:35:00 +00:00
paul
908673e48b
rtl: don't convert strings on compare if one of them is empty
...
git-svn-id: trunk@19444 -
2011-10-10 06:43:53 +00:00
pierre
6bf90dfc7d
Fix linking problems for programs using C lib
...
git-svn-id: trunk@19443 -
2011-10-09 23:16:41 +00:00
sergei
6e23565edf
+ Initialize/finalize variants using dedicated helpers, produces both smaller (no RTTI loading necessary) and faster (direct path taken) code.
...
git-svn-id: trunk@19442 -
2011-10-09 20:34:58 +00:00
marco
199f7535b4
* fix pipe call for openbsd. fpmake now seems to work.
...
git-svn-id: trunk@19440 -
2011-10-09 19:34:21 +00:00
florian
ad5ad8ed4f
* outdated defines removed
...
git-svn-id: trunk@19438 -
2011-10-09 17:33:03 +00:00
florian
6800465021
+ fix compilation on wince
...
git-svn-id: trunk@19437 -
2011-10-09 17:32:29 +00:00
pierre
61eaa53fc9
Use old 3.5 version of getdirentries
...
git-svn-id: trunk@19423 -
2011-10-09 15:34:19 +00:00
marco
a80330de0b
* units dl and termio added that were implictely built.
...
git-svn-id: trunk@19421 -
2011-10-08 19:49:12 +00:00
paul
1c41680c58
rtl: don't perform string conversion if source string is in CP_NONE encoding (rawbytestring)
...
git-svn-id: trunk@19420 -
2011-10-08 17:56:43 +00:00
pierre
a6280de177
* Fix getdirentries problem for openbsd
...
git-svn-id: trunk@19418 -
2011-10-08 16:46:38 +00:00
pierre
03b4681c1b
* Rectify position of BirthTime fields in Stat record for openbsd
...
git-svn-id: trunk@19416 -
2011-10-08 13:01:05 +00:00
sergei
fa4b78363c
+ Handle safecall exceptions with a dedicated compilerproc, simplifies compiler part and reduces generated code size.
...
git-svn-id: trunk@19414 -
2011-10-08 12:40:03 +00:00
pierre
d1b2e2d439
Fix fpgetcwd for openbsd
...
git-svn-id: trunk@19410 -
2011-10-07 21:51:03 +00:00
pierre
902ba04ecd
* Fix stat type for openbsd
...
git-svn-id: trunk@19409 -
2011-10-07 21:28:08 +00:00
pierre
8d3c722eb5
* Remove unfound syscalls
...
git-svn-id: trunk@19408 -
2011-10-07 19:45:27 +00:00
pierre
8a0ddb11a0
* fix stupid mistake
...
git-svn-id: trunk@19407 -
2011-10-07 19:13:19 +00:00
pierre
248ef8786c
* Fix some syscall_nr with check_sys.sh script
...
git-svn-id: trunk@19405 -
2011-10-07 18:52:04 +00:00