Commit Graph

863 Commits

Author SHA1 Message Date
Tomas Hajny
5a56228011 * add missing condition for empty string in Unicode uppercase and lowercase conversion routines
git-svn-id: trunk@29625 -
2015-02-04 14:35:01 +00:00
Tomas Hajny
dbc50980d1 * fixed OS/2 compilation after dynlibs manager implementation
git-svn-id: trunk@29617 -
2015-02-03 23:56:12 +00:00
svenbarth
2d454dc8fa Move DynLibs support to System unit using a manager approach like for Threads, WideStrings, etc.. This is needed so that we can support features like "delayed" and loading of dynamic packages.
Each port that allows the usage of dynamic libraries should call InitSystemDynLibs during initialization of the System unit.
The DynLibs unit has been adjusted to be a forwarder for the functions that now reside in the System unit (for backwards compatiblity just in case). Additionally the unit will register the DynLibsManager if it doesn't reside in the System unit anyway.
Currently only the Windows targets (Win32, Win64 and WinCE) implement the DynLibsManager inside the System unit. For other systems using the LoadLibrary, etc. functions will lead to a run error/exception.
If a port wants to implement its own DynLibsManager then it needs to define DISABLE_NO_DYNLIBS_MANAGER. TLibHandle, NilHandle and optionally TOrdinalEntry (it's set to SizeUInt otherwise) should be defined in sysdlh.inc which needs to be enabled using the define FPC_SYSTEM_HAS_SYSDLH (because there are targets which have FEATURE_DYNLIBS enabled, but don't support them... e.g. powerpc-wii -.-).
The DynLibsManager contains methods for loading a library based on a RawByteString and based on a UnicodeString. BOTH should be implemented, but internally one can forward to the other.
The loading by ordinal *can* be be implemented. If it is set to Nil then the implementation of GetProcAddress(lib,ordinal) will return Nil.

+ new functions SetDynLibsManager and GetDynLibsManager to set and retrieve the current DynLibsManager
* provide interface of DynLibs unit in unit System

git-svn-id: trunk@29613 -
2015-02-03 20:00:00 +00:00
Tomas Hajny
4cced1186d * use the default locale for current country as the first fallback before using the 'Universal' locale if the locale set in LANG is not recognized/supported by OS/2
git-svn-id: trunk@29572 -
2015-01-28 02:29:39 +00:00
Tomas Hajny
919e58fc99 * try a fallback to 'Universal' locale if the locale set in LANG is not recognized/supported by OS/2
git-svn-id: trunk@29571 -
2015-01-28 00:30:38 +00:00
Tomas Hajny
2f92aa8d48 * corrected random memory corruption during argument setup
git-svn-id: trunk@29539 -
2015-01-24 00:25:35 +00:00
Tomas Hajny
7292e64e04 * corrected test for empty filename in FileRec
git-svn-id: trunk@29538 -
2015-01-24 00:23:42 +00:00
Tomas Hajny
08ce351a06 * don't use the OS/2 API function DosSearchPath for searching through the list of directories in FSearch because it always returns full path even for relative directory specifications (as opposed to what is expected in TP/BP)
git-svn-id: trunk@29532 -
2015-01-23 01:25:08 +00:00
Tomas Hajny
2e5054186c * include current directory in the list of searched directories in FSearch as expected in TP/BP
git-svn-id: trunk@29531 -
2015-01-23 01:19:22 +00:00
Tomas Hajny
5176a069cf * align DosError returned for empty filename in GetFAttr and SetFAttr to TP/BP
git-svn-id: trunk@29530 -
2015-01-23 00:48:16 +00:00
Tomas Hajny
37acf48426 * align DosError returned for invalid (unused) handle in GetFTime and SetFTime to TP/BP
git-svn-id: trunk@29529 -
2015-01-23 00:26:02 +00:00
Tomas Hajny
dcffcd22e7 * fix a bug in Exec if calling a program without arguments
git-svn-id: trunk@29526 -
2015-01-22 23:11:42 +00:00
Tomas Hajny
284074c4e8 * OS/2 UnicodeStringManager functions finished (except for CharLengthPChar and CodePointLength which only make sense after they get a codepage parameter as discussed with Jonas); fix for #6295
git-svn-id: trunk@29492 -
2015-01-17 01:32:20 +00:00
Tomas Hajny
a73c5c0c0d * improved thread-safety in case of reinitialization of cached information after codepage change, improved fallback routines for upper/lowercase if no Unicode support is available
git-svn-id: trunk@29457 -
2015-01-13 01:11:28 +00:00
Tomas Hajny
c3fee174b8 * ensure initialization of CountryCode parameter for DosMapCase in OS2UpperAnsiString
git-svn-id: trunk@29441 -
2015-01-12 00:07:07 +00:00
Tomas Hajny
16d4e39c59 * added information for future implementation of certain SMP specific API functions
git-svn-id: trunk@29433 -
2015-01-11 00:18:10 +00:00
Tomas Hajny
e7f76cee9e * fixed re-initialization of cached UConv object after changed codepage and added implementation of several more UnicodeStringManager routines
git-svn-id: trunk@29432 -
2015-01-11 00:16:12 +00:00
marco
d407b668d1 * version updated to 3.1.1
git-svn-id: trunk@29399 -
2015-01-04 21:09:04 +00:00
Tomas Hajny
bec4a9ceb7 * modified solution for ensuring validity of cached conversion objects
git-svn-id: trunk@29390 -
2015-01-04 18:28:14 +00:00
Tomas Hajny
faead59e7a * start building unicode related units
git-svn-id: trunk@29389 -
2015-01-04 18:23:13 +00:00
Tomas Hajny
1dceddc302 * minor update of the GetLastOSError support infrastructure
git-svn-id: trunk@29179 -
2014-11-29 01:43:38 +00:00
Tomas Hajny
c3fbfcb27b * first part of UnicodeStringManager routines implementation for OS/2
git-svn-id: trunk@29178 -
2014-11-29 01:42:29 +00:00
Tomas Hajny
acbca7254d * remove unused local variable
git-svn-id: trunk@29177 -
2014-11-29 01:29:31 +00:00
pierre
7bbb30ccd4 * Reset filerec mode field to fmClosed if the system call to open the file failed
git-svn-id: trunk@29132 -
2014-11-23 21:49:29 +00:00
sergei
3a5e6485b5 - RTL: removed InitVariantManager, it was an empty procedure since day 1.
git-svn-id: trunk@29114 -
2014-11-22 20:35:46 +00:00
Tomas Hajny
bf7e71da47 * new constants for options used in recently added APIs
git-svn-id: trunk@29075 -
2014-11-15 11:15:29 +00:00
Tomas Hajny
8c7fc80580 * yet more OS/2 API functions added
git-svn-id: trunk@29073 -
2014-11-14 18:59:52 +00:00
Tomas Hajny
f330d2e981 * fix for random memory corruption introduced in r28975
git-svn-id: trunk@29017 -
2014-11-08 00:01:13 +00:00
Tomas Hajny
398fa3dd8d * changed parameter in DosSetThreadAffinity from pointer to a var parameter
git-svn-id: trunk@29016 -
2014-11-07 23:57:22 +00:00
Tomas Hajny
30820cd0e5 * fixed missed setting of return code
git-svn-id: trunk@29002 -
2014-11-06 16:51:15 +00:00
Tomas Hajny
fa89dca059 * make LastOSError accessible earlier
git-svn-id: trunk@29001 -
2014-11-06 12:15:27 +00:00
Tomas Hajny
6a83f32486 * additional API functions available in higher OS/2 versions
git-svn-id: trunk@28994 -
2014-11-05 21:36:03 +00:00
Tomas Hajny
93cb6fd57e * additional constants for OpenMode in Dos(Protect)Open(L)
git-svn-id: trunk@28993 -
2014-11-05 21:29:31 +00:00
Tomas Hajny
4f43987f93 * missing ordinals for DosCalls added
git-svn-id: trunk@28989 -
2014-11-05 17:59:47 +00:00
Tomas Hajny
66ffade5da * DosAliasMem and DosQueryMemState functions added to DosCalls; DosProtect* (not available in OS/2 2.0) moved to DosCall2
git-svn-id: trunk@28988 -
2014-11-04 23:32:52 +00:00
Tomas Hajny
9419073608 * make FPC RTL again compatible to OS/2 2.x (avoid using DosAllocThreadAlloc/FreeMemory if not available while keeping to use them if possible)
git-svn-id: trunk@28979 -
2014-11-03 21:05:32 +00:00
Tomas Hajny
5d0bd53433 * remove fixed limit for overall size of arguments for Dos.Exec and SysUtils.ExecuteProcess
git-svn-id: trunk@28975 -
2014-11-03 17:00:55 +00:00
Tomas Hajny
1c74b752c5 * fix for DosGetMessage and better (more accurate) declaration for DosQueryCP
git-svn-id: trunk@28974 -
2014-11-03 13:52:25 +00:00
Tomas Hajny
a46b076cd2 * removed Dos[Alloc/Free]ThreadLocalMemory which is not available before OS/2 Warp - planned to be moved to DosCall2 later
git-svn-id: trunk@28953 -
2014-10-31 17:58:43 +00:00
Tomas Hajny
99e9571e0e * allow initialization of DefaultSystemCodepage also if system could return more information about prepared codepages
git-svn-id: trunk@28952 -
2014-10-31 17:43:15 +00:00
Tomas Hajny
6c17c9cb29 * minor optimization (don't clear the result of GetDynLibsErrorStr twice)
git-svn-id: trunk@28948 -
2014-10-30 14:52:34 +00:00
Tomas Hajny
8cd2b615ce * added (limited) GetLastOSError by emulation of Win32 and *nix behaviour in the RTL
git-svn-id: trunk@28947 -
2014-10-30 14:44:03 +00:00
Tomas Hajny
c0a1a7d26d + new unit providing access to additional OS/2 API functions from DOSCALL1.DLL available in newer OS/2 versions (WSeB/MCP/eCS) - currently additional 64-bit file handling not used directly in RTL; mostly file locking related now; dynamically loaded and simulated under older OS/2 versions to allow executables using them to run on older OS/2 versions
git-svn-id: trunk@28890 -
2014-10-21 17:29:05 +00:00
Tomas Hajny
feb58d5d25 * make handle for DosCalls accessible for other code
git-svn-id: trunk@28889 -
2014-10-21 16:37:31 +00:00
Tomas Hajny
1d0de6f87c * added ordinal numbers for newer Dos* API functions
git-svn-id: trunk@28888 -
2014-10-21 11:40:34 +00:00
Tomas Hajny
f55e4400b3 * fix for typo in constant name plus added explanation
git-svn-id: trunk@28886 -
2014-10-20 18:47:10 +00:00
pierre
3d34a8a3b0 Makefiles updated with fpcmake rev 27428
git-svn-id: trunk@27508 -
2014-04-10 09:58:17 +00:00
marco
959ea7f5bb * printer unit moved. Amiga unit also moved but it is not actively used.
git-svn-id: trunk@27351 -
2014-03-29 20:35:28 +00:00
marco
c465d3d64a * moving 4 cp9* units. These are 16-bit and big.
git-svn-id: trunk@27349 -
2014-03-29 19:43:13 +00:00
marco
ed3a49372d * strutils moved to packages/rtl-objpas
git-svn-id: trunk@27339 -
2014-03-29 17:51:44 +00:00