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 -
* 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 -
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 -
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 -
rawbytestring
* DoDirSeparators() and GetDirs() marked as "rtlproc" so they can accept
non-rawbytestring arguments as their var-parameters
git-svn-id: branches/cpstrrtl@25306 -
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 -
+ 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 -
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 -
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 -