Commit Graph

905 Commits

Author SHA1 Message Date
Jonas Maebe
194855eee0 * de-tabbed
git-svn-id: trunk@15419 -
2010-06-13 11:44:33 +00:00
Jonas Maebe
45c813929a * update the coordinates properly if a string is written that exactly fills
a line (mantis #15599)

git-svn-id: trunk@15241 -
2010-05-08 11:29:25 +00:00
marco
02069109d1 * haiku also sinlen, Mantis 16176
git-svn-id: trunk@15104 -
2010-04-01 11:38:55 +00:00
marco
8cce3d3f91 * closethread thread manager field/function. Mantis 13160
git-svn-id: trunk@15072 -
2010-03-26 23:31:52 +00:00
Jonas Maebe
4d8f578e4c * when typecasting the result of pthread_self, always call it using
pthread_self(), because it's a procvar under Linux and hence otherwise
    the value of the procvar instead of the function result will be
    taken (mantis #15821)

git-svn-id: trunk@15049 -
2010-03-24 21:51:07 +00:00
marco
c477df5046 * TCriticalSection.Tryenter support (Mantis 15928) + short test/demo
tested on FreeBSD (general Unix) and Windows. Note that Haiku seems 
    to have a native threadmgr rather than the Unix one. Will notify 
    maintainer (Olivier)

git-svn-id: trunk@15026 -
2010-03-21 11:34:05 +00:00
Jonas Maebe
3ea3a41d2a o patch from Olivier for Haiku libiconv functionality (mantis #15906):
* Haiku's nl_langinfo implementation is now used under Haiku instead of
      the BeOS stub.
    * Fix linking to iconv in the iconvenc package. The prefix has change
      since the previous Haiku's version.

git-svn-id: trunk@14995 -
2010-03-09 09:58:14 +00:00
Jonas Maebe
9cd0a2ff1e * link to libpthread at compile time on Linux to avoid problems on some
newer glibc systems when it's only loaded dynamically at run time

git-svn-id: trunk@14970 -
2010-03-04 15:36:35 +00:00
marco
be98b13554 * fix for 11263, changed fileread and fd_zero to out using $modeswitch.
git-svn-id: trunk@14965 -
2010-03-01 22:35:14 +00:00
Tomas Hajny
5c31042f6a * SharedSuffix moved to include files to reduce number of ifdefs
git-svn-id: trunk@14902 -
2010-02-13 15:44:12 +00:00
pierre
048b2ba67b * fix pthread problem wen using nice for solaris
git-svn-id: trunk@14823 -
2010-01-28 19:05:42 +00:00
pierre
df33542ca9 + Timezone support for solaris
git-svn-id: trunk@14821 -
2010-01-28 11:03:32 +00:00
marco
b8d5a8f44c * Linux specific time_t fixes. Also tested with -dFPC_USE_LIBC and more problem fixed.
git-svn-id: trunk@14586 -
2010-01-09 22:02:36 +00:00
marco
5d87461507 * moves the alias "TTime = time_t" from ptypes.inc to unixtype.pp.
This means it is not aliased in the body of the system unit (which causes
  trouble with the delphi type of the same name), but baseunix/unix/unixtype
  will containue to export the type.

git-svn-id: trunk@14584 -
2010-01-09 16:05:42 +00:00
marco
8e9a7e14ad * Revised yesterday solution to a more general one. Executeprocess gets
another parameter, a set type with flags, default = []

git-svn-id: trunk@14572 -
2010-01-07 20:49:28 +00:00
Jonas Maebe
b214448b9e * don't access the thread instance after calling DoTerminate to avoid
race conditions in case DoTerminate can cause the thread to be freed
    already. Side-effect: changing FreeOnTerminate in DoTerminate no longer
    has any effects, but this is compatible with the generic code for
    ThreadProc in objpas/classes/classes.inc (patch by Nikolai ZHUBR)

git-svn-id: trunk@14504 -
2009-12-30 14:46:56 +00:00
florian
a3884c4e49 * fixes bootstrapping with 2.2.x
git-svn-id: trunk@14355 -
2009-12-07 20:16:31 +00:00
pierre
90ddd046bc * Use default functions if call to iconv_open failed
git-svn-id: trunk@14352 -
2009-12-07 16:57:12 +00:00
Jonas Maebe
722d48c8c2 * only return an error if locking a file fails when the file is already
locked, but not when another error occurs (such as EsysNOLCK, because
    this error may always be returned if the kernel doesn't support
    locking, in which case programs such as fpcmake no longer work on
    such systems)

git-svn-id: trunk@14350 -
2009-12-07 13:30:19 +00:00
michael
01ed4a6745 * Implemented OnBeep to install custom beep handler
git-svn-id: trunk@14254 -
2009-11-22 17:33:56 +00:00
marco
17062d667c * ansistring versions of mk/rm/chdir in objpas, Mantis 15010. The os-dependant routines of *nix/os2/win/dos have been converted
git-svn-id: trunk@14211 -
2009-11-18 18:04:51 +00:00
Jonas Maebe
c2190ebd30 * return errors from unimplemented functions instead of random values
git-svn-id: trunk@14002 -
2009-11-01 15:41:29 +00:00
marco
778505701c * set/getrlimit now also visible in baseunix when syscalls are used.
on systems that force ugetrlimit, use that transparently. (since 
    ugetrlimit is not posix in theory or practice, we can't export it),
    resolves 13916

git-svn-id: trunk@13903 -
2009-10-17 19:14:09 +00:00
marco
5121f470a2 * moved ugetrlimit to the implementation (as linux specific call it shouldn't be exported)
* syscall implementation for FreeBSD of get/setrlimit

git-svn-id: trunk@13875 -
2009-10-16 18:47:43 +00:00
olivier
2e8a93da16 * tune new variable TerminalSupportsBold and TerminalSupportsHighIntensityColors
for BeOS and Haiku.
  * BeOS : the terminal is very limited. Disabling both give best result.
  * Haiku : Haiku's terminal claims to be xterm but has it's own problems.

git-svn-id: trunk@13741 -
2009-09-19 16:10:36 +00:00
florian
07ef0c33df o another linux console patch by Nikolay Nikolov:
* disabled linux VCSA output in UTF-8 mode, because it does not do any translation 
  and assumes that the font is cp437, or similar, which looks horrible on fonts 
  (like fedora's default latarcyrheb-sun16), which are designed only for unicode 
  support and have no similarity at all to cp437. We already can display all the 
  cp437 characters in UTF-8 mode (including the low 32 characters), in case the 
  font is cp437, and the UTF-8 translation provides better approximation (e.g. 
  for the line drawing characters) if the font is not cp437.
* do not "restore" the linux system font in SysDoneVideo in UTF-8 mode, 
  since we didn't change the font on startup
* added try_grab_vcsa to try harder to open VCSA in the linux IDE user 
  screen restore code. While VCSA is no longer needed in the video unit on 
  UTF-8 systems, the IDE still needs it, because it's the only way to provide 
  the "restore user screen" functionality on the linux virtual console.

git-svn-id: trunk@13726 -
2009-09-16 19:58:42 +00:00
Jonas Maebe
1f6b55290e * fixed fpsignal for linux/x86_64 and possibly some other platforms as well
(patch by Nikolay Nikolov, mantis #14514)

git-svn-id: trunk@13666 -
2009-09-06 20:03:09 +00:00
florian
a023c165da o patch by Nikolay Nikolov to make the text mode IDE look pretty under
modern Linuxes by a patch for UTF-8 console output. 
  Previously, only BeOS used UTF-8. Tested with:
   - the linux console
   - xterm
   - gnome-terminal
   - konsole
   - rxvt-unicode
  using Fedora 11.
  Tested with
   - gnome-terminal
   - xterm
   - konsole
  using Ubuntu 9.04
Known "features": 
  * high intensity colours were actually normal intensity, with a bold attribute set. 
    This worked fine under gnome-terminal, but xterm didn't have bold versions of all cp437 characters, 
    which screwed up the window borders in the IDE. And although konsole had them, I didn't like the font - 
    it converted all the double window borders to a very thick single-line border. 
    So I disabled the bolding of high intensity colours in all X11 terminals (TERM=xterm) 
    and replaced it with another ANSI attribute, that actually sets high intensity 
    colours, but is not (in theory) supported by all terminals. The linux console doesn't 
    support it - it actually wants a bold attribute, to set high intensity, 
    so that's why I enabled it only for X11 terminals. All the ones, 
    that I tried, worked fine (xterm, gnome-terminal, 
    konsole, rxvt-unicode, also the plain old rxvt, with a non-UTF-8 locale).
  * Fedora 11 by default uses a 512-characters font, called latarcyrheb-sun16 
    for the linux text mode console, which disables the high intensity colours, 
    effectively reducing the set of available colours to only 8. 
    This is a hardware limitation of the VGA hardware and can be avoided by 
    using a 256-character font. It does not need to be cp437, 
    but it has to have an unicode mapping.
  * I haven't tried other linux distros (and unix-like OSes, i.e. FreeBSD and Mac OS X) - 
    although they should work in theory, they might look bad, due to different fonts, etc. 

git-svn-id: trunk@13651 -
2009-09-05 14:54:22 +00:00
olivier
7616e9e50e * Harmonize kbAltUp, kbAltDown and kbAltRight declarations for xterm
terminals with kbAltLeft. Only applied to Haiku to stay on the safe side. 
  Fix use of up, down and right arrow keys in fpide under Haiku 
  (mantis #14491) 

git-svn-id: trunk@13644 -
2009-09-04 21:29:25 +00:00
michael
e8a375c774 * Patch from Henry Vermaak to fix EABI kernel API for arm.
git-svn-id: trunk@13563 -
2009-08-20 08:00:50 +00:00
Jonas Maebe
ef1c033f49 + added fppause() for FPC_USE_LIBC
* fixed test

git-svn-id: trunk@13436 -
2009-07-24 21:52:01 +00:00
marco
7c52be9287 * moved a linux specific call to the implementation of system, where
it is used. General Unix units should not expose Linux-specific 
   functionality.

git-svn-id: trunk@13427 -
2009-07-23 11:35:18 +00:00
Jonas Maebe
deb052c3f5 * skip glibc-specific modifiers while parsing the locale info
(patch by Petr-K, fixes mantis #12148)

git-svn-id: trunk@13396 -
2009-07-16 16:51:10 +00:00
Jonas Maebe
4e446c6184 * use ShortTimeFormat also for LongTimeFormat if T_FMT_AMPM is not defined
for the current locale (Kylix-compatible, thanks to Luca Olivetti for
    the hint, fixes mantis #13947)

git-svn-id: trunk@13395 -
2009-07-16 16:44:15 +00:00
Jonas Maebe
25463000ac * do not mark all found files with Find* as "faHidden" if the search path
starts with './' (mantis #14020)
  * also mark files whose name starts with '.' that are found in subdirectories
    as faHidden (not reported, but was due to a similar error)
  - removed some unused variables related to the Find* functionality

git-svn-id: trunk@13307 -
2009-06-21 10:21:06 +00:00
marco
a862d93652 * unix sockets now also exports tsocklen, like windows one
git-svn-id: trunk@13276 -
2009-06-15 08:17:05 +00:00
michael
9538da64f9 * Change so that when FindFirst initially returns nonzero, FindClose is no longer needed (Windows compatible)
git-svn-id: trunk@13209 -
2009-05-29 07:24:02 +00:00
Jonas Maebe
78c29a33ba * changed the parameters of gotoxy() and the return values of wherex/wherey
from byte into tcrtcoord=1..255, since all crt unit coordinates are
    1-based (not for Window() procedure, see comments in crth.inc;
    mantis #13788)

git-svn-id: trunk@13191 -
2009-05-24 11:48:49 +00:00
Jonas Maebe
f6d452c2c0 * remove the RTL's installed signal handlers at the end of the system
unit's initialization code in case we're in a library
  + implemented InquireSignal(), AbandonSignalHandler(), HookSignal() and
    UnhookSignal() in the sysutils unit
  * for Kylix compatibility, these routines support operating on
    SIGINT and SIGQUIT as well, although they are not hooked by default
    by FPC. The run time errors/exception codes for these signals are
    resp. 217 and 233 (same as in Kylix; I changed ENoWideStringSupport
    to 234).
  * changed the BSD syscall version of fpsigaction to use pointer
    rather than "var" arguments (compatible with other targets, and
    required to be able to pass nil arguments inside the system unit)
  -> together fixes mantis #12704

git-svn-id: trunk@13077 -
2009-05-02 09:40:44 +00:00
Jonas Maebe
99a02a93ca * also consider the search attributes for findfirst if the name does
not contain wildcards + test
  * don't return true from FindGetFileInfo if the file name is ok, but the
    search attributes don't match (resulted in returning multiple times the
    name of the previous entry that did fulfill all requirements)

git-svn-id: trunk@13074 -
2009-05-01 16:03:56 +00:00
Jonas Maebe
afab9fb99c * force utf-8 on iPhoneOS, because locale settings are absent/ignored there
git-svn-id: trunk@13066 -
2009-05-01 09:19:53 +00:00
Jonas Maebe
4771ca3ce1 * import iconv functions as libiconv_* instead of as iconv_* for ppc32
for Mac OS X 10.3 compatibility

git-svn-id: trunk@13035 -
2009-04-25 09:34:11 +00:00
Jonas Maebe
1ad1eac9e8 * use monetary thousands separator if numerical thousands separator is #0
(mantis #13552, patch by Jesus Reyes)

git-svn-id: trunk@13029 -
2009-04-23 19:17:37 +00:00
Jonas Maebe
039847b5c0 - removed duplicate GenMouseEvent() procedure (patch by Danny Milosavljevic,
mantis #13412)

git-svn-id: trunk@12993 -
2009-04-01 17:12:55 +00:00
Jonas Maebe
c66791a605 * made AddSpecialSequence() public with the "platform" keyword, as
suggested by Marco in his comment to mantis #13413

git-svn-id: trunk@12992 -
2009-04-01 17:05:33 +00:00
Jonas Maebe
fe773871d6 * EINTR handling...
git-svn-id: trunk@12930 -
2009-03-20 13:03:14 +00:00
Jonas Maebe
803e78ff8c * and more ESysEINTR and fpwaitpid fixing
git-svn-id: trunk@12929 -
2009-03-19 22:51:41 +00:00
Jonas Maebe
8b53f8c41a * fixed a bunch of cases where ESysEINTR wasn't handled
git-svn-id: trunk@12924 -
2009-03-19 21:46:12 +00:00
Jonas Maebe
b92df02778 * new Intbasicevent*() implementation based on pthread_cond_signal by
Fabio Luis Girardi (mantis #9895)

git-svn-id: trunk@12857 -
2009-03-04 20:15:27 +00:00
Jonas Maebe
fba565d666 * use statvfs/fstatvfs on solaris instead of statfs/fstatfs, because the
latter are deprecated
  * replaced (wrong) statfs record definition with the definition of statvfs

git-svn-id: trunk@12815 -
2009-02-28 10:18:36 +00:00
Jonas Maebe
f7003119d0 * fixed AddDisk() in sysutils and dos units, and fixed memory leaks
related to this functionality, based on analysis/patch by Michael
    Kamburelis (mantis #9985)

git-svn-id: trunk@12814 -
2009-02-27 22:02:24 +00:00
Jonas Maebe
9e7efd7321 * reduced waiting steps in emulated "timed wait" in basiceventwaitfor
further from 50ms to 20ms (mantis #9895)

git-svn-id: trunk@12813 -
2009-02-27 21:36:55 +00:00
florian
475cd9926d * couple of small haiku fixes by Olivier Coursiere
git-svn-id: trunk@12739 -
2009-02-14 10:36:12 +00:00
Jonas Maebe
6f12cb03db * if no locking is specified, also request an exclusive lock for solaris
in case the file is opened as read/write (instead of only if opened as
    write-only)

git-svn-id: trunk@12685 -
2009-02-04 11:41:18 +00:00
Jonas Maebe
78f6e5ff6e * fixed fmShareDenyNone for Solaris
git-svn-id: trunk@12684 -
2009-02-04 10:13:46 +00:00
Jonas Maebe
6581c8dec5 * hopefully final fix to unix locking: specifying no locking mode again
means "exclusive lock" where supported (not on Solaris when opening
    a file in read-only mode)

git-svn-id: trunk@12675 -
2009-02-03 13:34:56 +00:00
marco
6ab2cae3cc * deprecated (for 2.4) some functions that take a shortstring path.
(problems with long filenames)

git-svn-id: trunk@12653 -
2009-02-02 10:06:03 +00:00
florian
c127154efa o Haiku patches by Olivier Coursiere
+ add posix thread support
  * improve signal handling
  * synchronize haiku's baseunix unit with the unix one (maybe it will be possible to remove Haiku's one in a future patch, but i keep it for now)
  + add support for standard sockets
  * fix some functions import to use the right libraries under Haiku
  * fix packages compilation

git-svn-id: trunk@12636 -
2009-02-01 10:30:55 +00:00
Jonas Maebe
f9556bad39 * fixed ESysEIntr checking for fpflock
git-svn-id: trunk@12635 -
2009-01-31 21:12:17 +00:00
Jonas Maebe
4a829da2fc * fixed fileopen when not specifying any sharing (should not perform any
locking at all) (= fmShareCompat, as that one is 0)
  * fixed test for this change (and for fmShareDenyNone)

git-svn-id: trunk@12634 -
2009-01-31 18:46:11 +00:00
Jonas Maebe
9fabb0b127 * fixed file locking of files opened as read- or write-only on solaris
(locking is based on fcntl there, and that one cannot create an
     exclusive lock for a read-only file or a shared lock for a write-only
     file)

git-svn-id: trunk@12633 -
2009-01-31 18:11:58 +00:00
Jonas Maebe
57ff980bc3 * hopefully fixed beos compilation after r12630 (it doesn't have flock)
git-svn-id: trunk@12631 -
2009-01-30 16:09:08 +00:00
Jonas Maebe
a730ee7f10 + support for file locking for *nix systems based on flock (mantis #13012)
git-svn-id: trunk@12630 -
2009-01-30 15:08:30 +00:00
Jonas Maebe
9b67b6469b * fixed FpFcntl() for libc-based systems
* fixed FpIoctl() for Linux/libc (it also uses varargs)

git-svn-id: trunk@12628 -
2009-01-29 15:38:17 +00:00
ivost
38bf32dddf * added csize_t and pcsize_t for non unix systems (in unix/ctypes.pp)
* added csize_t = UnixTypes.size_t in ctypes.pp for unix systems.
* reason: size_t is a C type and it's often used by C header files. Several packages define their own size_t. 

git-svn-id: trunk@12602 -
2009-01-26 12:58:20 +00:00
Jonas Maebe
ee05e0e740 * keep reading in getxy until the entire xterm response has been read
(mantis #8842)

git-svn-id: trunk@12593 -
2009-01-25 14:08:27 +00:00
Jonas Maebe
1a1fc1357d * honour the specified stack size when creating new threads on unix
platforms + test (mantis #12942)

git-svn-id: trunk@12527 -
2009-01-08 18:37:24 +00:00
marco
b8194205af * two more culong(1) shl fixes.
git-svn-id: trunk@12419 -
2008-12-23 14:00:59 +00:00
marco
a88ebff6dd * fix for 64-bit signed<->unsigned issue, bug #12841
git-svn-id: trunk@12418 -
2008-12-23 13:57:25 +00:00
marco
52bb5ac229 * removed some old 1.0.x ->2.0.x transitional code (executeprocess)
git-svn-id: trunk@12238 -
2008-11-26 23:08:17 +00:00
florian
d78855cea8 + more c types
git-svn-id: trunk@12175 -
2008-11-19 11:36:43 +00:00
micha
4594758ae5 + add poll support for unix
git-svn-id: trunk@12128 -
2008-11-16 17:05:47 +00:00
Jonas Maebe
13d92bfa04 + fpmkfifo for libc
git-svn-id: trunk@11903 -
2008-10-16 11:12:37 +00:00
florian
b178b08ba7 Merged revisions 11665-11738 via svnmerge from
http://svn.freepascal.org/svn/fpc/branches/unicodestring

........
  r11665 | florian | 2008-08-30 13:30:17 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * continued to work on unicodestring type support
........
  r11666 | florian | 2008-08-30 19:02:26 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now
........
  r11667 | florian | 2008-08-30 20:42:37 +0200 (Sat, 30 Aug 2008) | 1 line
  
  * more unicodestring stuff fixed, test results on win32 are already good
........
  r11670 | florian | 2008-08-30 23:21:48 +0200 (Sat, 30 Aug 2008) | 2 lines
  
  * first fixes for unix bootstrapping
........
  r11683 | ivost | 2008-09-01 12:46:39 +0200 (Mon, 01 Sep 2008) | 2 lines
  
      * fixed 64bit bug in iconvenc.pas
........
  r11689 | florian | 2008-09-01 23:12:34 +0200 (Mon, 01 Sep 2008) | 1 line
  
  * fixed several errors when building on unix
........
  r11694 | florian | 2008-09-03 20:32:43 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * fixed unix compilation
........
  r11695 | florian | 2008-09-03 21:01:04 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * bootstrapping fix
........
  r11696 | florian | 2008-09-03 21:07:18 +0200 (Wed, 03 Sep 2008) | 1 line
  
  * more bootstrapping fixed
........
  r11698 | florian | 2008-09-03 22:47:54 +0200 (Wed, 03 Sep 2008) | 1 line
  
  + two missing compiler procs exported
........
  r11701 | florian | 2008-09-04 16:42:34 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + lazarus project for the linux rtl
........
  r11702 | florian | 2008-09-04 16:43:27 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  + set unicode string procedures
........
  r11707 | florian | 2008-09-04 23:23:02 +0200 (Thu, 04 Sep 2008) | 2 lines
  
  * fixed several type casting stuff
........
  r11712 | florian | 2008-09-05 22:46:03 +0200 (Fri, 05 Sep 2008) | 1 line
  
  * fixed unicodestring compilation on windows after recent unix changes
........
  r11713 | florian | 2008-09-05 23:35:12 +0200 (Fri, 05 Sep 2008) | 1 line
  
  + UnicodeString support for Variants
........
  r11715 | florian | 2008-09-06 20:59:54 +0200 (Sat, 06 Sep 2008) | 1 line
  
  * patch by Martin Schreiber for UnicodeString streaming
........
  r11716 | florian | 2008-09-06 22:22:55 +0200 (Sat, 06 Sep 2008) | 2 lines
  
  * fixed test
........
  r11717 | florian | 2008-09-07 10:25:51 +0200 (Sun, 07 Sep 2008) | 1 line
  
  * fixed typo when converting tunicodestring to punicodechar
........
  r11718 | florian | 2008-09-07 11:29:52 +0200 (Sun, 07 Sep 2008) | 3 lines
  
  * fixed writing of UnicodeString properties
  * moved some helper routines to unicode headers
........
  r11734 | florian | 2008-09-09 22:38:55 +0200 (Tue, 09 Sep 2008) | 1 line
  
  * fixed bootstrapping
........
  r11735 | florian | 2008-09-10 11:25:28 +0200 (Wed, 10 Sep 2008) | 2 lines
  
  * first fixes for persisten unicodestrings
........
  r11736 | florian | 2008-09-10 14:31:00 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  Initialized merge tracking via "svnmerge" with revisions "1-11663" from 
  http://svn.freepascal.org/svn/fpc/trunk
........
  r11737 | florian | 2008-09-10 21:06:57 +0200 (Wed, 10 Sep 2008) | 3 lines
  
  * fixed unicodestring <-> variant handling
  * fixed unicodestring property reading
........

git-svn-id: trunk@11739 -
2008-09-10 20:14:31 +00:00
Jonas Maebe
4f5513466a * reverted r11671 because it breaks tthread.waitfor on unix
git-svn-id: trunk@11731 -
2008-09-08 21:10:38 +00:00
Jonas Maebe
7aee2f3d71 * moved fplstat(ansistring,pstat) overload to bunxovl(h).inc, so all
platforms have (fixes compilation for FPC_USE_LIBC platforms after
    r11681)

git-svn-id: trunk@11693 -
2008-09-02 10:14:45 +00:00
michael
7a058a9bf2 * Added overloaded call for fplstat which has var argument (as for stat)
* Implemented support for faSymlink, as per 9915

git-svn-id: trunk@11681 -
2008-09-01 09:17:58 +00:00
michael
c179162028 * Call EndThread manually if thread function returns (mantis #11490)
git-svn-id: trunk@11671 -
2008-08-30 21:48:39 +00:00
Jonas Maebe
bbaacc593a + darwin implementation of ipc unit by Werner Bochtler (mantis #10612)
git-svn-id: trunk@11549 -
2008-08-11 21:29:49 +00:00
Jonas Maebe
0c002889b0 + fpchown() for FPC_USE_LIBC (by Tobias Giesen, mantis #11705)
git-svn-id: trunk@11432 -
2008-07-21 19:37:24 +00:00
joost
acff7f60bd * Add path-delimiters properly in GetAppConfigDir and GetAppConfigFile
git-svn-id: trunk@11384 -
2008-07-15 13:12:42 +00:00
florian
5ff2312993 * fixed x86 unit for x86-64
* enabled ports again for x86_64-linux

git-svn-id: trunk@11360 -
2008-07-10 19:52:14 +00:00
marco
f9c179da18 * add psize_t
git-svn-id: trunk@11296 -
2008-06-28 18:16:44 +00:00
Almindor
6433f8c38b * fix DiskFree and DiskSize to check for Drive argument
git-svn-id: trunk@11226 -
2008-06-14 11:19:51 +00:00
florian
494e237b1e * Haiku patch by Olivier Coursiere
- a little more native rtl: it use a native haiku library for select function instead of relying on a compatibility symlink
  - haiku in the list of target that support the ide
  - some more fix in some packages

git-svn-id: trunk@11135 -
2008-05-31 11:33:02 +00:00
michael
26575472b6 * Added GetUSerDir function (ID 11338)
git-svn-id: trunk@11074 -
2008-05-24 11:50:26 +00:00
michael
6378cc25eb * Fixed 8076
git-svn-id: trunk@11040 -
2008-05-22 18:12:10 +00:00
florian
3d17adaeeb * patch for 10812 by Danny Milosavljevic
git-svn-id: trunk@11018 -
2008-05-19 20:02:23 +00:00
florian
35c0f78642 + Haiku support by Olivier Coursière based on old BeOS support
git-svn-id: trunk@11014 -
2008-05-19 17:33:35 +00:00
florian
d955c9b4f7 + proper handling of lineinfo retrival for dyn. libs in unix
git-svn-id: trunk@11010 -
2008-05-18 18:42:09 +00:00
marco
619ccffac0 * fix currency copy with extra safety on *BSD, fixed ampm
git-svn-id: trunk@10804 -
2008-04-26 15:15:16 +00:00
marco
a37bb0dd6e * some debug stuff under ifdef + one fix for *BSD currency
git-svn-id: trunk@10801 -
2008-04-26 11:30:11 +00:00
marco
36b557b142 * quick test successful -> commit
git-svn-id: trunk@10626 -
2008-04-11 15:00:26 +00:00
michael
fce221f9b4 * Added clocale.pp from Petr Kristan
git-svn-id: trunk@10620 -
2008-04-09 08:32:26 +00:00
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
Jonas Maebe
0d8594a705 * made cwstring thread safe without locks + test (twide4): widestring
manager now has two extra parameterless procedures (ThreadInitProc
    and ThreadFiniProc) which are called whenever a thread begins/ends,
    and cwstring uses these to create separate iconv handles for
    each thread (via threadvars)
  * renamed UCS4 to UCS-4BE/LE, because UCS4 is not recognised by most
    systems
  * clean up all iconv handles on exit, and check whether they are
    valid before doing so

git-svn-id: trunk@7949 -
2007-07-04 18:10:34 +00:00
daniel
f77150fa71 * Fix another bug found by new hint.
git-svn-id: trunk@7819 -
2007-06-26 08:24:09 +00:00
marco
58e3f8ad0d * more deprecated fixes
git-svn-id: trunk@7718 -
2007-06-17 20:31:08 +00:00
marco
0ef2cb0b02 * fixed deprecated
git-svn-id: trunk@7717 -
2007-06-17 20:29:33 +00:00
Jonas Maebe
7b47ebff6b * removed Darwin/Solaris-specific code and fixed all issues by calling
setlocale(LC_ALL,'') per POSIX, which initialises the langinfo stuff
    based on the environment variables (some OS'es do that automatically,
    but at least Darwin and Solaris don't)

git-svn-id: trunk@7672 -
2007-06-15 18:51:06 +00:00
micha
3e97c6b324 * fix cwstring compilation: remove extra "}"
git-svn-id: trunk@7661 -
2007-06-14 14:45:19 +00:00