Commit Graph

905 Commits

Author SHA1 Message Date
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
Jonas Maebe
6111e3e2b9 * also force utf-8 on Solaris, nl_langinfo(CODESET) doesn't work there
either and utf-8 is also its default "international" encoding

git-svn-id: trunk@7660 -
2007-06-14 10:56:29 +00:00
Jonas Maebe
8523bdc831 * force utf-8 for darwin
git-svn-id: trunk@7644 -
2007-06-13 12:59:39 +00:00
Jonas Maebe
172f85c8c3 * fixed important typo in better comments :)
git-svn-id: trunk@7618 -
2007-06-09 20:37:26 +00:00
Jonas Maebe
e93d612f4a * fixed FFreeOnTerminate handing in destructor + better comments
git-svn-id: trunk@7617 -
2007-06-09 20:36:35 +00:00
Jonas Maebe
4dd3be0e5a * return thread function result via pthread_exit() from CBeginThread
(Vinzent Hoefler)
  * simplified CWaitForThreadTerminate based on comments from Vinzent
    Hoefler
  * fixed resource leaks where in some cases a pthread would not be
    reaped based on comments from Vinzent Hoefler (resolves #9016)

git-svn-id: trunk@7588 -
2007-06-06 15:18:48 +00:00
Jonas Maebe
526a79a3c6 * disable thread suspension from another thread under *nix, see added
comments in cthreads.pp why

git-svn-id: trunk@7551 -
2007-06-02 11:39:59 +00:00
marco
08d10efb9f * now also fixes div hz with hz=0 for Linux, and reenables it for FreeBSD. Still needs phys console check though
git-svn-id: trunk@7489 -
2007-05-27 12:00:55 +00:00
Jonas Maebe
d1f7be8c7b * disabled sound/nosound for non-Linux, as the used ioctl is
Linux-specific (and at least under Mac OS X, there seems to be
    no way to play sound without going via the Carbon/Quicktime/...
    frameworks)

git-svn-id: trunk@7488 -
2007-05-27 11:11:13 +00:00
Jonas Maebe
399ab249d6 * initialise/finalise critical section
git-svn-id: trunk@7455 -
2007-05-24 12:24:45 +00:00
Jonas Maebe
7e3b792713 * fixed for solaris:
* iconv is in libc for solaris
    * use official names for unicode encodings (UTF-16BE/UTF-16LE instead
      of unofficial UNICODEBIG/UNICODELITTLE aliases, which are not supported
      by solaris' iconv)

git-svn-id: trunk@7452 -
2007-05-24 11:38:07 +00:00
peter
dd3fdac68e * beos support from Olivier Coursiere
git-svn-id: trunk@7443 -
2007-05-24 07:16:17 +00:00
Jonas Maebe
3ab9ace8c4 * implement CThreadSwitch using sched_yield()
git-svn-id: trunk@7429 -
2007-05-23 13:38:20 +00:00
micha
7f2a257102 + heap manager now per thread, reduce heap lock contention
+ heap threading test

git-svn-id: trunk@7407 -
2007-05-20 20:58:12 +00:00
micha
6ec55d2e74 * fix heap mutex deadlock in case of runtime error within heap management (needs recursive heap mutex)
git-svn-id: trunk@7337 -
2007-05-14 21:09:16 +00:00
marco
8991b8f365 * new socketerror scheme. OS/2 and netware are now broken and still must be done. (merge me and all previous socket related commits please)
git-svn-id: trunk@7327 -
2007-05-13 18:30:24 +00:00
marco
11bda8f5f2 * fpexeclpe
git-svn-id: trunk@7309 -
2007-05-11 15:08:38 +00:00
marco
e074f9383c * typo corrected
git-svn-id: trunk@7271 -
2007-05-05 10:19:44 +00:00
marco
699e231223 * more cleanup of unit unix (merge)
git-svn-id: trunk@7269 -
2007-05-04 22:39:28 +00:00
marco
fd6f6cf7e9 * fix for 8801. mmap constants inconsistancy. Old constants are aliased for compat. non portable moved to OS specific units (merge)
git-svn-id: trunk@7265 -
2007-05-04 21:23:02 +00:00
marco
b8c21889f9 * bug #8807, PRIO_ constants not aliased to baseunix _merge_
git-svn-id: trunk@7264 -
2007-05-04 19:16:11 +00:00
Jonas Maebe
065b9c39f7 * fixed compilation
git-svn-id: trunk@7256 -
2007-05-04 08:26:38 +00:00
daniel
41d171bda0 - Comment out duplicate entries (F11/F12 <--> Shift+F1/F2)
git-svn-id: trunk@7254 -
2007-05-03 22:54:12 +00:00
marco
4ba29cdbe1 * first set of deprecated tags.
git-svn-id: trunk@7199 -
2007-04-29 22:08:18 +00:00
florian
572608a64f * fixed ipc for 32 bit systems
git-svn-id: trunk@7073 -
2007-04-07 18:42:01 +00:00
florian
d90bc77a54 * fixed several type declarations
git-svn-id: trunk@7071 -
2007-04-07 18:23:03 +00:00
florian
0c889207ca * fixed ipc syscalls and data structures for x86-64, resolves #8616
git-svn-id: trunk@7070 -
2007-04-07 18:00:05 +00:00
Almindor
02702d199f * fix typo in ESock[s]errors
git-svn-id: trunk@7030 -
2007-03-29 20:51:10 +00:00
Almindor
ed8e6b71e3 * add common socket error constants to all platforms/socket.pp
git-svn-id: trunk@7022 -
2007-03-29 19:29:04 +00:00
micha
3a1b633325 + revive generics based tfplist/tstringlist implementation for generics testing; build with FPC_TESTGENERICS
git-svn-id: trunk@7001 -
2007-03-25 19:19:04 +00:00
daniel
5acd85f447 * Revert 6964
git-svn-id: trunk@7000 -
2007-03-25 17:55:47 +00:00
daniel
8127fb7a05 * Switch to classic field names to prevent further messing with compatibility.
git-svn-id: trunk@6964 -
2007-03-23 22:35:12 +00:00
daniel
5da5440e12 * Ptrint considered harmfull bug no 54689826, change to ptruint.
git-svn-id: trunk@6961 -
2007-03-23 15:38:28 +00:00
Jonas Maebe
95474a2d38 * fixed memory leak in executeprocess for FPC_USE_FPEXEC
git-svn-id: trunk@6826 -
2007-03-13 18:54:27 +00:00
Tomas Hajny
b06b453ee1 * check for 64-bit support in FileTruncate based on TOff definition
git-svn-id: trunk@6746 -
2007-03-06 20:33:28 +00:00
Jonas Maebe
6a7321c318 * enabled 64 bit filetruncate
git-svn-id: trunk@6739 -
2007-03-06 10:17:03 +00:00
peter
7fb4c0675a * fixed compile error
git-svn-id: trunk@6732 -
2007-03-06 07:13:20 +00:00
Tomas Hajny
5e1a7997ee + FileTruncate allows 64-bit parameter
git-svn-id: trunk@6727 -
2007-03-05 23:47:10 +00:00
ivost
025b57815f * removed inline flag from FUTEX_OP in linux.pp
* added msync constants

git-svn-id: trunk@6691 -
2007-03-01 14:20:34 +00:00
marco
57cfd89fbd * Linux 64-bit FS patch from neli for FPC_USE_LIBC
git-svn-id: trunk@6517 -
2007-02-16 22:16:54 +00:00
Jonas Maebe
5792438e3a * fixed 64 bit error
git-svn-id: trunk@6512 -
2007-02-16 15:24:55 +00:00
florian
e70c6df440 * arm-linux has to link explicitly against libc
git-svn-id: trunk@6355 -
2007-02-07 17:42:40 +00:00
Jonas Maebe
f842eb854a + fppause for FPC_USE_LIBC
git-svn-id: trunk@6282 -
2007-02-01 12:07:12 +00:00
tom_at_work
923c70932e * removed surplus semicolon
git-svn-id: trunk@6252 -
2007-01-28 19:21:14 +00:00
daniel
f60b66fba0 * Modify code to set xterm in rigth font.
git-svn-id: trunk@6243 -
2007-01-28 16:04:34 +00:00
daniel
e8050233af + Patch by Thorsten Engler to optimize string comparisons for = and <> cases. (Mantis #8231)
git-svn-id: trunk@6241 -
2007-01-28 10:58:52 +00:00
daniel
95aeaf7df5 * Check COLORTERM in case TERM=xterm to detect rxvt.
git-svn-id: trunk@6236 -
2007-01-27 20:35:16 +00:00
daniel
6c92edea04 * Send correct amount of characters for custom font.
git-svn-id: trunk@6235 -
2007-01-27 20:34:41 +00:00
daniel
53d640777a * Xterm mouse handling re-engineered.
git-svn-id: trunk@6225 -
2007-01-27 12:49:29 +00:00
tom_at_work
704f8dae14 * fixed rtl compilation with -dFPC_USE_LIBC by providing a more generic fpprctl() call (including libc variant) and moving related constants slightly
git-svn-id: trunk@6134 -
2007-01-22 22:21:32 +00:00
daniel
5f1f8936e5 * Comment to document libgpm/xterm mouse mess.
git-svn-id: trunk@6083 -
2007-01-19 22:26:58 +00:00
daniel
ac23d1ea3c * Mouse unit is solely responsible for xterm mouse.
* Improve detection of xterm mouse
  * Improve detection of gpm mouse

git-svn-id: trunk@6082 -
2007-01-19 21:59:24 +00:00
pierre
2c09c499ab * avoid a range check error
git-svn-id: trunk@6064 -
2007-01-19 02:53:46 +00:00
daniel
e6438fe23d * Make error constants cross platform.
git-svn-id: trunk@5977 -
2007-01-14 21:22:47 +00:00
daniel
1c452dd4f9 + Restore and fix text/file socket functionality.
git-svn-id: trunk@5973 -
2007-01-14 18:50:19 +00:00
Almindor
62e276d064 * remove text and file based socket conversions and operations from sockets
git-svn-id: trunk@5955 -
2007-01-13 22:21:38 +00:00
michael
ea0fc335d1 * Fixed FileExists for >2GB files
git-svn-id: trunk@5929 -
2007-01-12 19:36:24 +00:00
florian
f7da932aa4 * use ctypes instead of defining own types
git-svn-id: trunk@5918 -
2007-01-12 10:56:29 +00:00
daniel
a6a0745436 * Apply path in Mantis report 8103 to fix ansi2wide issue
git-svn-id: trunk@5916 -
2007-01-12 10:35:20 +00:00
Jonas Maebe
157e5eb02e * fixed debug code for 64 bit
git-svn-id: trunk@5913 -
2007-01-12 09:12:13 +00:00
micha
702685717f * cleanup of rtlevents, remove startwait due to persistance guarantee
git-svn-id: trunk@5854 -
2007-01-08 19:11:07 +00:00
marco
779b33148c * fix
git-svn-id: trunk@5769 -
2006-12-31 16:21:19 +00:00
Jonas Maebe
bdfd3e5453 * patch from Lloyd B. Park to support persistent signals
for RTLEvent under unix

git-svn-id: trunk@5750 -
2006-12-30 17:28:10 +00:00
chrivers
6a34534c2d * Removed "platform" keyword from dladdr(), since it actually IS portable.
git-svn-id: trunk@5718 -
2006-12-26 17:06:42 +00:00
chrivers
b8e514c466 * Cleaned up keyword-case style ("FUnction" => "function", etc)
git-svn-id: trunk@5707 -
2006-12-25 12:37:26 +00:00
chrivers
9fa75157ce + Added MAP_FAILED const for all unix platforms
git-svn-id: trunk@5705 -
2006-12-25 12:23:28 +00:00
chrivers
ed72c61524 + Added dl_info record
+ Added dladdr() prototype
 + Added RTLD_DEFAULT const for BSD and LINUX
 + Added RTLD_NEXT for all platforms

git-svn-id: trunk@5704 -
2006-12-25 12:22:19 +00:00
Jonas Maebe
652d331922 * fixed 64 bit compilation
git-svn-id: trunk@5680 -
2006-12-22 16:50:09 +00:00
Jonas Maebe
cf4b3f2e4d * don't destroy fsem in tthread.destroy before its potential last use
git-svn-id: trunk@5678 -
2006-12-22 14:53:54 +00:00
Jonas Maebe
4cbbfd7f5c * set FSuspended also if a tthread is suspended by an external thread
on unix
  * fixed some dataraces in unix' suspend/resume (although they can't
    be solved completely due to no possibility to atomically
    suspend/resume and set fsuspended at the same time)

git-svn-id: trunk@5677 -
2006-12-22 14:49:49 +00:00
Jonas Maebe
1867a46f34 - disabled fix for mantis 6693 from r5662 since the fix itself also
contains a race condition

git-svn-id: trunk@5670 -
2006-12-21 23:11:35 +00:00
Jonas Maebe
96b379ab0b * fixed initial suspending bug in r5662
git-svn-id: trunk@5668 -
2006-12-21 21:51:41 +00:00
Jonas Maebe
0c3afc0cf4 + implementation of cSemaphore* and BasicRTLEvent based on
sem_open/sem_close for Darwin (doesn't have sem_init/sem_destroy)
  + implementation of cSemaphore* based on pipes (for potential future
    systems that don't have either sem* routines)
  + test for basicrtlevent
  * fixed datarace whereby a TThread could be started, run and exit before
    TThread.AfterConstructor had been called (Mantis 6693, all platforms)
  * throw EThread exceptions in TThread.create if something during creating
    the tthread goes wrong (*nix)
  * don't crash in TThread.Destroy if the TThread throws an exception before
    it was fully initialised (*nix)
  * changed order of operations in TThread.Destroy so it doesn't perform
    invalid thread operations in some edge cases (*nix)
  * fixed usage of sem_wait/sem_trywait (can be interrupted) in Semaphore
    and RTLEvent implementations
  * fixed erroneous waiting for threads after they had already exited via
    pthread_detach/pthread_exit
  * fixed several memory leaks in case of thread intialisation errors
    (*nix)
  * unified tthread.inc for all Unices

git-svn-id: trunk@5662 -
2006-12-21 18:22:47 +00:00
michael
fa28889633 * Reverted dependency on fgl generics unit. fgl itself remains untouched.
git-svn-id: trunk@5651 -
2006-12-19 19:53:21 +00:00
micha
b1c1b6fd3d + generic implementation of list and map; adapt TList/TStringList to use it
git-svn-id: trunk@5624 -
2006-12-17 15:52:42 +00:00
Jonas Maebe
87a4372d7f * enable vfork for solaris
git-svn-id: trunk@5557 -
2006-12-08 10:20:38 +00:00
daniel
598cf9fcf0 + Add shortstring version of system().
git-svn-id: trunk@5495 -
2006-11-26 18:40:19 +00:00
michael
285e02ba83 * Fix to be able to allocate threadvars when code outside FPC creates a thread
git-svn-id: trunk@5474 -
2006-11-25 14:53:53 +00:00
daniel
76cf70bdbd * Use proper critical sections.
- Remove sysutils dependency by turning exception into runerror, which is
    converted into exception anyway if user decides to use sysutils.

git-svn-id: trunk@5471 -
2006-11-25 07:32:36 +00:00
Jonas Maebe
eb411035eb * fixed range errors
git-svn-id: trunk@5315 -
2006-11-10 20:45:59 +00:00
daniel
610cf1e2da * Fix reversed home/end.
git-svn-id: trunk@5297 -
2006-11-09 14:47:43 +00:00
Jonas Maebe
edafc80d8c * use pthread_kill() for Suspend/Resume in cthreads
git-svn-id: trunk@5280 -
2006-11-07 21:40:58 +00:00
Jonas Maebe
4240479f5d * fixed datarace in CBeginThread
git-svn-id: trunk@5274 -
2006-11-07 14:05:09 +00:00
marco
ed5e73b9a3 * reenabled the old getdir code when fpgetcwd was not FPC_USE_LIBC. getcwd
syscalls can fail, specially on special file systems.

git-svn-id: trunk@5262 -
2006-11-05 22:03:37 +00:00
micha
0043aff24d * fix linux/sysutils 64 bit file handling: make off_t 64 bit
git-svn-id: trunk@5152 -
2006-11-01 16:32:12 +00:00
Jonas Maebe
e4acf70c58 * fixed fplseek declaration for linux
git-svn-id: trunk@5145 -
2006-11-01 12:32:40 +00:00
micha
9238003e4f + 64 bit file support for linux
git-svn-id: trunk@5116 -
2006-10-31 11:20:21 +00:00
florian
4626f2c489 * NetBSD rtl compiles again
git-svn-id: trunk@5049 -
2006-10-28 22:17:49 +00:00
marco
dd7f715405 * FreeBSD fixes
git-svn-id: trunk@4994 -
2006-10-21 13:16:56 +00:00
daniel
ce3bfabfe6 - Remove unused sysutils dependency.
git-svn-id: trunk@4965 -
2006-10-18 20:10:02 +00:00
marco
449ba0b47b * reverted march fix from Florian that stops exporting pthread* types.
git-svn-id: trunk@4926 -
2006-10-15 15:20:57 +00:00
Almindor
2ee7e64a4a * adds semaphore support to ThreadManager, removes pipe hack from non linux
+ adds SemaphoreInit, SemaphorePost, SemaphoreWait and SemaphoreDestroy to TM

git-svn-id: trunk@4900 -
2006-10-14 11:39:47 +00:00
marco
94e0b66d0a * fix for popen brokenness
git-svn-id: trunk@4894 -
2006-10-13 22:29:08 +00:00
micha
0c5124c295 * fix compilation of sysutils, partly revert patch from peter which was a modified version of my patch
git-svn-id: trunk@4863 -
2006-10-11 18:19:06 +00:00
peter
d9bcee0cbe * don't allocate unixfinddata if we search only one file, patch from neli
git-svn-id: trunk@4855 -
2006-10-11 07:04:45 +00:00
Almindor
d107c6649c * fixes a findfirst bug (thanks to jesusrmx)
git-svn-id: trunk@4807 -
2006-10-05 20:28:53 +00:00
micha
d704af7216 fix compilation for {$T+} linux/win
git-svn-id: trunk@4794 -
2006-10-04 20:43:55 +00:00
Almindor
57d5ce9713 * some unix changes mainly on freeBSD and fix to MAXPATHLEN constant
+ added kld* syscalls for freeBSD (tested)
  + changed "directives" macro for freeBSD unit to "extdecl" for Lazarus
  + changed MAXPATHLEN from 255 (wrong on all unices known to fpc since 1993) to 1024 for non-linux and 4096 for linux as per source code (2.4+ for linux, 1993 BSD for BSDs, Solaris 10)

git-svn-id: trunk@4779 -
2006-10-03 20:35:07 +00:00
peter
25fe773e25 * FindFirst/FindNext replaced with optimized versions based on the
code in the dos unit.

git-svn-id: trunk@4772 -
2006-10-02 21:06:50 +00:00
ivost
23e1ebb357 -ctypes cleanup, it was quite a mess with naming conventions, eg. some times shortened long to l like cldouble
-long is written out now, while signed and unsigned are shortened to s and u

git-svn-id: trunk@4647 -
2006-09-18 21:41:08 +00:00
florian
78d5ba9ff0 * extended ctypes by Aison
git-svn-id: trunk@4622 -
2006-09-15 21:03:50 +00:00
Jonas Maebe
7522d8d967 * fixed sparc alignment issues with popen/pclose
git-svn-id: trunk@4346 -
2006-08-04 13:07:01 +00:00
Jonas Maebe
2b98aa8005 + CODESET for solaris
git-svn-id: trunk@4335 -
2006-08-03 15:36:13 +00:00
micha
d0e0ef3d8c 2.0.4: pthread_cond_timedwait needs absolute time (from crossbuilder, issue #7196)
git-svn-id: trunk@4296 -
2006-07-25 20:34:20 +00:00
daniel
e357dc5cf0 + Add rxvt keyboard sequences by Micha
git-svn-id: trunk@4268 -
2006-07-20 21:28:05 +00:00
michael
497abf8f5d + Several improvements by Martin Schreiber
git-svn-id: trunk@4246 -
2006-07-17 19:52:00 +00:00
Jonas Maebe
9e801eb048 * removed/conditionalised several unused variables
git-svn-id: trunk@4199 -
2006-07-14 20:44:57 +00:00
florian
e92cc059a7 * fixed previous commit
git-svn-id: trunk@3949 -
2006-06-25 20:37:14 +00:00
florian
f32b1ccbe0 + cwstring multithreading safe, fixes #6873
git-svn-id: trunk@3948 -
2006-06-25 20:17:32 +00:00
micha
2bd88e3406 read timezone file optimization
git-svn-id: trunk@3907 -
2006-06-21 09:26:17 +00:00
michael
dc0e8428a6 + Fixed rights parameter in TFileStream.Create and FileCreate
git-svn-id: trunk@3862 -
2006-06-13 22:01:49 +00:00
daniel
4a3248bc08 + Correct behaviour when initialization fails.
git-svn-id: trunk@3841 -
2006-06-11 09:00:19 +00:00
michael
e73bc0b772 + Made AddDisk a function, returning the current number of drives.
git-svn-id: trunk@3816 -
2006-06-06 20:54:21 +00:00
michael
305e4142ff + Fixed FileGetAttr so hidden is correctly detected
git-svn-id: trunk@3790 -
2006-06-04 14:18:55 +00:00
daniel
aa93e6a11e * Fix window resizing in X.
git-svn-id: trunk@3767 -
2006-06-02 20:46:46 +00:00
Tomas Hajny
a9b515c0bf * fexpand defines kept in platform specific sysutils.pp
git-svn-id: trunk@3726 -
2006-05-28 21:29:26 +00:00
daniel
cb1b6419ed * Set standard I/O line ending to #13#10 when keyboard in raw mode.
git-svn-id: trunk@3698 -
2006-05-27 16:42:47 +00:00
peter
da85b3db8c * fix linux build
git-svn-id: trunk@3626 -
2006-05-22 06:57:41 +00:00
daniel
ae740894a3 * Inline on in classes
git-svn-id: trunk@3507 -
2006-05-13 20:12:51 +00:00
marco
416e55c49c * IPC_PRIVATE now also for Linux
git-svn-id: trunk@3489 -
2006-05-13 10:51:48 +00:00
daniel
ce3ce89028 * Prevent range check error when compiling with -Cr
git-svn-id: trunk@3470 -
2006-05-10 16:26:37 +00:00
daniel
111fc2ca42 * Codepage code had a bug
git-svn-id: trunk@3434 -
2006-05-06 18:39:32 +00:00
Jonas Maebe
a6863b49e1 * fixed compilation on non-Linux
git-svn-id: trunk@3393 -
2006-04-30 20:51:02 +00:00
daniel
469789071d * Make hack uglier, so it works better.
git-svn-id: trunk@3374 -
2006-04-29 21:43:37 +00:00
daniel
111b588950 * Another xterm hack :(
git-svn-id: trunk@3367 -
2006-04-29 18:33:51 +00:00
daniel
faa8f2354b * Force VGA colours, regardless of xterm background colour.
git-svn-id: trunk@3346 -
2006-04-27 21:00:46 +00:00
daniel
b03ab6296f * Fix exiting acs after screen update
git-svn-id: trunk@3345 -
2006-04-27 20:15:57 +00:00
micha
7911be08f5 add signal handler trampoline return for buggy OS like fedora core
git-svn-id: trunk@3311 -
2006-04-21 20:36:17 +00:00
daniel
06ff7b5fd6 * Conversion tables for video unit.
git-svn-id: trunk@3244 -
2006-04-17 13:01:02 +00:00
daniel
f009b5700a * Unix video unit character set conversion overhaul
git-svn-id: trunk@3243 -
2006-04-17 12:39:02 +00:00
daniel
e93081c0d0 * More video improvements
git-svn-id: trunk@3103 -
2006-04-01 10:24:22 +00:00
daniel
147716b74d * Fix xterm detection
git-svn-id: trunk@3102 -
2006-04-01 08:21:11 +00:00
Almindor
e57abdf05f * experimental usage of fpgetcwd in osdir.inc
git-svn-id: trunk@2961 -
2006-03-19 09:46:58 +00:00
florian
a2f4e33bda * fixed solaris compilation
git-svn-id: trunk@2955 -
2006-03-18 17:17:16 +00:00
Jonas Maebe
7d88ba2831 * shell() now also uses vfork() instead of fork() on Darwin
git-svn-id: trunk@2930 -
2006-03-15 22:00:58 +00:00
florian
246eb14e95 * fixed widestring lib on solaris
git-svn-id: trunk@2882 -
2006-03-12 10:09:41 +00:00
daniel
d772104ce7 * Send escape code to xterm to make alt+key send an escape prefix.
git-svn-id: trunk@2777 -
2006-03-05 22:00:20 +00:00
daniel
08bf4afa30 * Add extra sequences for FreeBSD xterm
git-svn-id: trunk@2761 -
2006-03-05 18:27:17 +00:00
marco
6f0e817973 * pwrite/writev for *BSD + FPC_USE_LIBC. Requires IOVEC et al to be defined in ostypes.inc
git-svn-id: trunk@2734 -
2006-03-04 14:21:42 +00:00
marco
24c0b496dd * commit of the syscall based linux support for pwrite/writev, still under
{$ifdef linux}. This to fix x86_64 breakage.

git-svn-id: trunk@2731 -
2006-03-04 12:40:45 +00:00
daniel
f1a5389b0b * Only update what is modified
git-svn-id: trunk@2707 -
2006-02-28 10:46:36 +00:00
daniel
740c68106b + Add pread/pwrite system calls
* Optimize video using pwrite

git-svn-id: trunk@2705 -
2006-02-27 23:18:35 +00:00
marco
103830cd59 * fixed sinlen
git-svn-id: trunk@2688 -
2006-02-26 00:53:11 +00:00
daniel
2a14ed7c32 * Optimize keyboard unit for code size; now 3kb+ object code less.
git-svn-id: trunk@2678 -
2006-02-24 23:31:55 +00:00
Jonas Maebe
23b5138f78 + telldir returns a TOff, change searchpos for findfirst/next in Dos from
longint into TOff

git-svn-id: trunk@2652 -
2006-02-20 11:00:40 +00:00
marco
a561bb8410 * added fptimes which was already imported in the syscall port
git-svn-id: trunk@2624 -
2006-02-18 21:36:11 +00:00
marco
b778d3723e * removed 1.0.x bootstrap situation related to unix linux
git-svn-id: trunk@2544 -
2006-02-12 19:07:43 +00:00
marco
a0ee97efb1 * linuxold etc moved to linux/ No need anymore for 1.0.x bootstrapping
git-svn-id: trunk@2542 -
2006-02-12 19:03:58 +00:00
florian
cf4b0a2185 * flock will get a pascal implementation on Solaris
git-svn-id: trunk@2490 -
2006-02-08 23:24:39 +00:00
peter
513cbb1c6e * Make RTL compilable
git-svn-id: trunk@2476 -
2006-02-08 08:56:16 +00:00
florian
a7893f3be8 * some functions are in different libraries under Solaris
git-svn-id: trunk@2475 -
2006-02-07 22:37:35 +00:00
florian
fe2b798378 * made a lot of Solaris rtl stuff compilable
git-svn-id: trunk@2471 -
2006-02-07 20:17:44 +00:00
daniel
aef758d3b5 * FreeBSD delete key
* Alt+Backspace in xterm

git-svn-id: trunk@2425 -
2006-02-04 08:31:18 +00:00
daniel
d19c95db8f * various bugfixes
- Disable shared linking for now since it since it simply breaks
    svn. (Already disabled in Makefile itself, likely accidentally
    done with an old FPCMake, but it "fixed" svn to compile.)

git-svn-id: trunk@2401 -
2006-02-02 08:22:35 +00:00
daniel
eb45aa901f * Remove debugging code.
git-svn-id: trunk@2389 -
2006-02-01 08:27:30 +00:00
peter
a293a2486d * remove useless comment
git-svn-id: trunk@2388 -
2006-02-01 06:34:31 +00:00
daniel
56d3bf1403 + Keyboard unit overhaul
+ Shift+arrow keys now working in xterm
     + Keyboard restored when vt-switching away from application on Linux
       console
     + Escape key remapped on Linux console so it works instantly.
     + Try to use Linux console more aggressively
     + Linux specific code now only executed on Linux terminals and not
       on xterm, FreeBSD etc.

git-svn-id: trunk@2383 -
2006-01-31 10:26:25 +00:00
daniel
0c050527ca * 2.0 workaround
git-svn-id: trunk@2379 -
2006-01-29 18:15:50 +00:00
daniel
b53d90a328 * Comitted too quickly
git-svn-id: trunk@2371 -
2006-01-29 08:28:46 +00:00
daniel
c1e09fab0c * Fix 2.0.0 compat
git-svn-id: trunk@2370 -
2006-01-29 08:00:16 +00:00
daniel
bb797e93f0 * vcsa functionality moved into linuxvcs unit
* Reverse ifdef in gpm

git-svn-id: trunk@2366 -
2006-01-28 23:17:48 +00:00
daniel
c182af93ab * Overhaul of key recognition codes. Should recognize key much
better now, even without terminfo, which has been removed so another
    libc dependency is gone.

git-svn-id: trunk@2361 -
2006-01-28 22:21:28 +00:00
daniel
ea2af1b3aa + Much more agressive VCSA detection. Now works from inside Midnight Commander.
git-svn-id: trunk@2351 -
2006-01-27 10:46:26 +00:00
daniel
45d159eaad * Another libc dependency less
git-svn-id: trunk@2348 -
2006-01-26 22:14:46 +00:00
Jonas Maebe
5e694a801e * use vfork instead of fork for popen and one variant of executeprocess
if USE_VFORK is defined (currently only if both BSD and FPC_USE_LIBC
    are defined). Speeds up the compilation of the compiler under Darwin
    by 20-25% (the larger the project, the bigger the speedup).

git-svn-id: trunk@2317 -
2006-01-21 20:19:19 +00:00
marco
768bf94a99 * more "shared" fixes
git-svn-id: trunk@2295 -
2006-01-15 14:56:20 +00:00
marco
27c92161d6 * Ales Katona's errors patch
git-svn-id: trunk@2210 -
2006-01-07 18:41:15 +00:00
daniel
3758d106fe * remove command about quotes in array version of executeprocess, which doesn't
apply there

git-svn-id: trunk@2080 -
2005-12-30 09:19:23 +00:00
florian
da18dca277 * graph and ggigraph unit moved to packages/base
git-svn-id: trunk@2071 -
2005-12-29 14:36:22 +00:00
peter
63091ddafc * blksze to blksize
git-svn-id: trunk@2050 -
2005-12-25 11:08:23 +00:00
Jonas Maebe
b08eccdbf0 - reverted ansi2wide and wide2ansi changes, because they affect
third party sources too much

git-svn-id: trunk@2046 -
2005-12-24 01:40:23 +00:00
Jonas Maebe
9a08cdccf0 * several changes of var parameters into out parameters to avoid
useless warnings: code parameter of val(), destination of str(),
    destinations of ansi2wide and wide2ansi

git-svn-id: trunk@2041 -
2005-12-23 22:25:26 +00:00
daniel
15e90d7f17 * Grab_vcsa utility that is supposed to be installed suid root.
It sets the permissions, in case you are logged in on the console,
    of your /dev/vcs and /dev/vcsa device to the permissions of your
    /dev/tty device, making sure programs using the video unit can
    use the Linux console mode instead of the Network mode.

git-svn-id: trunk@1927 -
2005-12-11 14:25:07 +00:00
florian
d473e9873d * fixed declaration of NullHandle
git-svn-id: trunk@1926 -
2005-12-10 22:15:00 +00:00
tom_at_work
99ed1d009b * ppc32/linux: cprt0 update, fixing linking to libc
* ppc32/linux: stat update, making the compiler cycle with -dFPC_USE_LIBC again
* fixed typo in ugetrlimit libc function name

git-svn-id: trunk@1756 -
2005-11-15 17:27:42 +00:00
tom_at_work
1b4b42fdd6 * added CheckInitialStkLen() function which checks whether the given stack size value is valid on the OS when creating a thread, fixing stack checking
git-svn-id: trunk@1722 -
2005-11-11 12:16:08 +00:00
michael
59d3cd95a8 + Patch from Michalis Kamburelis to implement correct config dir, following basedir-spec
git-svn-id: trunk@1719 -
2005-11-10 20:40:11 +00:00
peter
91324759e4 * fixed range error in FpSigFillSet
git-svn-id: trunk@1692 -
2005-11-08 09:15:20 +00:00
tom_at_work
c5f89d7efd * release old stack pointer register on ppc64 after method prolog
* threading fixes for ppc64
* fixed a_param_ref to respect the size parameter on ppc64
* better stack size calculation for ppc64

git-svn-id: trunk@1599 -
2005-10-26 19:50:17 +00:00
Jonas Maebe
5cd3f3272c * fixed fpdup2() for non-text files
git-svn-id: trunk@1557 -
2005-10-21 12:34:36 +00:00
marco
411e2359eb * Fixed 2.0.0 compilation
git-svn-id: trunk@1346 -
2005-10-09 21:29:01 +00:00
marco
f054a6df16 * nanosleep for sleep(), since it is now in the POSIX group.
git-svn-id: trunk@1341 -
2005-10-09 11:41:57 +00:00
Jonas Maebe
e68436cfda * fixed ttyname()
git-svn-id: trunk@1310 -
2005-10-07 09:36:35 +00:00
peter
9ea69cfec9 * fix isatty return value checks
git-svn-id: trunk@1292 -
2005-10-05 06:50:16 +00:00
peter
6499d65c39 * fixed compilation with 2.0.x
git-svn-id: trunk@1223 -
2005-09-29 06:26:02 +00:00
marco
73e81ac45a * inlined few procs. Didn't inline makeraw since that triggers inline WITH bug.
git-svn-id: trunk@1221 -
2005-09-28 20:59:20 +00:00
marco
430cb886e3 * {$inline on in baseunix and some inlines in bunxovlh while I was at it
git-svn-id: trunk@1220 -
2005-09-28 20:31:24 +00:00
florian
a78703fb5a * fixed FPC_USE_LIBC on linux
git-svn-id: trunk@1218 -
2005-09-28 19:30:55 +00:00
florian
7626a64e35 + *stat wrappers for linux
git-svn-id: trunk@1213 -
2005-09-27 21:10:55 +00:00
florian
6e2a771c41 * Ansi2Wide inserts ? for unknown chars
* better error reporting

git-svn-id: trunk@1189 -
2005-09-25 15:04:35 +00:00
florian
a897adf6cc * try to unlock mutex before destroying it
git-svn-id: trunk@1186 -
2005-09-25 14:27:15 +00:00
florian
bb26084a0f + UCS4StringToWideString
+ WideStringToUCS4String
+ locale sensitive comparing of widestrings on unix

git-svn-id: trunk@1142 -
2005-09-19 19:13:03 +00:00
florian
66e8097281 * made HMODULE a PtrInt on unix, this is compatible with the other platforms
git-svn-id: trunk@1104 -
2005-09-17 22:49:42 +00:00
florian
ee9862d231 + signal hooking dummies
git-svn-id: trunk@1103 -
2005-09-17 22:21:30 +00:00
florian
b245075bb3 * unix: faSymLink
* unix: TSearchRec.PathOnly

git-svn-id: trunk@1101 -
2005-09-17 20:05:04 +00:00
florian
63ed93fc24 * fixed previous commit
git-svn-id: trunk@1050 -
2005-09-04 14:08:21 +00:00
florian
629fc8fe64 + StrCompAnsi implementation
git-svn-id: trunk@1049 -
2005-09-04 13:49:23 +00:00
michael
03f441c966 + Initial check-in
git-svn-id: trunk@973 -
2005-08-29 07:38:56 +00:00
marco
287e8317a6 * apparantly broke linux since iconv is in glibc there, fixed + some minor gotchas
git-svn-id: trunk@806 -
2005-08-06 20:20:19 +00:00
marco
c90da53c9f * more darwin fixes. Export to libiconv not iconv
git-svn-id: trunk@805 -
2005-08-06 17:11:08 +00:00
marco
40ff86dd59 * Darwin fixes. Untested on Darwin yet. (adding lib + name to external statements)
git-svn-id: trunk@804 -
2005-08-06 15:35:12 +00:00