Index: packages/fpc/Jcl.lpk
===================================================================
--- packages/fpc/Jcl.lpk	(revision 3795)
+++ packages/fpc/Jcl.lpk	(working copy)
@@ -1,17 +1,15 @@
 <?xml version="1.0"?>
 <CONFIG>
-  <Package Version="3">
+  <Package Version="4">
     <PathDelim Value="\"/>
     <Name Value="Jcl"/>
-    <AddToProjectUsesSection Value="False"/>
     <Author Value="Project JEDI"/>
-    <AutoUpdate Value="OnRebuildingAll"/>
     <CompilerOptions>
-      <Version Value="9"/>
+      <Version Value="11"/>
       <PathDelim Value="\"/>
       <SearchPaths>
-        <IncludeFiles Value="..\..\source\include\"/>
-        <OtherUnitFiles Value=".;..\..\source\common;..\..\source\windows;;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
+        <IncludeFiles Value="..\..\source\include;..\..\source\include\jedi"/>
+        <OtherUnitFiles Value=".;..\..\source\common;..\..\source\windows;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
         <UnitOutputDirectory Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
       </SearchPaths>
       <Parsing>
@@ -25,21 +23,17 @@
       <CodeGeneration>
         <Optimizations>
           <VariablesInRegisters Value="True"/>
-          <OptimizationLevel Value="3"/>
+          <OptimizationLevel Value="0"/>
         </Optimizations>
       </CodeGeneration>
-      <Linking>
-        <Debugging>
-          <UseLineInfoUnit Value="False"/>
-        </Debugging>
-      </Linking>
       <Other>
+        <CustomOptions Value="-Ur"/>
         <CompilerPath Value="$(CompPath)"/>
       </Other>
     </CompilerOptions>
     <Description Value="JEDI Code Library RTL package"/>
     <License Value="Copyright (C) 1999, 2011 Project JEDI"/>
-    <Version Major="2" Minor="4" Release="0" Build="4198"/>
+    <Version Major="2" Minor="4" Build="4198"/>
     <Files Count="76">
       <Item1>
         <Filename Value="..\..\source\common\bzip2.pas"/>
@@ -346,16 +340,15 @@
         <UnitName Value="Snmp"/>
       </Item76>
     </Files>
+    <Type Value="RunTimeOnly"/>
     <RequiredPkgs Count="1">
       <Item1>
         <PackageName Value="FCL"/>
       </Item1>
     </RequiredPkgs>
     <UsageOptions>
-      <IncludePath Value="..\..\source\include\"/>
-      <LibraryPath Value="$(PkgOutDir)\"/>
-      <ObjectPath Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)\"/>
-      <UnitPath Value="$(PkgOutDir)\"/>
+      <IncludePath Value="..\..\source\include;..\..\source\include\jedi"/>
+      <UnitPath Value="$(PkgOutDir)"/>
     </UsageOptions>
     <PublishOptions>
       <Version Value="2"/>
Index: packages/fpc/JclContainers.lpk
===================================================================
--- packages/fpc/JclContainers.lpk	(revision 3795)
+++ packages/fpc/JclContainers.lpk	(working copy)
@@ -1,17 +1,15 @@
 <?xml version="1.0"?>
 <CONFIG>
-  <Package Version="3">
+  <Package Version="4">
     <PathDelim Value="\"/>
     <Name Value="JclContainers"/>
-    <AddToProjectUsesSection Value="False"/>
     <Author Value="Project JEDI"/>
-    <AutoUpdate Value="OnRebuildingAll"/>
     <CompilerOptions>
-      <Version Value="9"/>
+      <Version Value="11"/>
       <PathDelim Value="\"/>
       <SearchPaths>
-        <IncludeFiles Value="..\..\source\include\"/>
-        <OtherUnitFiles Value=".;..\..\source\common;;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
+        <IncludeFiles Value="..\..\source\include;..\..\source\include\jedi"/>
+        <OtherUnitFiles Value=".;..\..\source\common;..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
         <UnitOutputDirectory Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)"/>
       </SearchPaths>
       <Parsing>
@@ -25,21 +23,17 @@
       <CodeGeneration>
         <Optimizations>
           <VariablesInRegisters Value="True"/>
-          <OptimizationLevel Value="3"/>
+          <OptimizationLevel Value="0"/>
         </Optimizations>
       </CodeGeneration>
-      <Linking>
-        <Debugging>
-          <UseLineInfoUnit Value="False"/>
-        </Debugging>
-      </Linking>
       <Other>
+        <CustomOptions Value="-Ur"/>
         <CompilerPath Value="$(CompPath)"/>
       </Other>
     </CompilerOptions>
     <Description Value="JEDI Code Library Containers package"/>
     <License Value="Copyright (C) 1999, 2011 Project JEDI"/>
-    <Version Major="2" Minor="4" Release="0" Build="4198"/>
+    <Version Major="2" Minor="4" Build="4198"/>
     <Files Count="14">
       <Item1>
         <Filename Value="..\..\source\common\JclAbstractContainers.pas"/>
@@ -98,6 +92,7 @@
         <UnitName Value="JclVectors"/>
       </Item14>
     </Files>
+    <Type Value="RunTimeOnly"/>
     <RequiredPkgs Count="2">
       <Item1>
         <PackageName Value="FCL"/>
@@ -107,10 +102,8 @@
       </Item2>
     </RequiredPkgs>
     <UsageOptions>
-      <IncludePath Value="..\..\source\include\"/>
-      <LibraryPath Value="$(PkgOutDir)\"/>
-      <ObjectPath Value="..\..\lib\fpc\$(TargetCPU)-$(TargetOS)\"/>
-      <UnitPath Value="$(PkgOutDir)\"/>
+      <IncludePath Value="..\..\source\include;..\..\source\include\jedi"/>
+      <UnitPath Value="$(PkgOutDir)"/>
     </UsageOptions>
     <PublishOptions>
       <Version Value="2"/>
Index: source/common/JclAbstractContainers.pas
===================================================================
--- source/common/JclAbstractContainers.pas	(revision 3795)
+++ source/common/JclAbstractContainers.pas	(working copy)
@@ -1374,12 +1374,12 @@
   else
   begin
     case FEncoding of
-      seISO:
+      JclContainerIntf.seISO:
         if FCaseSensitive then
           Result := AnsiStrSimpleHashConvert(AString)
         else
           Result := AnsiStrSimpleHashConvertI(AString);
-      seUTF8:
+      JclContainerIntf.seUTF8:
         if FCaseSensitive then
           Result := AnsiStrSimpleHashConvertU(AString)
         else
@@ -1397,7 +1397,7 @@
   else
   begin
     case FEncoding of
-      seISO, seUTF8:
+      JclContainerIntf.seISO, JclContainerIntf.seUTF8:
         if FCaseSensitive then
           Result := AnsiStrSimpleCompare(A, B)
         else
@@ -1418,7 +1418,7 @@
   else
   begin
     case FEncoding of
-      seISO, seUTF8:
+      JclContainerIntf.seISO, JclContainerIntf.seUTF8:
         if FCaseSensitive then
           Result := AnsiStrSimpleEqualityCompare(A, B)
         else
Index: source/common/JclAnsiStrings.pas
===================================================================
--- source/common/JclAnsiStrings.pas	(revision 3795)
+++ source/common/JclAnsiStrings.pas	(working copy)
@@ -518,8 +518,8 @@
 
 function ArrayOf(List: TJclAnsiStrings): TDynStringArray; overload;
 
-function AnsiCompareNaturalStr(const S1, S2: AnsiString): SizeInt;
-function AnsiCompareNaturalText(const S1, S2: AnsiString): SizeInt;
+function AnsiCompareNaturalStr(const S1, S2: AnsiString): SizeInt; overload;
+function AnsiCompareNaturalText(const S1, S2: AnsiString): SizeInt; overload;
 
 // internal structures published to make function inlining working
 const
Index: source/common/JclDateTime.pas
===================================================================
--- source/common/JclDateTime.pas	(revision 3795)
+++ source/common/JclDateTime.pas	(working copy)
@@ -87,7 +87,7 @@
 
 { Encode / Decode functions }
 
-function EncodeDate(const Year: Integer; Month, Day: Word): TDateTime;
+function EncodeDate(const Year: Integer; Month, Day: Word): TDateTime; overload;
 procedure DecodeDate(Date: TDateTime; out Year, Month, Day: Word); overload;
 procedure DecodeDate(Date: TDateTime; out Year: Integer; out Month, Day: Word); overload;
 procedure DecodeDate(Date: TDateTime; out Year, Month, Day: Integer); overload;
Index: source/common/JclStrings.pas
===================================================================
--- source/common/JclStrings.pas	(revision 3795)
+++ source/common/JclStrings.pas	(working copy)
@@ -603,8 +603,8 @@
 {$ENDIF SUPPORTS_UNICODE_STRING}
 
 // natural comparison functions
-function CompareNaturalStr(const S1, S2: string): SizeInt;
-function CompareNaturalText(const S1, S2: string): SizeInt;
+function CompareNaturalStr(const S1, S2: string): SizeInt; overload;
+function CompareNaturalText(const S1, S2: string): SizeInt; overload;
 
 {$IFNDEF UNICODE_RTL_DATABASE}
 // internal structures published to make function inlining working
Index: source/include/jclfpc.inc
===================================================================
--- source/include/jclfpc.inc	(revision 0)
+++ source/include/jclfpc.inc	(working copy)
@@ -0,0 +1,131 @@
+{**************************************************************************************************}
+{                                                                                                  }
+{ Project JEDI Code Library (JCL)                                                                  }
+{                                                                                                  }
+{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); }
+{ you may not use this file except in compliance with the License. You may obtain a copy of the    }
+{ License at http://www.mozilla.org/MPL/                                                           }
+{                                                                                                  }
+{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF   }
+{ ANY KIND, either express or implied. See the License for the specific language governing rights  }
+{ and limitations under the License.                                                               }
+{                                                                                                  }
+{ The Original Code is jcl.inc                                                                     }
+{                                                                                                  }
+{ The Initial Developer of the Original Code is Marcel van Brakel.                                 }
+{ Portions created by Marcel van Brakel are Copyright (C) Marcel van Brakel.                       }
+{                                                                                                  }
+{ Contributors:                                                                                    }
+{   Marcel van Brakel                                                                              }
+{   Matthias Thoma (mthoma)                                                                        }
+{   Petr Vones                                                                                     }
+{   Robert Marquardt (marquardt)                                                                   }
+{   Robert Rossmair (rrossmair)                                                                    }
+{   Florent Ouchet (outchy)                                                                        }
+{                                                                                                  }
+{**************************************************************************************************}
+{                                                                                                  }
+{ This include file defines various JCL specific defines.                                          }
+{ The more generic JCL defines are defined in jcl.inc and the generic defines in the jedi.inc file }
+{ which is shared with the JEDI VCL.                                                               }
+{                                                                                                  }
+{**************************************************************************************************}
+{                                                                                                  }
+{ This file is filled by the JCL installer, all the changes made in its content will be lost the   }
+{ next time the JCL is installed.                                                                  }
+{                                                                                                  }
+{**************************************************************************************************}
+
+// $Id: jcl.template.inc 3362 2010-10-05 13:24:05Z outchy $
+
+// Math precision selection, mutually exclusive
+// FPC does not support EXTENDED when targetting x86_64, MATH_DOUBLE_PRECISION is the default in this situation
+{.$DEFINE MATH_EXTENDED_PRECISION} // default
+{.$DEFINE MATH_DOUBLE_PRECISION}
+{.$DEFINE MATH_SINGLE_PRECISION}
+
+
+// Math functions takes care of infinites and NaN
+{.$DEFINE MATH_EXT_EXTREMEVALUES}
+
+
+// JclHookExcept support for hooking exceptions from DLLs
+{.$DEFINE HOOK_DLL_EXCEPTIONS}
+
+
+//Threadsafe directive
+{.$DEFINE THREADSAFE}
+
+
+// To exclude obsolete code from compilation, remove the point from the line below
+{.$DEFINE DROP_OBSOLETE_CODE}
+
+
+//Support for JclUnitVersioning.pas, not supported by Delphi 2005 (automatically disabled afterward)
+{.$DEFINE UNITVERSIONING}
+
+
+// debug sources
+// defining these symbols will the debug source to be automatically registered
+{.$DEFINE DEBUG_NO_BINARY}
+{.$DEFINE DEBUG_NO_TD32}     // automatically defined for FPC
+{.$DEFINE DEBUG_NO_MAP}
+{.$DEFINE DEBUG_NO_EXPORTS}
+{.$DEFINE DEBUG_NO_SYMBOLS}
+
+
+// PCRE options, mutually exclusive
+// IMPORTANT: The static link works only for Delphi 2005 and newer
+//            (an internal error is raised on other compilers)
+// Only one of the following defines can be defined at a time
+//   static link: PCRE_STATICLINK
+//   static dll import: PCRE_LINKDLL
+//   dynamic dll import: PCRE_LINKONREQUEST
+
+{.$DEFINE PCRE_STATICLINK}
+{.$DEFINE PCRE_LINKDLL}
+{.$DEFINE PCRE_LINKONREQUEST} // default
+
+
+// BZIP2 options, mutually exclusive
+
+{.$DEFINE BZIP2_STATICLINK} // default
+{.$DEFINE BZIP2_LINKDLL}
+{$DEFINE BZIP2_LINKONREQUEST}
+
+
+// ZLIB options, mutually exclusive
+
+{.$DEFINE ZLIB_STATICLINK} // default
+{.$DEFINE ZLIB_LINKDLL}
+{$DEFINE ZLIB_LINKONREQUEST}
+
+
+// Unicode options
+// use RTL Character Database rather than JCL one, less accurate but reduce executable size
+{.$DEFINE UNICODE_RTL_DATABASE}
+
+// insert a replacement character if sequence is corrupted rather than raising an exception
+{.$DEFINE UNICODE_SILENT_FAILURE}
+
+// defines resource compression (uncompressed, compressed with ZLib, compressed with BZip2), mutually exclusive
+{.$DEFINE UNICODE_RAW_DATA} // default
+{.$DEFINE UNICODE_ZLIB_DATA}
+{.$DEFINE UNICODE_BZIP2_DATA}
+
+
+// container options
+// define mapping of TJclStr* containers to TJclAnsiStr* or TJclWideStr* (mutually exclusive)
+{.$DEFINE CONTAINER_ANSISTR} // default for D2007 and older
+{.$DEFINE CONTAINER_WIDESTR}
+{.$DEFINE CONTAINER_UNICODESTR} // default for D2009 and newer, not supported for Delphi 2007 and older
+{.$DEFINE CONTAINER_NOSTR}
+
+
+// 7Zip options, mutually exclusive
+// IMPORTANT: The static link is not supported yet
+
+{.$DEFINE 7ZIP_STATICLINK} // not supported yet
+{.$DEFINE 7ZIP_LINKDLL}
+{.$DEFINE 7ZIP_LINKONREQUEST} // default
+
