Commit Graph

763 Commits

Author SHA1 Message Date
Jonas Maebe
a3c936fe5f + rawbytestring/unicodestring overloads for FileCreate and FileOpen.
The WinCE implementation converts the rawbytestring arguments to
    unicodestring and calls unicode OS APIs, while the others convert
    unicodestring arguments to DefaultFileSystemCodePage and call
    single byte OS APIs
  + test for the above

git-svn-id: branches/cpstrrtl@22467 -
2012-09-27 07:54:25 +00:00
Jonas Maebe
598d2feeb6 + rtldefs.inc file for every target that contains defines shared by multiple
RTL units. Comes with a FPCRTL_FILESYSTEM_UTF8 define that can be
    activated for targets whose single byte filesystem interface enforces
    UTF-8; included in inc/systemh.inc and unix/cwstring.pp until now
  + DefaultFileSystemCodePage variable that holds the code page used for
    communicating with the OS single byte file system APIs, and for the
    strings returned by those same APIs. Initialized with
   o the result of GetACP in the system unit of Windows platforms, except for
     WinCE which uses UTF-8 since its file system OS API calls already use
     the UTF-16 versions
   o CP_UTF8 on Unix platforms with FPCRTL_FILESYSTEM_UTF8 defined, and with
     DefaultSystemCodePage on other Unix platforms
   o DefaultSystemCodePage on Java/Android JVM targets
  + DefaultRTLFileSystemCodePage variable that holds the code page used to
    encode strings returned by RTL routines that return filenames obtained
    from OS API calls. By default the same as DefaultFileSystemCodePage on
    all platforms. Separate from DefaultFileSystemCodePage for clarity on
    platforms that may use either utf-16 or single byte OS API calls to
    send/receive file names (such as most Windows platforms)
  + new scpFileSystemSingleByte enum that can be passed to
    GetStandardCodePage() to get the default code page for OS single byte file
    system APIs, with implementations for Unix and Windows
  + SetMultiByteFileSystemCodePage() procedure to override the value of
    DefaultFileSystemCodePage

  In principle, in the long run unchanged programs only using generic
  ansistrings and unicodestrings should (mostly) behave the same as in
  FPC 2.6.0 as far as RTL-level file system APIs are concerned if
  they set DefaultFileSystemCodePage and DefaultRTLFileSystemCodePage
  to DefaultSystemCodePage at the start of their execution

git-svn-id: branches/cpstrrtl@22466 -
2012-09-27 07:54:06 +00:00
Tomas Hajny
2bcfe75ea8 * correction for copy&paste error in previous commit
git-svn-id: trunk@21908 -
2012-07-12 23:32:51 +00:00
Tomas Hajny
4dccf2d321 * GetLoadErrorStr implemented
git-svn-id: trunk@21907 -
2012-07-12 23:30:19 +00:00
michael
8eeb22720b * Added GetLoadErrorStr function by Mark Morgan Loyd (Bug ID 22321)
git-svn-id: trunk@21880 -
2012-07-11 15:31:09 +00:00
Jonas Maebe
834026bfb5 * synchronised with trunk up to r21067
git-svn-id: branches/jvmbackend@21068 -
2012-04-26 21:24:20 +00:00
pierre
1b3fd997fc + Regenerate all Makefiles's after adding x86_64 netbsd target
git-svn-id: trunk@21031 -
2012-04-24 23:15:18 +00:00
Tomas Hajny
27403b542b + FileNameCasePreserving added - see #18066 in Mantis
git-svn-id: trunk@20896 -
2012-04-15 21:21:53 +00:00
Tomas Hajny
d442d14e0c + FileNameCasePreserving added - see #18066 in Mantis
git-svn-id: trunk@20894 -
2012-04-15 20:56:13 +00:00
Tomas Hajny
225cc1c1e0 * fix FileExists/DirectoryExists wrongly accepting non-existing entries with wrong path due to path normalization using ExpandFileName (correctly) accepting also non-existing paths
git-svn-id: trunk@20890 -
2012-04-15 19:46:33 +00:00
Jonas Maebe
aee5380ae0 * merged trunk up to r20882
o support for the new codepage-aware ansistrings in the jvm branch
   o empty ansistrings are now always represented by a nil pointer rather than
     by an empty string, because an empty string also has a code page which
     can confuse code (although this will make ansistrings harder to use
     in Java code)
   o more string helpers code shared between the general and jvm rtl
   o support for indexbyte/word in the jvm rtl (warning: first parameter
     is an open array rather than an untyped parameter there, so
     indexchar(pcharvar^,10,0) will be equivalent to
     indexchar[pcharvar^],10,0) there, which is different from what is
     intended; changing it to an untyped parameter wouldn't help though)
   o default() support is not yet complete
   o calling fpcres is currently broken due to limitations in
     sysutils.executeprocess() regarding handling unix quoting and
     the compiler using the same command lines for scripts and directly
     calling external programs
   o compiling the Java compiler currently requires adding ALLOW_WARNINGS=1
     to the make command line

git-svn-id: branches/jvmbackend@20887 -
2012-04-15 15:54:10 +00:00
Jonas Maebe
44bd889b9b * regenerated Makefiles with AIX support
git-svn-id: trunk@20812 -
2012-04-11 18:03:57 +00:00
pierre
2c4d8cc9d9 Add x86_64-openbsd target in Makefiles
git-svn-id: trunk@20723 -
2012-04-06 16:49:08 +00:00
pierre
e6cf348904 Update Makefile for mips-linux support
git-svn-id: trunk@20448 -
2012-02-29 11:22:05 +00:00
Tomas Hajny
6b43ce2e13 * boolean must not be used for DosCalls API parameters
git-svn-id: trunk@19811 -
2011-12-11 00:46:55 +00:00
Tomas Hajny
12e216ed4e * boolean must not be used for DosCalls API parameters
git-svn-id: trunk@19810 -
2011-12-11 00:46:16 +00:00
Tomas Hajny
f56cd3d6d9 * fix for SysThreadSetPriority
git-svn-id: trunk@19783 -
2011-12-09 00:26:51 +00:00
Tomas Hajny
3f2f5ed559 + support for working with thread priorities added
git-svn-id: trunk@19765 -
2011-12-07 01:02:56 +00:00
Tomas Hajny
4fb6274942 * minor enhancement for one of DosQuerySysState record types
git-svn-id: trunk@19764 -
2011-12-06 23:39:55 +00:00
florian
9426cac1b0 * rebuilt Makefiles
git-svn-id: trunk@19748 -
2011-12-04 15:34:01 +00:00
Tomas Hajny
f879ee31eb + proper implementation of *Event* support
git-svn-id: trunk@19740 -
2011-12-04 02:26:34 +00:00
Tomas Hajny
4d981acad3 + proper implementation of MS Windows-like 'critical sections'
git-svn-id: trunk@19739 -
2011-12-04 00:47:17 +00:00
Tomas Hajny
c0c526efbc * DosQuerySysState and DosReplaceModule added
git-svn-id: trunk@19733 -
2011-12-03 14:59:26 +00:00
paul
1ccf16358c rtl: init widestring and unitcodestring managers before initialization of Standard IO files (stdin,stdout,stderr)
git-svn-id: trunk@19542 -
2011-10-25 02:29:29 +00:00
Tomas Hajny
af03a73af2 * fix DosExitCode for sessions of other types, consider ExecFlags for other session types
git-svn-id: trunk@19398 -
2011-10-06 23:57:59 +00:00
Tomas Hajny
9edae25cae * added some missing constants and TResultCodes fields alias names
git-svn-id: trunk@19397 -
2011-10-06 23:56:34 +00:00
Tomas Hajny
49a7b48fe0 * proper support for ExecInheritsHandles in Flags
git-svn-id: trunk@19368 -
2011-10-04 22:10:21 +00:00
Tomas Hajny
67612af07d * fixes for Exec - execution of different application types, fixed memory leak and avoided queue name collisions
git-svn-id: trunk@19324 -
2011-10-02 01:43:18 +00:00
Tomas Hajny
f13c5fae05 * additional fixes for ExecuteProcess - running of DOS programs in current directory and proper closing of the created queue
git-svn-id: trunk@19323 -
2011-10-02 01:41:56 +00:00
Tomas Hajny
ceecda9d2e * SysUtils do not depend on Dos any longer
git-svn-id: trunk@19322 -
2011-10-02 01:33:26 +00:00
Tomas Hajny
348268c3e5 * SysUtils do not depend on Dos any longer
git-svn-id: trunk@19321 -
2011-10-02 01:33:19 +00:00
Tomas Hajny
e9f6afe5e0 * fix for ExecuteProcess - starting of different executable types works properly now; dependency on unit Dos removed; redefinitions of imports from DosCalls removed also - unit DosCalls used directly now
git-svn-id: trunk@19319 -
2011-10-01 23:10:22 +00:00
Tomas Hajny
7f7a4518f7 * FileExists fixed - wildcards not accepted any longer
git-svn-id: trunk@18846 -
2011-08-25 21:34:44 +00:00
Tomas Hajny
8952607ff0 * 64-bit versions of TFileStatus* and TFileFindBuf* types added
git-svn-id: trunk@18844 -
2011-08-25 21:19:44 +00:00
Tomas Hajny
6aecc69389 * FindFirst enhanced for file sizes >2 GB
git-svn-id: trunk@18843 -
2011-08-25 21:17:30 +00:00
Jonas Maebe
28c20cfc5e * the default string type for the JVM target is no longer automatically
unicodestring = java.lang.String. The reason this was the default in
    the past is that this was the first string type that was implemented,
    and without it being the default most code involving string operations
    would fail. Now the default strings types are the same as for other
    targets
  + new {$modeswitch unicodestrings} directive, that when activated
    *together* with {$h+},
   1) changes char into an alias for widechar
   2) changes string into an alias for unicodestring
   3) changes the preferred string evaluation type (in case of uncertainty)
      to unicodestring
    {$modeswitch unicodestrings} with {$h-} does not change anything at all
    regarding the string type (it still changes the char type)
  + new uuchar unit that redefines char as widechar, and which is automatically
    included by the compiler if {$modeswitch unicodestrings} is enabled

git-svn-id: branches/jvmbackend@18781 -
2011-08-20 08:35:47 +00:00
pierre
1c2a5f9819 + Update all Makefile's modified by
change in utils/fpcm/fpcmake.ini in prevous commit.

  Adapt also other files to that change:

  * compiler/globals.pas: Replace $FPCTARGET by os_string if
  tf_use_8_3 flag is set for target_info also.

  * tests/Makefile.fpc: Modify TEST_TARGETSUFFIX in the same way
  as TARGETSUFFIX was modified in previous commit.

  * tests/utils/dotest.pp:
    + New variable UseOSOnly, set to true if only target OS name
    should be used for subdirectories.

git-svn-id: trunk@18228 -
2011-08-16 20:10:19 +00:00
Tomas Hajny
867ad94115 * fix for DirectoryExists - proper handling of root directory
git-svn-id: trunk@18186 -
2011-08-13 00:06:14 +00:00
marco
39d7bb511d * Regenned all makefiles before 2.6.x branching.
git-svn-id: trunk@18073 -
2011-08-03 13:41:52 +00:00
Tomas Hajny
cbe040bcc7 * more complete/safer checking of sharing mode values allowed by OS/2
git-svn-id: trunk@17564 -
2011-05-26 21:11:09 +00:00
Tomas Hajny
39312473cb * real implementation for FileCreate with ShareMode
git-svn-id: trunk@17563 -
2011-05-26 20:37:43 +00:00
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
mazen
86d9eadc73 * Fixed spell errors.
git-svn-id: trunk@17177 -
2011-03-25 09:33:15 +00:00
Tomas Hajny
f5d9ab3038 * fixes for OS/2 threading support by Stefan Zigulec
git-svn-id: trunk@16691 -
2011-01-02 23:08:15 +00:00
Tomas Hajny
934ab56c0a + most of OS/2 threading support implemented; not debugged yet though
git-svn-id: trunk@16601 -
2010-12-19 22:05:05 +00:00
Tomas Hajny
87c53a6e29 * Sem_Indefinite_Wait constant changed to avoid range check errors - fix for web bug #18263
git-svn-id: trunk@16594 -
2010-12-19 15:34:33 +00:00
sergei
cbdc08b641 * dynlibs.pas: added 'const' modifiers to eliminate unnecessary local string copies
git-svn-id: trunk@16366 -
2010-11-18 22:09:48 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
Jonas Maebe
8b0301409a + i386/iphonesim target for the new iPhoneSimulator in Xcode 3.2.4 and
later: the same as i386/darwin, except
      a) uses the non-fragile Objective-C ABI/runtime
      b) does not require stubs for direct calls/jumps (not required for
         i386/darwin under 10.6 and later either, but still generated
         there for backwards compatibility)
      c) only the same packages are enabled as for ARM/Darwin
      d) MacOSAll is compiled specifically for the iPhoneSimulator SDK
    This target also defines the symbol "darwin" apart from the target
    name "iphonesim" for source code compatibility reasons.

git-svn-id: trunk@16065 -
2010-09-29 21:56:47 +00:00
Tomas Hajny
f544ee965a * fix for web bug #6579
git-svn-id: trunk@15899 -
2010-08-24 21:32:49 +00:00