Commit Graph

504 Commits

Author SHA1 Message Date
pierre
90537e94a0 Call Errno2noutres if system call to close the handle fails in do_close for win and unix
git-svn-id: trunk@29095 -
2014-11-20 22:00:35 +00:00
pierre
260c6583cf Only set StdInputHandle, StdOutputHandle and StdErrorHandle once
git-svn-id: trunk@29094 -
2014-11-20 21:57:15 +00:00
marco
3fbcca0e77 * change ulargeinteger quadpart to unsinged, mantis #27023
git-svn-id: trunk@29059 -
2014-11-11 08:30:14 +00:00
marco
20833d4bc9 * change ContextTrackingMode field to boolean. Mantis #26892
git-svn-id: trunk@28883 -
2014-10-19 20:30:11 +00:00
marco
bcfe5eb146 * large image aware PE flag value. Fixes Delphi programs that set peflags with constant.
git-svn-id: trunk@28737 -
2014-10-04 11:14:56 +00:00
svenbarth
b79e7ce1f9 Implement GetCPUCount for Windows OSes. This is for all three Windows targets.
rtl/win/sysos.inc:
  + add definition of TSystemInfo structure
  + add import of GetSystemInfo
  + add implementation of GetCPUCount which returns value for number of processors retrieved by GetSystemInfo

git-svn-id: trunk@28643 -
2014-09-12 18:40:59 +00:00
marco
eb67f66e10 * add taglogfont out of compatibility, patch by Ocean, mantis #0026539
git-svn-id: trunk@28470 -
2014-08-19 17:45:23 +00:00
marco
a4a11cb149 * startupinfo was declared with lpTstr. splitted in the usual A/W/- variants
git-svn-id: trunk@28240 -
2014-07-19 22:22:49 +00:00
marco
0a0739b916 * improved winexec comment, updated copyright year and add minor comment to gettickcount64
Mantis #26238

git-svn-id: trunk@27834 -
2014-05-31 14:47:31 +00:00
michael
d5a88caecd * Do not display error message if NoErrMsg is set.
git-svn-id: trunk@27765 -
2014-05-11 10:19:04 +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
nickysn
fb20791cbe * replaced all the remaining uses of nativeint in the rtl with either sizeint
or objpasint

git-svn-id: trunk@27237 -
2014-03-23 13:38:16 +00:00
sergei
e79e038f9c + Win32/Win64 SEH: STATUS_FLOAT_MULTIPLE_(FAULTS|TRAPS) need additional handling. Makes floating-point exceptions consistent between x87 and SSE.
git-svn-id: trunk@27177 -
2014-03-17 22:49:29 +00:00
nickysn
5242ed7864 * changed TResStrInitTable.Count and TWStrInitTablesTable.Count to nativeint
git-svn-id: trunk@26921 -
2014-03-02 13:27:59 +00:00
sergei
1f22c2de22 - Text i/o routines are not expected to return a value.
git-svn-id: trunk@26834 -
2014-02-22 13:42:41 +00:00
sergei
c83f4c5ddc * Windows targets: removed 'errno' threadvar, OS error codes can be passed directly to Errno2InOutRes().
git-svn-id: trunk@26815 -
2014-02-19 07:28:46 +00:00
sergei
489b23cecd * Made TStartupInfo type common for win32 and win64 and updated as suggested by Mantis #23074.
* Deprecated StartupInfo variable because it is not there for Delphi compatibility (Delphi apparently does not have such variable in interface of its System unit), and we don't have other reasons to export non-portable stuff.

git-svn-id: trunk@26810 -
2014-02-18 16:49:08 +00:00
sergei
5e762cc6ea * Second part of 64-bit Windows fixes and updates from Mantis #23074.
git-svn-id: trunk@26807 -
2014-02-18 09:26:47 +00:00
sergei
83deae45b8 * First part of 64-bit Windows fixes from Mantis #23074.
git-svn-id: trunk@26806 -
2014-02-18 02:10:35 +00:00
michael
f2d163cd38 * Fixed bug ID #23290 (FileSetDate on Dir)
git-svn-id: trunk@26682 -
2014-02-06 12:01:25 +00:00
Tomas Hajny
1a430d8110 * GetProcAddr added for OS/2, type of argument for ordinal target specific now
git-svn-id: trunk@26521 -
2014-01-19 21:15:26 +00:00
svenbarth
6273192ce1 + Add a new overload to DynLibs to allow loading by Ordinal only. This needs specific operating system support however and will return Nil (using a default implementation) if ordinals are not supported.
+ Implement overload for the three supported Windows targets.

git-svn-id: trunk@26457 -
2014-01-14 15:23:55 +00:00
marco
f09374a197 * winsock(and -2), sockets and gpm to rtl-extra.
git-svn-id: trunk@26426 -
2014-01-11 19:45:37 +00:00
marco
dea2c743d5 * Initial active version of
rtl-extra : objects matrix ucomplex
   rtl-objpas: convutil(s) dateutil(s) stdconvs variants varutils
   

git-svn-id: trunk@26398 -
2014-01-05 19:20:15 +00:00
Jonas Maebe
d1b2a5f362 * changed the initial value DefaultFileSystemCodePage from CP_ACP to CP_UTF8:
o since we always use UTF-16 for OS file API calls, this will only affect
     possible intermediate code page conversions inside RTL routines and hence
     prevent potential data loss. This was already the same for NativeNT and
     WinCE, which are in the same boat
   o DefaultRTLFileSystemCodePage, which specifies the code page used to return
     strings from single byte RTL routines, remains CP_ACP and hence nothing
     will change as far as programs using the RTL are concerned

git-svn-id: trunk@26377 -
2014-01-04 15:05:42 +00:00
marco
a001e12d04 * rtl-console initial version.
git-svn-id: trunk@26372 -
2014-01-03 22:19:02 +00:00
marco
ebe262762a * Clean out of $i textrec and filerec includes that are redundant now that cpstrrtl exposes
those records via system. 

git-svn-id: trunk@26356 -
2014-01-02 13:26:09 +00:00
sergei
179586f589 + SEH support for Win32. Enable by cycling with OPT=-dTEST_WIN32_SEH.
Although basic things work (no regressions in test suite, also with TEST_OPT=-O2), there are some secondary issues/TODOs:
- Exception frame around PASCALMAIN is not properly removed in DLLs
- No stack traces yet
- Stack overallocated in finalizer procedures, their entry/exit code needs cleanup
- Signals unit is probably completely broken.

git-svn-id: trunk@26225 -
2013-12-12 12:43:46 +00:00
marco
67c21b3a5e * fix for #25402 One argument of GetICMProfileW missed an indirection
git-svn-id: trunk@26202 -
2013-12-09 18:19:31 +00:00
sergei
04c0845189 * Moved more reusable exception handling code from seh64.inc to syswin.inc.
* sysutils.pp: Install ExceptObjProc and ExceptClsProc also on Win32.

git-svn-id: trunk@26181 -
2013-12-04 14:02:54 +00:00
marco
23ac05cfdd * fix for #22546
git-svn-id: trunk@26177 -
2013-12-03 23:24:48 +00:00
sergei
6a40ff730c * In preparation to support SEH on Win32, moved definitions that apply to Win32 from seh64.inc into syswin.inc.
git-svn-id: trunk@26153 -
2013-11-29 14:23:46 +00:00
nickysn
6cf2382760 + added the PFD_DIRECT3D_ACCELERATED and PFD_SUPPORT_COMPOSITION constants to
the windows unit

git-svn-id: trunk@25774 -
2013-10-14 11:59:24 +00:00
marco
c7206dde97 * changed type of unused parameter in TWMSetFocus from WParam to LParam as
suggest by ChrisF, Mantis #25171

git-svn-id: trunk@25723 -
2013-10-08 16:02:25 +00:00
marco
bca1e53840 * fix for mantis #24920 try to properly update messages unit for win64.
git-svn-id: trunk@25639 -
2013-10-04 18:24:16 +00:00
paul
bc636658d6 rtl: add/change some token related types
git-svn-id: trunk@25574 -
2013-09-26 03:51:06 +00:00
paul
de6a53376c win32: update TOKEN_INFORMATION_CLASS from windows sdk
git-svn-id: trunk@25565 -
2013-09-25 08:50:38 +00:00
marco
1a4a745993 * fix for mantis #25078
git-svn-id: trunk@25546 -
2013-09-24 12:56:43 +00:00
Tomas Hajny
3e5601d89e * fix ChDir and GetDir handling for other than the current drive and avoid changing the current directory in GetDir in that case
git-svn-id: trunk@25541 -
2013-09-23 20:41:54 +00:00
nickysn
96c7a9325a * CrtOpen, CrtClose, CrtRead, CrtWrite and CrtReturn changed to procedures, instead of functions
git-svn-id: trunk@25506 -
2013-09-17 11:17:29 +00:00
Jonas Maebe
40ff1c77ca * updated GetWindowsSpecialDir():string so it uses the -A or -W api call
depending on whether the RTL is compiled in Unicode mode to avoid
    conversions

git-svn-id: branches/cpstrrtl@25310 -
2013-08-19 22:47:19 +00:00
Jonas Maebe
63e8d0c31c * do not yet map GetCommandLine() to GetCommandLineW() with -dFPC_UNICODE_RTL,
because its result is assigned to the global cmdline variable which is still
    a pchar in all cases

git-svn-id: branches/cpstrrtl@25309 -
2013-08-19 22:47:15 +00:00
Jonas Maebe
5b09435055 * explicitly call several windows *A() versions of APIs so the intended
routine is called even when we compile with -dFPC_UNICODE_RTL

git-svn-id: branches/cpstrrtl@25308 -
2013-08-19 22:47:12 +00:00
Jonas Maebe
2da7c3f05c * changed declarations in finah.inc and diskh.inc from ansistring to
rawbytestring
  * DoDirSeparators() and GetDirs() marked as "rtlproc" so they can accept
    non-rawbytestring arguments as their var-parameters

git-svn-id: branches/cpstrrtl@25306 -
2013-08-19 22:04:40 +00:00
Jonas Maebe
af3f12f60c * rawbytestring/unicodestring versions of findfirst/findnext/findclose
o these routines are now generic wrappers in filutil.inc, and call
     the platform-dependent internalfindfirst/next/close routines
   o on unix, the fnmatch routine got proper support for UTF-8 matching
     (e.g., it won't match a partial UTF-8 code point to a "?" wildcard)
   o for NativeNT, a similar (untested) UTF-16 version has been added
  + test for the above
  * rawbytestring/unicodestring versions of fileage

git-svn-id: branches/cpstrrtl@25302 -
2013-08-19 22:04:25 +00:00
Jonas Maebe
29132f45b7 * synchronised with trunk up to r25167 (fixes glib compilation via r25164,
and occasional crashes in executeprocess on libc platforms via r25167)

git-svn-id: branches/cpstrrtl@25169 -
2013-07-24 14:24:49 +00:00
Jonas Maebe
3fdb3092af + defaultfilesystemcodepage support for dynlibs
+ unicodestring overloads for (safe)loadlibrary()

git-svn-id: branches/cpstrrtl@25162 -
2013-07-22 21:45:34 +00:00
Jonas Maebe
df6a2dce00 + unicodestring support for assign/erase/rename
+ codepage support for textrec/filerec and the above routines
  * textrec/filerec now store the filename by default using widechar. It is
    possible to switch back to ansichars using the FPC_ANSI_TEXTFILEREC define.
    In that case, from now on the filename will always be stored in
    DefaultFileSystemEncoding
  * fixed potential buffer overflows and non-null-terminated file names in
    textrec/filerec
  + dodirseparators(pwidechar), changed the dodirseparators(pchar/pwidechar)
    parameters into var-parameters and gave those routines an extra parameter
    that indicates whether the p(wide)char can be changed in place if
    necessary or whether a copy must be made first (avoids us having to make
    all strings always unique everywhere, because they might be changed on
    some platforms via a pchar)
  * do_open/do_erase/do_rename got extra boolean parameters indicating whether
    the passed pchars point to data that can be freely changed (to pass on to
    dodirseparators() if applicable)
  * objects.pp: force assign(pchar) to be called, because
    assign(array[0..255]) cannot choose between pchar and rawbytestring
    versions (and removing the pchar version means that assign(pchar) will
    be mapped to assign(shortstring) in {$h-})
  * fixed up some routines in other units that depend on the format of
    the textrec/filerec.name field

git-svn-id: branches/cpstrrtl@25137 -
2013-07-19 16:30:51 +00:00
Jonas Maebe
155aafc255 * moved SYSUTILS_HAS_ANSISTR/UNICODESTR_FILEUTIL_IMPL define to interface
so declarations can also depend on it and similar defines (not yet the
    case)
  + added SYSUTILS_HAS_ANSISTR_ENVVAR_IMPL/SYSUTILS_HAS_UNICODESTR_ENVVAR_IMPL
    to indicate whether the platform-dependent part of the unit provides
    an ansistring/unicodestring interface to get environment variables
  + Windows version of getenvironmentvariable(unicodestring)
  + generic ansistring/unicodestring versions of GetEnvironmentVariable()
    in case the platform doesn't provide them
  * result of GetEnvironmentString() is ansistring/unicodestring depending
    on the state of the FPC_RTL_UNICODE define

git-svn-id: branches/cpstrrtl@25116 -
2013-07-16 14:16:34 +00:00
Jonas Maebe
eeb98a0c0f - removed platform-specific implementations of GetCurrentDir, SetCurrentDir,
CreateDir and RemoveDir, and implemented a generic one (based on the OS/2
    version) in the shared sysutils code (so that the filesystem code page
    support for the system unit routines can be reused)
  * include both ansistring and unicodestring versions of the above routines,
    and of ForceDirectories. Exception: GetCurrentDir, which cannot be
    overloaded based on function result and whose return type currently
    dependends on the FPC_UNICODE_RTL define

git-svn-id: branches/cpstrrtl@25113 -
2013-07-16 14:15:55 +00:00