Commit Graph

711 Commits

Author SHA1 Message Date
micha
83b7f81f81 + add no-fpu support to compiler/rtl for powerpc-linux (-Cfnone)
git-svn-id: trunk@10422 -
2008-03-02 12:59:02 +00:00
peter
f4f3ae84d0 * AllowDirectorySeparators and AllowDriveSeparators typed constants
added to allow customization of path and directory parsing in the rtl
  * Use the new sets instead of the hardcoded / and \

git-svn-id: trunk@10105 -
2008-01-29 23:04:56 +00:00
peter
95d0ce1270 * VendorName function added to allow an extra subdirectory
to group multiple products
  * OnGetVendorName hook, like OnGetApplicationName
  * use COMMON_APPPATH for global config files under windows

git-svn-id: trunk@10072 -
2008-01-27 21:40:55 +00:00
Jonas Maebe
8349cde7db * changed byte/word/longbool to be Delphi-compatible (+ similar changes
for qwordbool) + test:
    o assigning true to such a variable now sets them to $ff/$ffff/$ffffffff
    o these types are now all signed
    o converting an integer type to a byte/word/long/qwordbool using an
      explicit type cast keeps the integer's original value stored in the
      bool, instead of forcing it to ord(true)/ord(false)
    (mantis #10233 and #10613, implemented for all architectures, testsuite
     tested for ppc32, sparc and x86)
  * fixed some places where the rtl depended on longbool(true) having the
    value 1
  * extended several boolean tests (and adapted some to no longer assume
    that byte/word/long/qwordbool(true)=1)
  + support for converting to qwordbool in second_int_to_bool for x86, ppc
    and sparc

git-svn-id: trunk@9898 -
2008-01-24 21:30:55 +00:00
peter
73871b64ce * BeOS/Haiku updates from Olivier Coursière
git-svn-id: trunk@9880 -
2008-01-23 15:37:25 +00:00
Jonas Maebe
1d88e3eb11 * replace strpcopy with its own code because unix no longer
depends on the strings unit (patch from Peter)

git-svn-id: trunk@9851 -
2008-01-21 14:45:40 +00:00
peter
1aa548426b * remove uses strings
git-svn-id: trunk@9827 -
2008-01-20 21:27:01 +00:00
peter
37e509f290 * remove uses strings, strlen/strpas are in system unit
git-svn-id: trunk@9826 -
2008-01-20 21:07:08 +00:00
yury
c4e60fd1a5 - Removed systhrd.inc from targets where thread manager is stub by default. Stub is installed in common thread.inc file if DISABLE_NO_THREAD_MANAGER is not defined.
git-svn-id: trunk@9558 -
2007-12-28 15:21:02 +00:00
florian
213dd11800 * setlength in utf16/widestringtoutf32 fixed, resolves #10462
git-svn-id: trunk@9517 -
2007-12-22 18:43:29 +00:00
Jonas Maebe
2ffc310ebb * fixed AnsiStrLComp and AnsiStrLIComp: they also have to ignore
embedded #0's apparently + adapted test

git-svn-id: trunk@9471 -
2007-12-16 10:41:18 +00:00
Jonas Maebe
8536e35e44 * fixed indentation of LowerAnsiString/UpperAnsiString
git-svn-id: trunk@9444 -
2007-12-13 21:01:17 +00:00
Jonas Maebe
19985965e6 * fixed AnsiStrLower/AnsiStrUpper (were exchanged)
git-svn-id: trunk@9441 -
2007-12-13 20:49:52 +00:00
Jonas Maebe
60ccf03a0b * completed cwstring unit
* optimized LowerWideString/UpperWideString not to call UniqueString
    for each string character
  * fixed LowerAnsiString/UpperAnsiString in case an ascii character
    has a lower/uppercase version with a different length than 1
  + generic test for ansistring comparisons using on the widestring
    manager (based on glibc test)
  - removed ansi2ucs4-related stuff as it's not used/needed

git-svn-id: trunk@9440 -
2007-12-13 20:41:31 +00:00
Jonas Maebe
7ec9dc5bc9 * fixed unix CompareWideString to not treat null characters inside
a widestring as end-of-string + test (which fails on Darwin/FreeBSD
    in utf-8/utf-16 locales, because their libc's wcscoll is documented
    as only working in single-byte locales and falling back to wcscmp
    for others)

git-svn-id: trunk@9416 -
2007-12-08 16:00:09 +00:00
Jonas Maebe
8b8ee03c32 * fixed BeOS compilation (patch from Olivier Coursiere)
git-svn-id: trunk@9398 -
2007-12-06 08:08:17 +00:00
Jonas Maebe
02c714aec1 * characters <= 127, not just < 127, can be concatenated to an
ansistring without conversion

git-svn-id: trunk@9395 -
2007-12-05 18:48:54 +00:00
Jonas Maebe
a180fdcc74 - removed commented out implementation of Upper/LowerWideString which
takes into account surrogate pairs (not needed, since upper/lower
    case characters never need surrogate pairs)

git-svn-id: trunk@9394 -
2007-12-05 17:44:34 +00:00
Jonas Maebe
68595c8b72 * fixed wchar_t type (was: widechar, now is cint/cint32/long depending on
platform)
  + mbstate_t type for all unixes except BeOS (doesn't exist for BeOS)
  + implemented UpperAnsiStringProc/LowerAnsiStringProc for unix
  * fixed Ansi2UCS4Move in cwstring (although it isn't used anywhere
    currently)
  + test for Upper/LowerAnsiString

git-svn-id: trunk@9393 -
2007-12-05 17:42:35 +00:00
Jonas Maebe
34d0fd2c30 * give generic IntbasiceventWaitFor a granularity of 50 rather than
500 miliseconds

git-svn-id: trunk@9222 -
2007-11-12 22:06:39 +00:00
Jonas Maebe
4d254e4de8 * import iconv routines as iconv_* rather than libiconv_* for darwin
as the 32 bit libraries export both variants, but the new 64 bit
    ones on Mac OS X 10.5 only export iconv_*

git-svn-id: trunk@9184 -
2007-11-10 21:12:45 +00:00
Jonas Maebe
f60c72b773 * fixed ioctl for non-linux: the third parameter is "..." there rather
than a pointer. The interface still accepts a plain pointer for
    backwards compatibility.

git-svn-id: trunk@9176 -
2007-11-10 18:22:37 +00:00
florian
7f4c387841 o new BeOS patch by Olivier Coursiere:
* correctly define the stack size for BeOS,
  + implement a minimum nl_langinfo function to correctly initialize WideString support
  + add fgl unit in the BeOS RTL makefile
  * SysOSAlloc now return nil when the system can not allocate the asked memory,
  * HAS_SYSOSFREE is no more defined with an empty implementation under BeOS. This was preventing FPC to reuse memory.
  + there is now a basic implementation of CheckPointer under BeOS.

git-svn-id: trunk@8994 -
2007-10-29 19:00:32 +00:00
Jonas Maebe
2701a0f743 * initialise timespec.tv_sec again for generic BasicEventWaitFor
git-svn-id: trunk@8836 -
2007-10-17 21:14:01 +00:00
micha
5f3e2b10e8 * use sem_timedwait for BasicEventWaitFor if available (linux now)
git-svn-id: trunk@8835 -
2007-10-17 20:49:25 +00:00
micha
5d1a952f2a * fix initial state of basicevent
git-svn-id: trunk@8781 -
2007-10-13 20:25:46 +00:00
Almindor
fdcc5f4332 * use TIOCtlRequest instead of hard ifdefs to remove warnings
git-svn-id: trunk@8679 -
2007-09-29 14:22:41 +00:00
Almindor
5474e0c987 * fix ioCtl differences between BSD and POSIX
git-svn-id: trunk@8676 -
2007-09-29 08:24:23 +00:00
marco
827d380691 * pchar(pointer()) isms that were safe.
git-svn-id: trunk@8672 -
2007-09-28 21:57:45 +00:00
Jonas Maebe
4e78a30ee3 * only print exception backtrace at end of unhandled exception in
tthread in case rtl is compiled with -dDEBUG_MT

git-svn-id: trunk@8595 -
2007-09-21 15:09:08 +00:00
Tomas Hajny
3b3849c02c + AllFilesMask constant added
git-svn-id: trunk@8492 -
2007-09-15 12:09:25 +00:00
Almindor
d2e4f53a13 * hopefuly fix the fp* problems for stat and others
git-svn-id: trunk@8405 -
2007-09-08 13:51:39 +00:00
Almindor
148255b5cf * fix deprecated stat calls to use the fp<> ones and not the other way around
git-svn-id: trunk@8401 -
2007-09-08 09:55:35 +00:00
florian
bcd5fc555a * rtl part of Olivier Coursier's BeOS patch
git-svn-id: trunk@8396 -
2007-09-07 19:25:05 +00:00
peter
65afe53eb0 * fix settimeofday timeval parameter
git-svn-id: trunk@8315 -
2007-08-28 09:29:25 +00:00
Almindor
7a21cb5888 * add preliminary UnixSockets with linux implementation
git-svn-id: trunk@8290 -
2007-08-19 13:35:43 +00:00
Jonas Maebe
815cd2b39d + support for widestring manager based widechar conversions
(widechar<->char, widechar<>*string), based on patch from
    Rimgaudas Laucius (mantis #7758)
  * no longer perform compile-time widechar/string->char/ansi/
    shortstring conversions if they would destroy information
    (they can't cope with widechars with ord>=128). This means
    that you can now properly constant widechars/widestrings
    in source code with a {$codepage } set without risking that
    the compiler will mangle everything afterwards
  * support ESysEINVAL return code from iconv (happens if last
    multibyte char is incomplete)
  * fixed writing of widechars (were converted to char -> lost
    information)

git-svn-id: trunk@8274 -
2007-08-12 20:01:08 +00:00
Jonas Maebe
123362235b * use initc.fpgetCerrno rather than fpgeterrno to get the errno
results of the sem_* routines (since those always come from libc/
    libpthread)

git-svn-id: trunk@8266 -
2007-08-12 08:29:48 +00:00
Jonas Maebe
4457538435 * explicitly unmask SIGSEGV, SIGILL, SIGBUS and SIGFPE at the start
of a new thread (should fix #9073)

git-svn-id: trunk@8265 -
2007-08-11 20:59:37 +00:00
Jonas Maebe
ce86cedd4d * return wrAbandoned rather than wrError from IntbasiceventWaitFor
in case a sleep is interrupted while the event is being destroyed

git-svn-id: trunk@8260 -
2007-08-11 08:13:36 +00:00
Jonas Maebe
ef801ba3a3 * check once more whether we can lock after we've waited
for the entire timeout in IntbasiceventWaitFor

git-svn-id: trunk@8259 -
2007-08-11 08:07:44 +00:00
Jonas Maebe
494fb81dd8 * fixed semaphore implementation based on file handles (select needs
file descriptor + 1 as first parameter, select can also be EIntr)
  * changed IntbasiceventWaitFor (used by syncobjs) so it can emulate
    timeouts (using a loop and short sleeps) (mantis #9414)
  * also added wrAbandoned support to IntbasiceventWaitFor
  * enhanced tbrtlevt.pp to test new functionality

git-svn-id: trunk@8257 -
2007-08-10 20:20:44 +00:00
Jonas Maebe
fd98a0cc5b * don't call runerror if a unix threading error occurs (because this
immediately terminates the whole application), but instead call
    handleerrorframe (which can be converted into an exception) (#7954)

git-svn-id: trunk@8248 -
2007-08-08 13:59:17 +00:00
Jonas Maebe
f3a00b0731 * cache result of GetThreadManager in InitThreads
git-svn-id: trunk@8245 -
2007-08-08 11:33:54 +00:00
Károly Balogh
bee56abb78 - dec(comment_typos,2);
git-svn-id: trunk@8130 -
2007-07-22 10:22:26 +00:00
daniel
354cd09f31 * long double=double on powerpc-linux
* educated guess this is the case on arm-linux as well
  * temporary change: do not alias clongdouble from unixtype into ctypes to prevent
    having to work in two places.

git-svn-id: trunk@8127 -
2007-07-22 10:04:48 +00:00
micha
dd350255a4 * print thread handle unsigned in unix thread debug info
git-svn-id: trunk@8094 -
2007-07-18 20:14:48 +00:00
micha
721ae51cd0 * dump stack when thread terminates because of exception (unix)
git-svn-id: trunk@8093 -
2007-07-18 20:13:39 +00:00
Almindor
5baca0cfd3 * fix IPC for FPC_USE_LIBS
* fix shmget to use size_t as per manpage
* directly use external, don't depend on ipccdecl.inc (may be removed if confirmed)

git-svn-id: trunk@7973 -
2007-07-07 09:13:23 +00:00
daniel
0c3a2a257d * Convert heap to ptruint.
git-svn-id: trunk@7950 -
2007-07-04 19:46:47 +00:00