Commit Graph

1036 Commits

Author SHA1 Message Date
florian
f6f6df2780 * removed line breaks
git-svn-id: trunk@21927 -
2012-07-17 20:13:21 +00:00
florian
25b80bedf9 * get rid of tabs with wrong size
git-svn-id: trunk@21913 -
2012-07-15 14:04:50 +00:00
florian
3d76823929 * load StackTop and StackBottom correctly on windows, also in libraries
git-svn-id: trunk@21912 -
2012-07-15 14:03:45 +00:00
florian
2ce563710a * another rule fix
git-svn-id: trunk@21433 -
2012-05-29 18:19:57 +00:00
florian
551bd5e0c2 + added missing dependencies to win32 makefile
git-svn-id: trunk@21397 -
2012-05-27 17:22:04 +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
d442d14e0c + FileNameCasePreserving added - see #18066 in Mantis
git-svn-id: trunk@20894 -
2012-04-15 20:56:13 +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
sergei
cd44c5f45c Win32 and Win64, fixed DLL exit sequence, resolves #14603:
* Unwind to DllEntry context only if called from DllEntry. Otherwise, terminate the entire process, making sure that RTL won't be finalized twice.
* Call DLL_process_detach_hook before RTL is finalized, not after.

git-svn-id: trunk@20367 -
2012-02-16 23:39:03 +00:00
pierre
fa44c8cf5a + Add explicit rules for softfpu sfpux80 and sfpu128 units
git-svn-id: trunk@20205 -
2012-01-31 16:00:45 +00:00
florian
562932a2c9 * change dllparam into PtrInt, this is required for 64 bit systems, patch based on Gennadiy's patch in #21089, resolves #21089
git-svn-id: trunk@20079 -
2012-01-14 20:21:52 +00:00
sergei
ebb2205c63 * Moved TExceptionRecord definition to sysos.inc, it is identical for all Windows targets.
git-svn-id: trunk@19868 -
2011-12-18 00:45:52 +00:00
sergei
5b6b6cdd11 - clean out remaining ver2_0, REGCALL, FPC_HAS_INDIRECT_MAIN_INFORMATION defines.
git-svn-id: trunk@19847 -
2011-12-13 21:40:22 +00:00
sergei
bcbd25568e * Call InitHeap before InitSystemThreads in TLS callback (necessary because InitSystemThreads calls RelocateHeap), and skip both of them in initialization section of system.pp if they have been called from TLS callback. This restores correct initialization sequence which was broken by r19779, resulting in lots of debug messages about corrupted heap when running tests/test/theapthread.pp
git-svn-id: trunk@19836 -
2011-12-13 07:40:02 +00:00
pierre
4a9c8e330b + Move EXEC_callback into separate file win/systlsdir.inc
* In win32/sysinitXX units, rename EntryInforation
    to SysInitEntryInformation.
    include new win/systlsdir.inc file from
    win/syswin.inc for win64 target
    and from win32/sysinit.inc for win32 target.
    Set fields of both SysInitEntryInformation and EntryInformation
    by converting them into typed constants.

git-svn-id: trunk@19779 -
2011-12-08 16:11:07 +00:00
florian
9426cac1b0 * rebuilt Makefiles
git-svn-id: trunk@19748 -
2011-12-04 15:34:01 +00:00
sergei
32094761ef * win32/system.pp, win64/system.pp: Moved duplicated declarations of WinAPI functions to sysos.inc (Florian's comment about include ordering is no longer true, wstrings.inc comes after sysos.inc these days).
* Result of GetCurrentProcess and first argument of ReadProcessMemory are THandle, not dword.

git-svn-id: trunk@19726 -
2011-12-02 18:52:48 +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
sergei
268d8685e7 - Removed SysResetFPU/SysInitFPU from win32/win64 system unit initialization. It is redundant here because it is called from fpc_initializeunits->fpc_cpuinit (on win64) or from fpc_cpucodeinit (on win32).
* Also declared hprevinst as a typed constant and removed its initialization from code.

git-svn-id: trunk@19234 -
2011-09-25 19:27:52 +00:00
sergei
ad5d2ccabb * Moved command line handling and randomize() to syswin.inc, so a single copy of code is used for both win32 and win64. This implies that apostrophe is no longer supported as quoting symbol in win64.
Win64 doesn't support it itself either.

git-svn-id: trunk@19201 -
2011-09-23 21:45:02 +00:00
paul
935a030dca rtl: enable character unit compilation for win32
git-svn-id: trunk@19172 -
2011-09-22 02:07:05 +00:00
sergei
f35a8179b1 * Status codes are identical for win32 and win64, moved them to syswin.inc.
git-svn-id: trunk@19160 -
2011-09-20 15:01:22 +00:00
paul
8cc22972a0 merge r13488 from cpstrnew branch by florian except ncgcon.pas which has a difficult merge conflict (code moved to another unit which is not at the branch during the revision):
* first batch of patches to make tcpstr1.pp work

git-svn-id: trunk@19085 -
2011-09-17 11:16:45 +00:00
paul
28627482c5 merge r13483 from cpstrnew branch by florian:
+ Win32Unicode2AnsiMove and Win32Wide2AnsiMove support code page parameter
+ Win32Ansi2UnicodeMove and Win32Ansi2WideMove support code page parameter
+ code page parameter added for several compilerprocs
* unified more code between win32 and win64 (widestring conversion routines

git-svn-id: trunk@19082 -
2011-09-17 10:54:00 +00:00
Jonas Maebe
644fffbdcb * add definition of SYSTEMUNIT variable in Makefile.fpc's that didn't have
it yet

git-svn-id: branches/jvmbackend@18948 -
2011-09-02 16:06:10 +00:00
pierre
f0aa48b083 * Remove use of direct U_UNIT_NAME or TC_UNIT_NAME
symbols in assembler sources.
  Added to corresponding system variables or typed constants a
  public name 'operatingsystem_XXX' alias and used that alias in assembler
  source.

git-svn-id: trunk@18943 -
2011-09-02 12:51:48 +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
florian
e18aa6e208 * version update
git-svn-id: trunk@18212 -
2011-08-14 21:42:50 +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
sergei
ad94e5e719 * Link TLS directory and callbacks only into executables. It is not necessary for DLLs, because callback functionality is contained in DllMain. Moreover, DLLs with TLS directory cannot be dynamically loaded in Windows versions prior to Vista.
* In Win32, reference TLS directory from SysInit units, allowing the module which needs TLS to be different from module which contains system unit.
* Don't write to TLS directory, as it can be placed into read-only memory.

git-svn-id: trunk@18028 -
2011-07-27 23:22:09 +00:00
sergei
50952945e1 * Moved WideString-related code, which is identical for Win32 and Win64, into syswin.inc
* Defined HAS_WIDESTRINGMANAGER for Win32 and Win64, this allows to smartlink away part of generic widestring routines.

git-svn-id: trunk@17963 -
2011-07-08 20:07:51 +00:00
sergei
cd94bb5edf * tls_index must be renamed everywhere, forgotten part of r17943.
git-svn-id: trunk@17948 -
2011-07-06 20:33:45 +00:00
sergei
59ac157b50 sysinit*.pp: Factored common code into include file.
git-svn-id: trunk@17939 -
2011-07-05 13:25:51 +00:00
pierre
46a6be05a5 * More dummy code to avoid removal of required labels
git-svn-id: trunk@17898 -
2011-07-01 14:21:50 +00:00
pierre
bffd571f9d * win/sysos.inc: TTlsDirectory, new record type
Used to support TlsCallbacks.

    Tls callback code added inside
    ifdef FPC_USE_TLS_DIRECTORY.
    NOTE: This code needs compiler changes also to work.

  * win/systhread.inc:
    Exec_Tls_callback: Callback for main executable.
    Several new external variables:
    FreePascal_TLS_callback, FreePascal_end_of_TLS_callback
    need to be placed into .CRT$XL* section,
    using  name '.section .CRT$XLFPC __FPC_tls_callbacks'
    extension to be provided by compiler change.
    tls_callbacks : pointer; external name '___crt_xl_start__';
    tls_data_start : pointer; external name '___tls_start__';
    tls_data_end : pointer; external name '___tls_end__';
    provided by linker script.
    tls_index : DWord that will contain the automatic
    TlsIndex generated by executable launch code (not used by
    FPC code, but might be used by code from loaded objects).
    _tls_used: TTlsdirectory record.

  * win32/system.pp and win64/system.pp:
    Code to force loading of _tls_used record.

git-svn-id: trunk@17893 -
2011-07-01 10:40:35 +00:00
sergei
3a7ac49cc2 - Removed Win32Wide2AnsiMove, using Win32Unicode2AnsiMove for both Unicode-to-ansi and Wide-to-ansi conversions. In general, we don't need two different conversion routines in wideStringManager, as long as they differ only in PWideChar vs PUnicodeChar (these types are identical).
git-svn-id: trunk@17202 -
2011-03-29 05:25:05 +00:00
joost
2937190516 * Moved and renamed GetSpecialDir from sysutils to new windirs unit, so it can be used in the compiler
git-svn-id: trunk@17134 -
2011-03-14 20:43:03 +00:00
florian
a0c25dc0f9 - removes Thread_count from the system unit of several OSes: the value of this variable was unpredictable and the hebaviour was not fixable, resolves #18089
git-svn-id: trunk@16472 -
2010-11-28 20:46:50 +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
florian
786c4e206f * enables compilation of iso7185 unit on all targets
git-svn-id: trunk@15730 -
2010-08-06 17:45:42 +00:00
florian
73d788ff96 + iso7195 unit
git-svn-id: trunk@15680 -
2010-07-31 20:42:52 +00:00
florian
2c823f5935 * fixes compilation of win32 system unit with -dSYSTEMEXCEPTIONDEBUG
git-svn-id: trunk@14717 -
2010-01-17 15:12:02 +00:00
michael
1cf64c032f * Patch to remove useless process_entry_hook from sven barth
git-svn-id: trunk@14094 -
2009-11-07 10:10:47 +00:00
florian
cba72c423d * patch by Sergei Gorelkin to use always SetFilePointer, also for files with >2GB, this saves some lines of code, resolves #14630
git-svn-id: trunk@13838 -
2009-10-10 18:52:50 +00:00
florian
a2862ce347 * cleaned up mess of r13516
git-svn-id: trunk@13524 -
2009-08-12 19:34:46 +00:00