[mapguide-commits] r8084 - in trunk/Tools/Vagrant: centos/x64 centos/x86 scripts sources sources/patches sources/patches/fdo sources/patches/fdo/Thirdparty sources/patches/fdo/Thirdparty/boost sources/patches/fdo/Thirdparty/boost/boost sources/patches/mapguide sources/patches/mapguide/Oem sources/patches/mapguide/Oem/CsMap sources/patches/mapguide/Oem/CsMap/Include sources/patches/mapguide/Oem/CsMap/Source support ubuntu/x64 ubuntu/x86

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Apr 29 04:14:57 PDT 2014


Author: jng
Date: 2014-04-29 04:14:57 -0700 (Tue, 29 Apr 2014)
New Revision: 8084

Added:
   trunk/Tools/Vagrant/sources/atomic.h
   trunk/Tools/Vagrant/sources/patches/
   trunk/Tools/Vagrant/sources/patches/fdo/
   trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/
   trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost/
   trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost/boost/
   trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost/boost/cstdint.hpp
   trunk/Tools/Vagrant/sources/patches/mapguide/
   trunk/Tools/Vagrant/sources/patches/mapguide/Oem/
   trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/
   trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Include/
   trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Include/cs_Geocon.h
   trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/
   trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/CSdata.c
   trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/Library.mak
   trunk/Tools/Vagrant/sources/patches/patchinfo.txt
Modified:
   trunk/Tools/Vagrant/centos/x64/Vagrantfile
   trunk/Tools/Vagrant/centos/x86/Vagrantfile
   trunk/Tools/Vagrant/scripts/build_fdo.sh
   trunk/Tools/Vagrant/support/apt_list.txt
   trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh
   trunk/Tools/Vagrant/ubuntu/x64/Vagrantfile
   trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile
Log:
Vagrant configuration updates:
 - Set up FDO to build against system MySQL/PostgreSQL libs on Ubuntu
 - Check in atomic.h required for Ubuntu 14.04 as the liboss4-salsa-dev package (which contains this header) no longer exists
 - Check in pending FDO/CS-Map patches needed for compilation, but have not landed upstream.

Modified: trunk/Tools/Vagrant/centos/x64/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/centos/x64/Vagrantfile	2014-04-28 14:14:08 UTC (rev 8083)
+++ trunk/Tools/Vagrant/centos/x64/Vagrantfile	2014-04-29 11:14:57 UTC (rev 8084)
@@ -139,6 +139,7 @@
 HAVE_FDO=0
 HAVE_FDO_LIBS=0
 HAVE_MAPGUIDE=0
+MG_UNIT_TEST=0
 SCRIPT_ROOT=~/scripts
 FDO_SRC_ROOT=~/fdo
 FDO_SRC=$FDO_SRC_ROOT/trunk
@@ -170,6 +171,7 @@
 sed -i 's/FDO_PLATFORM=32/FDO_PLATFORM=64/g' build_fdo.sh
 sed -i 's/FDO_CPU=x86/FDO_CPU=x64/g' build_fdo.sh
 sed -i 's/FDO_BUILD_CPU=i386/FDO_BUILD_CPU=amd64/g' build_fdo.sh
+sed -i 's/LIB_DIRNAME=lib/LIB_DIRNAME=lib64/g' build_fdo.sh
 if [ $HAVE_FDO_LIBS -eq 0 ];
 then
     echo [provision]: Extracting FDO thirdparty libs
@@ -195,6 +197,16 @@
 BUILD_COMPONENT="svn update MapGuide"
 svn update $MG_SRC
 check_build
+if [ -d /mapguide_sources/patches/fdo ];
+then
+    echo [provision]: Applying FDO source patches
+    cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+fi
+if [ -d /mapguide_sources/patches/mapguide ];
+then
+    echo [provision]: Applying MapGuide source patches
+    cp -R /mapguide_sources/patches/mapguide/* $MG_SRC
+fi
 cd ~/scripts
 BUILD_COMPONENT="FDO"
 sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
@@ -202,9 +214,12 @@
 BUILD_COMPONENT="MapGuide"
 sudo -E ./build.sh 2>&1 | tee ~/mapguide_build.log
 check_build
-echo [provision]: Unit test MapGuide
-cd $SCRIPT_ROOT/mgdev
-sudo make check 2>&1 | tee ~/mapguide_unit_test.log
+if [ $MG_UNIT_TEST -eq 1 ];
+then
+    echo [provision]: Unit test MapGuide
+    cd $SCRIPT_ROOT/mgdev
+    sudo make check 2>&1 | tee ~/mapguide_unit_test.log
+fi
 cd $SCRIPT_ROOT
 sudo mkdir -p /vagrant/build
 sudo mv -f ~/*.log /vagrant/build

Modified: trunk/Tools/Vagrant/centos/x86/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/centos/x86/Vagrantfile	2014-04-28 14:14:08 UTC (rev 8083)
+++ trunk/Tools/Vagrant/centos/x86/Vagrantfile	2014-04-29 11:14:57 UTC (rev 8084)
@@ -171,6 +171,7 @@
 sed -i 's/FDO_PLATFORM=64/FDO_PLATFORM=32/g' build_fdo.sh
 sed -i 's/FDO_CPU=x64/FDO_CPU=x86/g' build_fdo.sh
 sed -i 's/FDO_BUILD_CPU=amd64/FDO_BUILD_CPU=i386/g' build_fdo.sh
+sed -i 's/LIB_DIRNAME=lib64/LIB_DIRNAME=lib/g' build_fdo.sh
 if [ $HAVE_FDO_LIBS -eq 0 ];
 then
     echo [provision]: Extracting FDO thirdparty libs
@@ -196,6 +197,16 @@
 BUILD_COMPONENT="svn update MapGuide"
 svn update $MG_SRC
 check_build
+if [ -d /mapguide_sources/patches/fdo ];
+then
+    echo [provision]: Applying FDO source patches
+    cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+fi
+if [ -d /mapguide_sources/patches/mapguide ];
+then
+    echo [provision]: Applying MapGuide source patches
+    cp -R /mapguide_sources/patches/mapguide/* $MG_SRC
+fi
 cd ~/scripts
 BUILD_COMPONENT="FDO"
 sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log

Modified: trunk/Tools/Vagrant/scripts/build_fdo.sh
===================================================================
--- trunk/Tools/Vagrant/scripts/build_fdo.sh	2014-04-28 14:14:08 UTC (rev 8083)
+++ trunk/Tools/Vagrant/scripts/build_fdo.sh	2014-04-29 11:14:57 UTC (rev 8084)
@@ -18,6 +18,7 @@
 FDO_CPU=x86
 FDO_PLATFORM=32
 FDO_BUILD_CPU=i386
+LIB_DIRNAME=lib
 
 # FDO install directory
 FDO_VER_FULL=${FDO_VER_MAJOR}.${FDO_VER_MINOR}.${FDO_VER_REV}
@@ -97,12 +98,76 @@
 FDO_BUILD_AREA=${BUILDROOT}/fdo_build_area
 FDO_FILELIST=${FDO_BUILD_AREA}/install/filelist
 
+shim_thirdparty_lib_paths()
+{
+    echo "[info]: Shimming include/lib paths"
+    # Note:
+    #
+    # FDO assumes you're going to be linking against an SDK whose directory structure
+    # is different from how system dev libraries are installed on Ubuntu, so we leverage the
+    # power of symlinks to set up the expected directory structure that points to the system
+    # headers and libraries, and modify setenvironment.sh to point to this shimmed directory
+    # structure
+    #
+    # This structure assumes you've apt-get installed the following:
+    #
+    #   libmysqlclient-dev libpq-dev
+    #
+    mkdir -p ~/fdo_rdbms_thirdparty_system/pgsql/$FDO_CPU
+    # PostgreSQL include path
+    if [ ! -d ~/fdo_rdbms_thirdparty_system/pgsql/$FDO_CPU/include ];
+    then
+        ln -s /usr/include/postgresql ~/fdo_rdbms_thirdparty_system/pgsql/$FDO_CPU/include
+        echo "[info]: Symlinked PostgreSQL include path"
+    else
+        echo "[info]: PostgreSQL include path already symlinked"
+    fi
+    # PostgreSQL lib path
+    if [ ! -d ~/fdo_rdbms_thirdparty_system/pgsql/$FDO_CPU/$LIB_DIRNAME ];
+    then
+        ln -s /usr/lib ~/fdo_rdbms_thirdparty_system/pgsql/$FDO_CPU/$LIB_DIRNAME
+        echo "[info]: Symlinked PostgreSQL lib path"
+    else
+        echo "[info]: PostgreSQL lib path already symlinked"
+    fi
+    mkdir -p ~/fdo_rdbms_thirdparty_system/mysql/$FDO_CPU
+    # MySQL include path
+    if [ ! -d ~/fdo_rdbms_thirdparty_system/mysql/$FDO_CPU/include ];
+    then
+        ln -s /usr/include/mysql ~/fdo_rdbms_thirdparty_system/mysql/$FDO_CPU/include
+        echo "[info]: Symlinked MySQL include path"
+    else
+        echo "[info]: MySQL include path already symlinked"
+    fi
+    # MySQL lib path
+    if [ ! -d ~/fdo_rdbms_thirdparty_system/mysql/$FDO_CPU/$LIB_DIRNAME ];
+    then
+        if [ ${FDO_PLATFORM} -eq 32 ]; 
+        then
+            ln -s /usr/lib/i386-linux-gnu ~/fdo_rdbms_thirdparty_system/mysql/$FDO_CPU/$LIB_DIRNAME
+            echo "[info]: Symlinked MySQL lib path (x86)"
+        else
+            ln -s /usr/lib/x86_64-linux-gnu ~/fdo_rdbms_thirdparty_system/mysql/$FDO_CPU/$LIB_DIRNAME
+            echo "[info]: Symlinked MySQL lib path (x64)"
+        fi
+    else
+        echo "[info]: MySQL lib path already symlinked"
+    fi
+}
+
 modify_sdk_paths()
 {
-	echo "[info]: Updating setenvironment.sh"
-	# Note: Change your paths here if they're different
-	sed -i 's/export FDOMYSQL=$FDOTHIRDPARTY\/mysql\/rhlinux/export FDOMYSQL=\/home\/vagrant\/fdo_rdbms_thirdparty\/mysql\/'"$FDO_CPU"'/g' ${FDO_BUILD_AREA}/setenvironment.sh
-	sed -i 's/export FDOPOSTGRESQL=$FDOTHIRDPARTY\/pgsql/export FDOPOSTGRESQL=\/home\/vagrant\/fdo_rdbms_thirdparty\/pgsql/g' ${FDO_BUILD_AREA}/setenvironment.sh
+    if [ ${UBUNTU} -eq 1 ];
+    then
+        echo "[info]: Updating setenvironment.sh"
+	    sed -i 's/export FDOMYSQL=$FDOTHIRDPARTY\/mysql\/rhlinux/export FDOMYSQL=\/home\/vagrant\/fdo_rdbms_thirdparty_system\/mysql\/'"$FDO_CPU"'/g' ${FDO_BUILD_AREA}/setenvironment.sh
+	    sed -i 's/export FDOPOSTGRESQL=$FDOTHIRDPARTY\/pgsql/export FDOPOSTGRESQL=\/home\/vagrant\/fdo_rdbms_thirdparty_system\/pgsql\/'"$FDO_CPU"'/g' ${FDO_BUILD_AREA}/setenvironment.sh
+    else
+        echo "[info]: Updating setenvironment.sh"
+	    # Note: Change your paths here if they're different
+	    sed -i 's/export FDOMYSQL=$FDOTHIRDPARTY\/mysql\/rhlinux/export FDOMYSQL=\/home\/vagrant\/fdo_rdbms_thirdparty\/mysql\/'"$FDO_CPU"'/g' ${FDO_BUILD_AREA}/setenvironment.sh
+	    sed -i 's/export FDOPOSTGRESQL=$FDOTHIRDPARTY\/pgsql/export FDOPOSTGRESQL=\/home\/vagrant\/fdo_rdbms_thirdparty\/pgsql/g' ${FDO_BUILD_AREA}/setenvironment.sh
+    fi
 	echo "export FDOORACLE=/home/vagrant/fdo_rdbms_thirdparty/oracle/${FDO_CPU}/instantclient_11_2/sdk" >> ${FDO_BUILD_AREA}/setenvironment.sh
 }
 
@@ -125,6 +190,11 @@
 start_time=`date +%s`
 REVISION=`svn info ${FDO_SRC} | perl revnum.pl`
 
+if [ ${UBUNTU} -eq 1 ];
+then
+    shim_thirdparty_lib_paths
+fi
+
 if [ -d ${FDO_INST} ];
 then
 	echo "[info]: Deleting directory ${FDO_INST} before build"

Added: trunk/Tools/Vagrant/sources/atomic.h
===================================================================
--- trunk/Tools/Vagrant/sources/atomic.h	                        (rev 0)
+++ trunk/Tools/Vagrant/sources/atomic.h	2014-04-29 11:14:57 UTC (rev 8084)
@@ -0,0 +1,127 @@
+#ifndef _ATOMIC_H
+#define _ATOMIC_H
+
+/**
+ * Atomic type.
+ */
+typedef struct {
+    volatile int counter;
+} atomic_t;
+
+#define ATOMIC_INIT(i)  { (i) }
+
+/**
+ * Read atomic variable
+ * @param v pointer of type atomic_t
+ *
+ * Atomically reads the value of @v.
+ */
+#define atomic_read(v) ((v)->counter)
+
+/**
+ * Set atomic variable
+ * @param v pointer of type atomic_t
+ * @param i required value
+ */
+#define atomic_set(v,i) (((v)->counter) = (i))
+
+/**
+ * Add to the atomic variable
+ * @param i integer value to add
+ * @param v pointer of type atomic_t
+ */
+static inline void atomic_add( int i, atomic_t *v )
+{
+         (void)__sync_add_and_fetch(&v->counter, i);
+}
+
+/**
+ * Subtract the atomic variable
+ * @param i integer value to subtract
+ * @param v pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v.
+ */
+static inline void atomic_sub( int i, atomic_t *v )
+{
+        (void)__sync_sub_and_fetch(&v->counter, i);
+}
+
+/**
+ * Subtract value from variable and test result
+ * @param i integer value to subtract
+ * @param v pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v and returns
+ * true if the result is zero, or false for all
+ * other cases.
+ */
+static inline int atomic_sub_and_test( int i, atomic_t *v )
+{
+        return !(__sync_sub_and_fetch(&v->counter, i));
+}
+
+/**
+ * Increment atomic variable
+ * @param v pointer of type atomic_t
+ *
+ * Atomically increments @v by 1.
+ */
+static inline void atomic_inc( atomic_t *v )
+{
+       (void)__sync_fetch_and_add(&v->counter, 1);
+}
+
+/**
+ * @brief decrement atomic variable
+ * @param v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1.  Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static inline void atomic_dec( atomic_t *v )
+{
+       (void)__sync_fetch_and_sub(&v->counter, 1);
+}
+
+/**
+ * @brief Decrement and test
+ * @param v pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1 and
+ * returns true if the result is 0, or false for all other
+ * cases.
+ */
+static inline int atomic_dec_and_test( atomic_t *v )
+{
+       return !(__sync_sub_and_fetch(&v->counter, 1));
+}
+
+/**
+ * @brief Increment and test
+ * @param v pointer of type atomic_t
+ *
+ * Atomically increments @v by 1
+ * and returns true if the result is zero, or false for all
+ * other cases.
+ */
+static inline int atomic_inc_and_test( atomic_t *v )
+{
+      return !(__sync_add_and_fetch(&v->counter, 1));
+}
+
+/**
+ * @brief add and test if negative
+ * @param v pointer of type atomic_t
+ * @param i integer value to add
+ *
+ * Atomically adds @i to @v and returns true
+ * if the result is negative, or false when
+ * result is greater than or equal to zero.
+ */
+static inline int atomic_add_negative( int i, atomic_t *v )
+{
+       return (__sync_add_and_fetch(&v->counter, i) < 0);
+}
+
+#endif


Property changes on: trunk/Tools/Vagrant/sources/patches
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Vagrant/sources/patches/fdo
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost/boost
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost/boost/cstdint.hpp
===================================================================
--- trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost/boost/cstdint.hpp	                        (rev 0)
+++ trunk/Tools/Vagrant/sources/patches/fdo/Thirdparty/boost/boost/cstdint.hpp	2014-04-29 11:14:57 UTC (rev 8084)
@@ -0,0 +1,511 @@
+//  boost cstdint.hpp header file  ------------------------------------------//
+
+//  (C) Copyright Beman Dawes 1999. 
+//  (C) Copyright Jens Mauer 2001  
+//  (C) Copyright John Maddock 2001 
+//  Distributed under the Boost
+//  Software License, Version 1.0. (See accompanying file
+//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//  See http://www.boost.org/libs/integer for documentation.
+
+//  Revision History
+//   31 Oct 01  use BOOST_HAS_LONG_LONG to check for "long long" (Jens M.)
+//   16 Apr 01  check LONGLONG_MAX when looking for "long long" (Jens Maurer)
+//   23 Jan 01  prefer "long" over "int" for int32_t and intmax_t (Jens Maurer)
+//   12 Nov 00  Merged <boost/stdint.h> (Jens Maurer)
+//   23 Sep 00  Added INTXX_C macro support (John Maddock).
+//   22 Sep 00  Better 64-bit support (John Maddock)
+//   29 Jun 00  Reimplement to avoid including stdint.h within namespace boost
+//    8 Aug 99  Initial version (Beman Dawes)
+
+
+#ifndef BOOST_CSTDINT_HPP
+#define BOOST_CSTDINT_HPP
+
+//
+// Since we always define the INT#_C macros as per C++0x, 
+// define __STDC_CONSTANT_MACROS so that <stdint.h> does the right
+// thing if possible, and so that the user knows that the macros 
+// are actually defined as per C99.
+//
+#ifndef __STDC_CONSTANT_MACROS
+#  define __STDC_CONSTANT_MACROS
+#endif
+
+#include <boost/config.hpp>
+
+//
+// Note that GLIBC is a bit inconsistent about whether int64_t is defined or not
+// depending upon what headers happen to have been included first...
+// so we disable use of stdint.h when GLIBC does not define __GLIBC_HAVE_LONG_LONG.
+// See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
+//
+#if defined(BOOST_HAS_STDINT_H)					\
+  && (!defined(__GLIBC__)					\
+      || defined(__GLIBC_HAVE_LONG_LONG)			\
+      || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17)))))
+
+// The following #include is an implementation artifact; not part of interface.
+# ifdef __hpux
+// HP-UX has a vaguely nice <stdint.h> in a non-standard location
+#   include <inttypes.h>
+#   ifdef __STDC_32_MODE__
+      // this is triggered with GCC, because it defines __cplusplus < 199707L
+#     define BOOST_NO_INT64_T
+#   endif 
+# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
+#   include <inttypes.h>
+# else
+#   include <stdint.h>
+
+// There is a bug in Cygwin two _C macros
+#   if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__)
+#     undef INTMAX_C
+#     undef UINTMAX_C
+#     define INTMAX_C(c) c##LL
+#     define UINTMAX_C(c) c##ULL
+#   endif
+
+# endif
+
+#ifdef __QNX__
+
+// QNX (Dinkumware stdlib) defines these as non-standard names.
+// Reflect to the standard names.
+
+typedef ::intleast8_t int_least8_t;
+typedef ::intfast8_t int_fast8_t;
+typedef ::uintleast8_t uint_least8_t;
+typedef ::uintfast8_t uint_fast8_t;
+
+typedef ::intleast16_t int_least16_t;
+typedef ::intfast16_t int_fast16_t;
+typedef ::uintleast16_t uint_least16_t;
+typedef ::uintfast16_t uint_fast16_t;
+
+typedef ::intleast32_t int_least32_t;
+typedef ::intfast32_t int_fast32_t;
+typedef ::uintleast32_t uint_least32_t;
+typedef ::uintfast32_t uint_fast32_t;
+
+# ifndef BOOST_NO_INT64_T
+
+typedef ::intleast64_t int_least64_t;
+typedef ::intfast64_t int_fast64_t;
+typedef ::uintleast64_t uint_least64_t;
+typedef ::uintfast64_t uint_fast64_t;
+
+# endif
+
+#endif
+
+namespace boost
+{
+
+  using ::int8_t;             
+  using ::int_least8_t;       
+  using ::int_fast8_t;        
+  using ::uint8_t;            
+  using ::uint_least8_t;      
+  using ::uint_fast8_t;       
+                     
+  using ::int16_t;            
+  using ::int_least16_t;      
+  using ::int_fast16_t;       
+  using ::uint16_t;           
+  using ::uint_least16_t;     
+  using ::uint_fast16_t;      
+                     
+  using ::int32_t;            
+  using ::int_least32_t;      
+  using ::int_fast32_t;       
+  using ::uint32_t;           
+  using ::uint_least32_t;     
+  using ::uint_fast32_t;      
+                     
+# ifndef BOOST_NO_INT64_T
+
+  using ::int64_t;            
+  using ::int_least64_t;      
+  using ::int_fast64_t;       
+  using ::uint64_t;           
+  using ::uint_least64_t;     
+  using ::uint_fast64_t;      
+                     
+# endif
+
+  using ::intmax_t;      
+  using ::uintmax_t;     
+
+} // namespace boost
+
+#elif defined(__FreeBSD__) && (__FreeBSD__ <= 4) || defined(__osf__) || defined(__VMS)
+// FreeBSD and Tru64 have an <inttypes.h> that contains much of what we need.
+# include <inttypes.h>
+
+namespace boost {
+
+  using ::int8_t;             
+  typedef int8_t int_least8_t;       
+  typedef int8_t int_fast8_t;        
+  using ::uint8_t;            
+  typedef uint8_t uint_least8_t;      
+  typedef uint8_t uint_fast8_t;       
+                     
+  using ::int16_t;            
+  typedef int16_t int_least16_t;      
+  typedef int16_t int_fast16_t;       
+  using ::uint16_t;           
+  typedef uint16_t uint_least16_t;     
+  typedef uint16_t uint_fast16_t;      
+                     
+  using ::int32_t;            
+  typedef int32_t int_least32_t;      
+  typedef int32_t int_fast32_t;       
+  using ::uint32_t;           
+  typedef uint32_t uint_least32_t;     
+  typedef uint32_t uint_fast32_t;      
+         
+# ifndef BOOST_NO_INT64_T          
+
+  using ::int64_t;            
+  typedef int64_t int_least64_t;      
+  typedef int64_t int_fast64_t;       
+  using ::uint64_t;           
+  typedef uint64_t uint_least64_t;     
+  typedef uint64_t uint_fast64_t;      
+
+  typedef int64_t intmax_t;
+  typedef uint64_t uintmax_t;
+
+# else
+
+  typedef int32_t intmax_t;
+  typedef uint32_t uintmax_t;
+
+# endif
+
+} // namespace boost
+
+#else  // BOOST_HAS_STDINT_H
+
+# include <boost/limits.hpp> // implementation artifact; not part of interface
+# include <limits.h>         // needed for limits macros
+
+
+namespace boost
+{
+
+//  These are fairly safe guesses for some 16-bit, and most 32-bit and 64-bit
+//  platforms.  For other systems, they will have to be hand tailored.
+//
+//  Because the fast types are assumed to be the same as the undecorated types,
+//  it may be possible to hand tailor a more efficient implementation.  Such
+//  an optimization may be illusionary; on the Intel x86-family 386 on, for
+//  example, byte arithmetic and load/stores are as fast as "int" sized ones.
+
+//  8-bit types  ------------------------------------------------------------//
+
+# if UCHAR_MAX == 0xff
+     typedef signed char     int8_t;
+     typedef signed char     int_least8_t;
+     typedef signed char     int_fast8_t;
+     typedef unsigned char   uint8_t;
+     typedef unsigned char   uint_least8_t;
+     typedef unsigned char   uint_fast8_t;
+# else
+#    error defaults not correct; you must hand modify boost/cstdint.hpp
+# endif
+
+//  16-bit types  -----------------------------------------------------------//
+
+# if USHRT_MAX == 0xffff
+#  if defined(__crayx1)
+     // The Cray X1 has a 16-bit short, however it is not recommend
+     // for use in performance critical code.
+     typedef short           int16_t;
+     typedef short           int_least16_t;
+     typedef int             int_fast16_t;
+     typedef unsigned short  uint16_t;
+     typedef unsigned short  uint_least16_t;
+     typedef unsigned int    uint_fast16_t;
+#  else
+     typedef short           int16_t;
+     typedef short           int_least16_t;
+     typedef short           int_fast16_t;
+     typedef unsigned short  uint16_t;
+     typedef unsigned short  uint_least16_t;
+     typedef unsigned short  uint_fast16_t;
+#  endif
+# elif (USHRT_MAX == 0xffffffff) && defined(__MTA__) 
+      // On MTA / XMT short is 32 bits unless the -short16 compiler flag is specified 
+      // MTA / XMT does support the following non-standard integer types 
+      typedef __short16           int16_t; 
+      typedef __short16           int_least16_t; 
+      typedef __short16           int_fast16_t; 
+      typedef unsigned __short16  uint16_t; 
+      typedef unsigned __short16  uint_least16_t; 
+      typedef unsigned __short16  uint_fast16_t; 
+# elif (USHRT_MAX == 0xffffffff) && defined(CRAY)
+     // no 16-bit types on Cray:
+     typedef short           int_least16_t;
+     typedef short           int_fast16_t;
+     typedef unsigned short  uint_least16_t;
+     typedef unsigned short  uint_fast16_t;
+# else
+#    error defaults not correct; you must hand modify boost/cstdint.hpp
+# endif
+
+//  32-bit types  -----------------------------------------------------------//
+
+# if UINT_MAX == 0xffffffff
+     typedef int             int32_t;
+     typedef int             int_least32_t;
+     typedef int             int_fast32_t;
+     typedef unsigned int    uint32_t;
+     typedef unsigned int    uint_least32_t;
+     typedef unsigned int    uint_fast32_t;
+# elif (USHRT_MAX == 0xffffffff)
+     typedef short             int32_t;
+     typedef short             int_least32_t;
+     typedef short             int_fast32_t;
+     typedef unsigned short    uint32_t;
+     typedef unsigned short    uint_least32_t;
+     typedef unsigned short    uint_fast32_t;
+# elif ULONG_MAX == 0xffffffff
+     typedef long            int32_t;
+     typedef long            int_least32_t;
+     typedef long            int_fast32_t;
+     typedef unsigned long   uint32_t;
+     typedef unsigned long   uint_least32_t;
+     typedef unsigned long   uint_fast32_t;
+# elif (UINT_MAX == 0xffffffffffffffff) && defined(__MTA__) 
+      // Integers are 64 bits on the MTA / XMT 
+      typedef __int32           int32_t; 
+      typedef __int32           int_least32_t; 
+      typedef __int32           int_fast32_t; 
+      typedef unsigned __int32  uint32_t; 
+      typedef unsigned __int32  uint_least32_t; 
+      typedef unsigned __int32  uint_fast32_t; 
+# else
+#    error defaults not correct; you must hand modify boost/cstdint.hpp
+# endif
+
+//  64-bit types + intmax_t and uintmax_t  ----------------------------------//
+
+# if defined(BOOST_HAS_LONG_LONG) && \
+   !defined(BOOST_MSVC) && !defined(__BORLANDC__) && \
+   (!defined(__GLIBCPP__) || defined(_GLIBCPP_USE_LONG_LONG)) && \
+   (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
+#    if defined(__hpux)
+     // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
+#    elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) || (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) || (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL)
+                                                                 // 2**64 - 1
+#    else
+#       error defaults not correct; you must hand modify boost/cstdint.hpp
+#    endif
+
+     typedef  ::boost::long_long_type            intmax_t;
+     typedef  ::boost::ulong_long_type   uintmax_t;
+     typedef  ::boost::long_long_type            int64_t;
+     typedef  ::boost::long_long_type            int_least64_t;
+     typedef  ::boost::long_long_type            int_fast64_t;
+     typedef  ::boost::ulong_long_type   uint64_t;
+     typedef  ::boost::ulong_long_type   uint_least64_t;
+     typedef  ::boost::ulong_long_type   uint_fast64_t;
+
+# elif ULONG_MAX != 0xffffffff
+
+#    if ULONG_MAX == 18446744073709551615 // 2**64 - 1
+     typedef long                 intmax_t;
+     typedef unsigned long        uintmax_t;
+     typedef long                 int64_t;
+     typedef long                 int_least64_t;
+     typedef long                 int_fast64_t;
+     typedef unsigned long        uint64_t;
+     typedef unsigned long        uint_least64_t;
+     typedef unsigned long        uint_fast64_t;
+#    else
+#       error defaults not correct; you must hand modify boost/cstdint.hpp
+#    endif
+# elif defined(__GNUC__) && defined(BOOST_HAS_LONG_LONG)
+     __extension__ typedef long long            intmax_t;
+     __extension__ typedef unsigned long long   uintmax_t;
+     __extension__ typedef long long            int64_t;
+     __extension__ typedef long long            int_least64_t;
+     __extension__ typedef long long            int_fast64_t;
+     __extension__ typedef unsigned long long   uint64_t;
+     __extension__ typedef unsigned long long   uint_least64_t;
+     __extension__ typedef unsigned long long   uint_fast64_t;
+# elif defined(BOOST_HAS_MS_INT64)
+     //
+     // we have Borland/Intel/Microsoft __int64:
+     //
+     typedef __int64             intmax_t;
+     typedef unsigned __int64    uintmax_t;
+     typedef __int64             int64_t;
+     typedef __int64             int_least64_t;
+     typedef __int64             int_fast64_t;
+     typedef unsigned __int64    uint64_t;
+     typedef unsigned __int64    uint_least64_t;
+     typedef unsigned __int64    uint_fast64_t;
+# else // assume no 64-bit integers
+#  define BOOST_NO_INT64_T
+     typedef int32_t              intmax_t;
+     typedef uint32_t             uintmax_t;
+# endif
+
+} // namespace boost
+
+
+#endif // BOOST_HAS_STDINT_H
+
+#endif // BOOST_CSTDINT_HPP
+
+
+/****************************************************
+
+Macro definition section:
+
+Added 23rd September 2000 (John Maddock).
+Modified 11th September 2001 to be excluded when
+BOOST_HAS_STDINT_H is defined (John Maddock).
+Modified 11th Dec 2009 to always define the
+INT#_C macros if they're not already defined (John Maddock).
+
+******************************************************/
+
+#if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \
+   (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C))
+//
+// For the following code we get several warnings along the lines of: 
+// 
+// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant 
+// 
+// So we declare this a system header to suppress these warnings. 
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4) 
+#pragma GCC system_header 
+#endif 
+
+#include <limits.h>
+# define BOOST__STDC_CONSTANT_MACROS_DEFINED
+# if defined(BOOST_HAS_MS_INT64)
+//
+// Borland/Intel/Microsoft compilers have width specific suffixes:
+//
+#ifndef INT8_C
+#  define INT8_C(value)     value##i8
+#endif
+#ifndef INT16_C
+#  define INT16_C(value)    value##i16
+#endif
+#ifndef INT32_C
+#  define INT32_C(value)    value##i32
+#endif
+#ifndef INT64_C
+#  define INT64_C(value)    value##i64
+#endif
+#  ifdef __BORLANDC__
+    // Borland bug: appending ui8 makes the type a signed char
+#   define UINT8_C(value)    static_cast<unsigned char>(value##u)
+#  else
+#   define UINT8_C(value)    value##ui8
+#  endif
+#ifndef UINT16_C
+#  define UINT16_C(value)   value##ui16
+#endif
+#ifndef UINT32_C
+#  define UINT32_C(value)   value##ui32
+#endif
+#ifndef UINT64_C
+#  define UINT64_C(value)   value##ui64
+#endif
+#ifndef INTMAX_C
+#  define INTMAX_C(value)   value##i64
+#  define UINTMAX_C(value)  value##ui64
+#endif
+
+# else
+//  do it the old fashioned way:
+
+//  8-bit types  ------------------------------------------------------------//
+
+#  if (UCHAR_MAX == 0xff) && !defined(INT8_C)
+#   define INT8_C(value) static_cast<boost::int8_t>(value)
+#   define UINT8_C(value) static_cast<boost::uint8_t>(value##u)
+#  endif
+
+//  16-bit types  -----------------------------------------------------------//
+
+#  if (USHRT_MAX == 0xffff) && !defined(INT16_C)
+#   define INT16_C(value) static_cast<boost::int16_t>(value)
+#   define UINT16_C(value) static_cast<boost::uint16_t>(value##u)
+#  endif
+
+//  32-bit types  -----------------------------------------------------------//
+#ifndef INT32_C
+#  if (UINT_MAX == 0xffffffff)
+#   define INT32_C(value) value
+#   define UINT32_C(value) value##u
+#  elif ULONG_MAX == 0xffffffff
+#   define INT32_C(value) value##L
+#   define UINT32_C(value) value##uL
+#  endif
+#endif
+
+//  64-bit types + intmax_t and uintmax_t  ----------------------------------//
+#ifndef INT64_C
+#  if defined(BOOST_HAS_LONG_LONG) && \
+    (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX) || defined(_LLONG_MAX))
+
+#    if defined(__hpux)
+        // HP-UX's value of ULONG_LONG_MAX is unusable in preprocessor expressions
+#       define INT64_C(value) value##LL
+#       define UINT64_C(value) value##uLL
+#    elif (defined(ULLONG_MAX) && ULLONG_MAX == 18446744073709551615ULL) ||  \
+        (defined(ULONG_LONG_MAX) && ULONG_LONG_MAX == 18446744073709551615ULL) ||  \
+        (defined(ULONGLONG_MAX) && ULONGLONG_MAX == 18446744073709551615ULL) || \
+        (defined(_LLONG_MAX) && _LLONG_MAX == 18446744073709551615ULL)
+
+#       define INT64_C(value) value##LL
+#       define UINT64_C(value) value##uLL
+#    else
+#       error defaults not correct; you must hand modify boost/cstdint.hpp
+#    endif
+#  elif ULONG_MAX != 0xffffffff
+
+#    if ULONG_MAX == 18446744073709551615U // 2**64 - 1
+#       define INT64_C(value) value##L
+#       define UINT64_C(value) value##uL
+#    else
+#       error defaults not correct; you must hand modify boost/cstdint.hpp
+#    endif
+#  elif defined(BOOST_HAS_LONG_LONG)
+     // Usual macros not defined, work things out for ourselves:
+#    if(~0uLL == 18446744073709551615ULL)
+#       define INT64_C(value) value##LL
+#       define UINT64_C(value) value##uLL
+#    else
+#       error defaults not correct; you must hand modify boost/cstdint.hpp
+#    endif
+#  else
+#    error defaults not correct; you must hand modify boost/cstdint.hpp
+#  endif
+
+#  ifdef BOOST_NO_INT64_T
+#   define INTMAX_C(value) INT32_C(value)
+#   define UINTMAX_C(value) UINT32_C(value)
+#  else
+#   define INTMAX_C(value) INT64_C(value)
+#   define UINTMAX_C(value) UINT64_C(value)
+#  endif
+#endif
+# endif // Borland/Microsoft specific width suffixes
+
+#endif // INT#_C macros.
+
+
+
+


Property changes on: trunk/Tools/Vagrant/sources/patches/mapguide
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Vagrant/sources/patches/mapguide/Oem
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Include
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Include/cs_Geocon.h
===================================================================
--- trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Include/cs_Geocon.h	                        (rev 0)
+++ trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Include/cs_Geocon.h	2014-04-29 11:14:57 UTC (rev 8084)
@@ -0,0 +1,458 @@
+/*
+ * Copyright (c) 2008, Autodesk, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of the Autodesk, Inc. nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Autodesk, Inc. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL Autodesk, Inc. OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/******************************************************************************
+*******************************************************************************
+**                                                                           **
+**    US GEOCON (2012) Data Files  (e.g. dela?.b, delo?.b & dev.b files)     **
+**                  (also geoid99.bin & g2012a??.bin files)                  **
+**                                                                           **
+**	This is the CS-MAP rendition of the US National Geodetic Survey's grid   **
+**	system for converting from NAD83/HARN to NAD83/2011.  Thus, to get from, **
+**	say, NAD27, to NAD83/2011 one needs to:                                  **
+**		1> use NADCON to convert from NAD27 to NAD83, then                   **
+**		2> Use HARN to convert from NAD83 to HARN, then                      **
+**		3> Use GEOCON with the appropriate grid files to convert from        **
+**		   HARN to NAD83/2011                                                **
+**                                                                           **
+**	As of this writing, we are assuming NAD83/2012 is just another           **
+**	name for NAD83/2011. We are not at all sure exactly how to distinguish   **
+**	between a 2007 and a 2011 grid data file.  Hopefully, we'll be able to   **
+**	figure this all out when we have some code running which will enable to  **
+**	examine the results using different grid data files.                     **
+**                                                                           **
+**	We have used a 5 character naming system since the origin of CS-MAP      **
+**  in 1987 (when function names were limited to 8 characters (seven in      **
+**	some compiler/linker products).  Thus, we have chosen to use the         **
+**	following names as appropriate in the Geodetic Transformation naming     **
+**	convention: "geocn", "cs_Geocn_".                                        **
+**                                                                           **
+**	Note that the grid file formats and calculation algorithms are the same  **
+**	as that used in the NGS's Geoid 1999 grid effort.  Thus, we have most    **
+**	all of the code necessary to implement this new grid file based          ** 
+**	transformation.  Question as I write this comment: Do we isolate the     **
+**	Geoid99 code and rename it so that it takes on the more generic          **
+**	function which has mow made itself evident?  Think so, especially since  **
+**	data files in this same format are used for the vertical portion of the  **
+**	base geodetic transformation, and also for using the quality of          **
+**	conversion data files associated with this geodetic transformation.      **
+**                                                                           **
+**	Another reason for isolating/renaming/refactoring is that our new        **
+**	Geodetic Transformation paradigm requires several new functions which    **
+**	do not exist in the original Geoid 1999 implementation.                  **
+**                                                                           **
+**	So, the end result of these deliberations is that much of what you       **
+**	find in this header file and its corresponding implementation file(s)    **
+**	is a cut/paste/replace of the code previously existing in cs_map.h and   **
+**	CS_geoid99.c with struct and function names such as csGeoid99GridFile_   **
+**	and CSnewGeoid99GridFile.  The new names will adhere to the naming       **
+**	system used in the rewrite of Geodetic Transformations initiated by      **
+**	RFC 2.                                                                   **
+**                                                                           **
+**	The actual, "official", NGS code for doing this transformation           **
+**	is written in (drum roll please) FORTRAN.  For integrity purposes, the   **
+**	actual FORTRAN code is included as a huge comment at the tail end of     **
+**	implementation file associated with this header file.                    ** 
+**                                                                           **
+**	The data files for this geodetic conversion, as it applies to
+**	NAD832007 and(?) NAD83/2011 come in groups of 6.  Our implementation     **
+**  relies pretty heavily on this nameing convention in order to get the     **
+**	data files properly paired with each other.  Since the coverage and      **
+**	grid cell size are the same in each of a paired set, a comparison of     **
+**	these values is done at construction time to insure that the files are   **
+**	being properly paired with each other.                                   **     
+**                                                                           **
+**	dela.b		--> conterminous 48 states, latitude shift                   **
+**	delo.b		--> conterminous 48 states, longitude shift                  **
+**	dev.b		--> conterminous 48 states, vertical shift                   **		
+**	dsla.b		--> conterminous 48 states, latitude shift quality estimate  **
+**	dslo.b		--> conterminous 48 states, longitude shift quailty estimate **
+**	dsv.b		--> conterminous 48 states, vertical shift quality estimate  **
+**                                                                           **
+**	delaa.b		--> Alaska, latitude shift                                   **
+**	deloa.b		--> Alaska, longitude shift                                  **
+**	deva.b		--> Alaska, vertical shift                                   **
+**	dslaa.b		--> Alaska, latitude shift quality estimate                  **
+**	dsloa.b		--> Alaska, longitude shift quailty estimate                 **
+**	dsva.b		--> Alaska, vertical shift quality estimate                  **
+**                                                                           **
+**	delap.b		--> Puerto Rico/Virgin Is, latitude shift                    **
+**	delop.b		--> Puerto Rico/Virgin Is, longitude shift                   **
+**	devp.b		--> Puerto Rico/Virgin Is, vertical shift                    **
+**	dslap.b		--> Puerto Rico/Virgin Is, latitude shift quality estimate   **
+**	dslop.b		--> Puerto Rico/Virgin Is, longitude shift quailty estimate  **
+**	dsvp.b		--> Puerto Rico/Virgin Is, vertical shift quality estimate   **
+**                                                                           **
+**	Presumably, in the future there may be an 'h' series for Hawaii, but     **
+**	no such data files have been found for Hawaii.                           **
+**                                                                           **
+**	Finally, there are files with names such as infoh.txt, infoha.txt, and   **
+**	infohp.txt.  These files contain the locations of holes in the           **
+**	related grid files.  Currently, we do not use them at all, although      **
+**	you might see some "future use provisions" for such.                     **
+**                                                                           **
+*******************************************************************************
+******************************************************************************/
+
+/*	United States 2012 Grid File Object  (GEOCON)
+
+These file types are used for several different purposes.  While
+not crucial, we like to identify each of the grid structures as to
+the purpose of the file it represents.
+
+Applications in which this file format is used:
+
+	1> NAD83/HARN to NAD83/2012 geodetic cconversions,
+	   both horizontal and vertical  (ext = .b)
+	2> Geoid 2012 Height calculation (ext = .bin)
+	3> Geoid 2009 Height calculation (ext = .bin)
+	4> Geoid 2003 Height calculation (ext = .bin)
+	5> Geoid 1999 Height calculation (ext = .bin)
+
+Note sure at the current time if we'll be able to distinguish a 2007
+grid file from a 2007 grid file.  Thus, this distinction may disappear.
+*/
+
+/* The following very arbitrary value is returned by functions
+   which typically return a grid shift value extracted from a
+   GEOCON grid file when an error is detected. This condition
+   is quite unimaginable, so a huge number which will not
+   go unnoticed in reaults has been chosen. */
+#define csGEOCON_SHIFT_ERROR -9.9E+12;
+
+enum csGeocnFileType {	geocnTypeNoneYet = 0,
+						geocnTypeLatShift,
+						geocnTypeLngShift,
+						geocnTypeHgtShift,
+						geocnTypeGeoidHgt,
+						geocnTypeUnknown = 999
+					  };
+
+enum csGeocnEdgeEffects {	geocnEdgeNone = 0,
+							geocnEdgeSouthwest,
+							geocnEdgeSouth,
+							geocnEdgeSoutheast,
+							geocnEdgeEast,
+							geocnEdgeNortheast,
+							geocnEdgeNorth,
+							geocnEdgeNorthwest,
+							geocnEdgeWest,
+							geocnEdgeUnknown
+					    };
+
+/* Geocon Grid Cell Object -->  Used to hold the definition of a grid cell.
+   A Geocon frid cell is similar in function to the grid cell (with an
+   unqualified name) which is used in the NADCON and NTv2 datum shift
+   calculations. However, a Geocon grid cell carries nine data values
+   in a array of nine doubles. The interpolation is therefore, a bit more
+   mathematically rigourous that the standard bi-linear interpolation used
+   in the NADCON and NTv2 environments.
+
+   The grid cell is identified by the grid indices (zero based in our case)
+   of the central data element. The data extraction algorithm always extracts
+   a cell such that the point being converted is closer to the central
+   point than any of the others.  Thus, when determining if we can use
+   a specific grid cell, we will use the integral indicies rather than
+   a range of coverage type calculation.
+
+   The array of doubles is used as follows:
+   
+		IDX            [0]   [1]   [2]
+
+		                    NORTH
+
+		[2]     W      nw     n    ne      E
+		[1]     E      w     ctr    e      A
+		[0]     S      sw     s    se      S
+		  	    T                          T 
+				            SOUTH
+
+   Note that the first record in the data files is the southernmost record,
+   amd that the values in each record start at the western edge and run to
+   the eastern edge (i.e. left to right, west to east).
+
+*/
+struct csGeocnGridCell_
+{
+	short isValid;				/* TRUE if this cell accurately represents data
+								   data extracted from the associated grid data
+								   file; otherwise FALSE. */
+	short cellAge;				/* A cell is aged (i.e. the age element incremented
+								   by one) for each conversion which takes place.
+								   A cell's age is set to zero whenever the cell is
+								   actually used to performa a conversion.  This
+								   is intended to support a possible future
+								   performance enhancement of a grid cell cahce.
+								   This is not currently implemented.*/
+	enum csGeocnEdgeEffects edge;
+								/* The appropriate edge effect calculation in
+								   force for this grid cell. */
+	long32_t lngIdx;			/* longitude grid file index value associated
+								   with cellData [0][0] element of the grid
+								   cell. */
+	long32_t latIdx;			/* latitude grid file index value associated
+								   with cellData [0][0] element of the grid
+								   cell. */
+	double swLng;				/* Longitude, in degrees, of the southwest
+								   point of the southwest value of the 3x3 grid
+								   cell matrix. */
+	double swLat;				/* Latitude, in degrees, of the southwest
+								   point of the southwest value of the 3x3 grid
+								   cell matrix. */
+	double deltaLng;			/* dimensions of cell, in degrees; for
+								   Geocon files this is often 0.0166666666666667,
+								   a rather ugly number for us to deal with. */
+	double deltaLat;			/* dimensions of cell, in degrees; for
+								   Geocon files this is often 0.0166666666666667,
+								   a rather ugly number for us to deal with. */
+
+	double cellData [3][3];		/* For performance purposes, cells carry data
+								   values pre-converted to doubles. */
+
+	char sourceId [32];			/* File name of the source of the grid cell data. */
+};
+
+/* The following represents the data contained in the header of
+   a GEOCON grid data file.  Note, to avoid compiler packing
+   issues, we do not read this structure directly from disk;
+   each element is read individually and stored in a structure
+   of this form simply for covenience.
+   
+   Note that the latitude and longitude values in this structure
+   are assumed to be NAD83/HARN based.  Further, we assume that
+   for geoid height calculations, the datum to which the geographic
+   coordinates are based are considered immaterial, but probably
+   the datum of the indicated geoid.
+   
+   Note, that the grid carried in one of these files, given the
+   information extracted from the header, is essentially as follows:
+   
+	   float cs_GeocnGridFileData [latCount][lngCount];
+   
+   where element [0][0] is the grid shift value for a point
+   precisely at latitude = latMin and longitude = lngMin.
+
+   Horizontal datum shift values are floats, in	arc-seconds * 100,000.00 (~ 0.3 mm)
+   Verical datum shift values are floats in centimeters.
+   Geoid height data elements are in meters.
+*/
+struct cs_GeoconFileHdr_
+{
+	double latMin;			/* Southernmost latitude covered in the file,
+							   in degrees. */
+	double lngMin;			/* Westernmost longitude covered in the file,
+							   0 thru 360, positive east from Greenwich. */
+	double latDelta;		/* Latitudinal grid cell size, in degrees. */
+	double lngDelta;		/* Longitudinal grid cell size, in degrees. */
+	long32_t latCount;		/* Latitudinal size of the grid, i.e. number of
+							   rows datum shift records in the grid file. */
+	long32_t lngCount;		/* Longitudinal size of the grid, i.e. the number
+							   of datum shift values in each record of the
+							   grid file. */
+	long32_t iKind;			/* Generally, a value of +1 means no swapping
+							   required, i.e. the file is in byte order of
+							   the host platform already.  Any other value
+							   probably means swapping is required on
+							   the current host machine. */
+	long32_t headerSize;	/* Actual size of the header in the file
+							   from which it was extracted; not necessarily
+							   the sizeof this structure for several reasons.*/
+};
+#define cs_BSWP_GeocnHdr "ddddlll"
+
+/******************************************************************************
+*******************************************************************************
+**          cs_GeoconFile_  -->  A Single GEOCON file Object                 **
+**                                                                           **
+**	While two such files are required to perform a datum shift (e.g. HARN    **
+**	to NAD83/2007), a single file is used for other purposes such as geoid   **
+**	height calculations.  Thus, is it convenient to have an object which can **
+**	be used independently to access a single file of this type.              **
+**                                                                           **
+**	While not really used in any way, we do our best to classify the file    **
+**	type and purpose to aid in debugging. The need for byte swappping is     **
+**	determined by a static data constant which indicates the byte order of   **
+**	the processor we are running on, and examination of the data in the      **
+**	file header.  I.e. the first two elements in the header are 8 byte       **
+**	doubles which are a valid latitude and a valid ongitude values.  Clearly **
+**	we swap if necessary to get values which meet this criteria.			 **
+**                                                                           **
+**	Files are now heavily buffered.  In fact, in some cases the	entire file  **
+**	resides in memory after the first access.  In such cases, the file       **
+**	stream will be closed.  Note, the typical GEOCON Grid Data file is more  **
+**	than 25 megabytes.  Since two are required for a horizontal datum shift, **
+**  buffering the entire file(s) would normally consume 50 megabytes of      **
+**	memory.  We won't do that unless it is really necessary for performance  **
+**  purposes.                                                                **
+**                                                                           **
+**	Please note that the grid cell size on GEOCON files is often set to      **
+**	rather painful values.  I.e. the most popular of the several files uses  **
+**	a geoid cell size of 0.0166666667 degrees (one minute of arc).  This is  **
+**	is a rather unfriendly value to work with in a digital computer and      **
+**	produces all sorts of strange bugs when working on the edge of a grid    **
+**	cell or the entire grid itself.  Watch out for these problems.  Make     **
+**	sure that, when using these types of values, you get extended precision  **
+**	rather than just what appears in the files.  To accomplish this, you are **
+**	likely to find that min/max type calculations are done using integers    **
+**	carrying seconds of arc to insure maximum precison is obtained.          **
+**                                                                           **
+*******************************************************************************
+******************************************************************************/
+
+/* The following is what a US GEOCON Grid file, looks like in memory,
+   regardless of its function.
+*/
+
+struct cs_GeoconFile_
+{
+	enum csGeocnFileType type;			/* Type of file. */
+
+	double latMin;						/* Latitude of the the southwest corner
+										   of the grid in decimal degrees. */
+	double lngMin;						/* Longitude of the the southwest corner
+										   of the grid in decimal degrees.
+										   This value rangs from 0.0 to +360.0. */
+	double latMax;						/* Latitude of the northeast corner
+										   of the grid in decimal degrees. */
+	double lngMax;						/* Longitude of the the northeast corner
+										   of the grid in decimal degrees.
+										   This value rangs from 0.0 to +360.0. */
+
+	double deltaLng;					/* size of a grid cell in degrees */
+	double deltaLat;					/* size of a grid cell in degrees */
+	double density;						/* smaller of the two deltas, just
+										   in case they ever are different. */
+
+	long32_t elementCount;				/* elements per record */
+	long32_t recordCount;				/* number of records in the file */
+	long32_t elementSize;				/* size of the internal elements,
+										   i.e. sizeof (float). */
+	long32_t headerSize;				/* size of the file header, in
+										   bytes. */
+	long32_t recordSize;				/* size in bytes of a record for
+										   I/O and buffer management
+										   purposes. This includes the 32 bit
+										   record size word that FORTRAN likes
+										   to put on the fron and end of records
+										   in an unformatted (i.e. binary) data
+										   file. */
+	long32_t fileSize;				/* size of complete file on disk,
+									   stream will be closed if
+									   bufferSize == fileSize */
+	long32_t bufferSize;			/* size of buffer allocated */
+	long32_t bufferBeginPosition;	/* file position of 1st byte in buffer,
+									   -1 says nothing in buffer */
+	long32_t bufferEndPosition;		/* file position of last byte in buffer,
+									   -2 says nothing in buffer */
+	csFILE* strm;					/* file is not opened until required,
+									   may be closed if entire contents
+									   have been buffered. */
+	void *dataBuffer;				/* not allocated until required, i.e.
+									   file is actually opened. */
+	short swapBytes;				/* True (+1) indicates that byte swapping
+									   is necessary in the current
+									   environment. */
+	char filePath [MAXPATH];		/* Full path name to the file. */
+	char fileName [32];				/* Last 31 characters of the actual
+									   file name (sans ext); used to generate
+									   point data ID's. */
+	struct csGeocnGridCell_ gridCell;
+									/* Last used grid cell. */
+};
+
+/* The following structure combines three GEOCON Grid file structures into a
+   single object capable of doing a 2D/3D datum shift, i.e. a horizontal datum
+   shift or a horizontal and vertical datum shift.
+
+   Since this is a grid file interpolation method based on just another grid
+   file format, the function protocols are designed to fit within the design
+   of the existing grid file.
+*/
+
+struct cs_Geocn_
+{
+	short verticalAvailable;	/* Redundant? Equivalent to hgtShift != NULL */
+
+	double minLng;				/*    0.0 <= minLng <  360.0 */
+	double minLat;				/*  -90.0 <  minLat <=  90.0 */
+	double maxLng;				/* minLng <  maxLng <= 360.0 */
+	double maxLat;				/*  -90.0 <  minLat <=  90.0 */
+	double density;				/* smaller of the two cell dimensions in degrees,
+								   usually 0.0166666667 for these types of files. */
+
+	/* The two dimensional inverse reqires iteration.  Thus, the following
+	   values are used to deal with the remote possibility that the interation
+	   doesn't converge.
+	   
+	      *	If, after maxIterations, the delta value remains >= errorValue,
+			the transformation is reported as a fatal error.
+		  * If, after maxIterations, the delta value is less than errorValue
+		    but >= convergeValue, the transformation is treated as a failure
+		    to converge.
+		  * The iteration loop is considered successful and complete when the
+			delta value is lkess than cnvrgValue.
+		  *	The loop never iterates more than maxIterations.
+	*/
+	double errorValue;
+	double cnvrgValue;
+	short maxIterations;
+
+	struct cs_GeoconFile_* lngShift;
+	struct cs_GeoconFile_* latShift;
+	struct cs_GeoconFile_* hgtShift;	/* Could be null if vertical option
+										   is not activated. */
+};
+
+struct cs_GeoconFile_* CSnewGeoconFile (Const char* filePath,long32_t bufferSize,
+															 ulong32_t flags,
+															 double density,
+															 enum csGeocnFileType fileType);
+int CSpathsGeoconFile (char *pathBufferLng,char *pathBufferLat,char *pathBufferHgt,
+															   Const char *pathBuffer);
+int CSheaderGeoconFile (struct cs_GeoconFileHdr_ *thisPtr,csFILE *fstr);
+int CSchkHdrGeoconFile (struct cs_GeoconFileHdr_ *thisPtr);
+
+void CSinitGeoconFile (struct cs_GeoconFile_ *thisPtr);
+void CSreleaseGeoconFile (struct cs_GeoconFile_* thisPtr);
+void CSdeleteGeoconFile (struct cs_GeoconFile_* thisPtr);
+double CStestGeoconFile (struct cs_GeoconFile_* thisPtr,Const double *sourceLL);
+int CScalcGeoconFile (struct cs_GeoconFile_* thisPtr,double* result,Const double* sourceLL);
+int CSextractGeoconGridFile (struct csGeocnGridCell_ *gridCellPtr,struct cs_GeoconFile_* thisPtr,
+																  long32_t eleNbr,
+																  long32_t recNbr);
+int CSreadGeoconGridFile (struct cs_GeoconFile_* thisPtr,long32_t recNbr);
+double CSvalueGeoconGridFile (struct cs_GeoconFile_* thisPtr,long32_t eleNbr,
+															 long32_t recNbr);
+int CSedgeGeocnGridCell (struct csGeocnGridCell_ *cellPtr,struct cs_GeoconFile_* filePtr,
+														  long32_t eleNbr,
+														  long32_t recNbr,
+														  enum csGeocnEdgeEffects edge);
+void CSinitGeocnGridCell (struct csGeocnGridCell_* thisPtr);
+double CScalcGeocnGridCell (struct csGeocnGridCell_* thisPtr,Const double *sourceLL);
+const char *CSsourceGeocnGridCell (struct csGeocnGridCell_* thisPtr);
+double EXP_LVL9 CSgeocnQterp (struct csGeocnGridCell_* thisPtr,double sourceDelta [2]);
+double EXP_LVL9 CSgeocnQterpOne (double delta,double rowData [3]);


Property changes on: trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source
___________________________________________________________________
Added: bugtraq:number
   + true

Added: trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/CSdata.c
===================================================================
--- trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/CSdata.c	                        (rev 0)
+++ trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/CSdata.c	2014-04-29 11:14:57 UTC (rev 8084)
@@ -0,0 +1,657 @@
+/*
+ * Copyright (c) 2008, Autodesk, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in the
+ *       documentation and/or other materials provided with the distribution.
+ *     * Neither the name of the Autodesk, Inc. nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Autodesk, Inc. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL Autodesk, Inc. OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include "cs_map.h"
+#include "cs_Legacy.h"
+
+/*
+	The following defines and declarations are used to
+	access the various data files required by CS_MAP.
+
+	NOTE:  cs_DirP MUST point to the terminating null
+	character of the string contained in the cs_Dir
+	array.  cs_Dir MUST end with a directory separation
+	character.  If you modify the initialization of
+	cs_Dir, YOU MUST ALSO MODIFY THE INITIALIZATION OF
+	cs_DirP.
+*/
+
+#if _RUN_TIME < _rt_UNIXPCC
+char cs_DirK [MAXPATH] = "C:\\ProgramData\\GeodeticData";
+csThread char cs_Dir [MAXPATH] = "";
+csThread char *cs_DirP = NULL;
+csThread char cs_UserDir [MAXPATH] = "";
+char cs_DirsepC = '\\';
+char cs_ExtsepC = '.';
+char cs_OptchrC = '/';
+char cs_EnvchrC = '%';
+char cs_EnvStartC = '%';
+char cs_EnvEndC = '%';
+wchar_t cs_DirsepWC = L'\\';
+wchar_t cs_ExtsepWC = L'.';
+wchar_t cs_OptchrWC = L'/';
+wchar_t cs_EnvchrWC = L'%';
+wchar_t cs_EnvStartWC = L'%';
+wchar_t cs_EnvEndWC = L'%';
+csThread char cs_NameMapperName [MAXPATH] = "NameMapper.csv";
+#else
+char cs_DirK [MAXPATH] = "/usr/etc/GeodeticData/";
+char cs_Dir [MAXPATH] = "";
+char *cs_DirP = NULL;
+char cs_UserDir [MAXPATH] = "";
+char cs_DirsepC = '/';
+char cs_ExtsepC = '.';
+char cs_OptchrC = '-';
+char cs_EnvchrC = '$';
+char cs_EnvStartC = '{';
+char cs_EnvEndC = '}';
+wchar_t cs_DirsepWC = L'/';
+wchar_t cs_ExtsepWC = L'.';
+wchar_t cs_OptchrWC = L'-';
+wchar_t cs_EnvchrWC = L'$';
+wchar_t cs_EnvStartWC = L'{';
+wchar_t cs_EnvEndWC = L'}';
+wchar_t cs_NameMapperName [MAXPATH] = L"NameMapper.csv";
+#endif
+
+/*
+	The following are used in CS_atof and CS_ftoa for the
+	conversion of numbers to/from ASCII.  Modify as appropriate
+	for the current locale.
+*/
+
+char cs_DecpntC = '.';
+char cs_DigsepC = ',';
+char cs_RatioC  = ':';
+char cs_LngDir [6] = "EeWw";
+char cs_LatDir [6] = "NnSs";
+
+/*
+	The following array contains the set of characters which
+	are considered valid for coordinate system, datum, and
+	ellipsoid key names. The test occurs in the CS_nampp function.
+
+	Note, as of Release 8, we allow a space character. The
+	name preprocessor, CS_nampp, will flag a double space as
+	an error, however. Also, as of release 8, we no longer
+	convert key names to upper case. However, all comparisions
+	remain case Insensitive.
+
+	As of Release 9, all alpha numeric characters are tested by
+	hard code in the CS_nampp module.  This string now only
+	contains the special characters (i.e. non-alphanumeric)
+	which are allowed.  Note that cs_Unique need not be included
+	in this string. Include a space in this string if you want to
+	support spaces in key names.  CS_nampp will enforce a
+	restriction which does not allow two consectuive spaces.
+	If the underscore is included in this list, it will be
+	considered acceptable as the first alphanumeric in a key name.
+*/
+
+Const char cs_Nmchset [32] = " _-$:.;~/";
+
+/*
+	As of release 5.0, the names of the Coordinate System, Datums,
+	and Elipsoid dictionaries are maintained here. Should your
+	application desire to use names other than the standard names,
+	you may change them here and recompile or use the CS_csnam,
+	CS_dtnam, or CS_elnam functions at runtime.
+
+	Of course, you could just copy to these global variables, but
+	the function interface provides a bit more insulation from
+	future changes in the system.
+*/
+
+csThread char cs_Csname  [cs_FNM_MAXLEN]      = cs_CS_NAME;
+csThread char cs_Dtname  [cs_FNM_MAXLEN]      = cs_DAT_NAME;
+csThread char cs_Elname  [cs_FNM_MAXLEN]      = cs_ELL_NAME;
+csThread char cs_Ctname  [cs_FNM_MAXLEN]      = cs_CT_NAME;
+csThread char cs_Gxname  [cs_FNM_MAXLEN]      = cs_GX_NAME;
+csThread char cs_Gpname  [cs_FNM_MAXLEN]      = cs_GP_NAME;
+
+csThread char cs_Envvar  [cs_FNM_MAXLEN]      = cs_ENV_VAR;
+csThread char cs_NmMapNm [cs_FNM_MAXLEN]      = cs_NMP_NAME;
+
+csThread char cs_NadName     [cs_FNM_MAXLEN]  = cs_NAD_NAME;
+csThread char cs_HarnName    [cs_FNM_MAXLEN]  = cs_HARN_NAME;
+csThread char cs_GeoidName   [cs_FNM_MAXLEN]  = cs_GEOID_NAME;
+csThread char cs_VertconName [cs_FNM_MAXLEN]  = cs_VERTCON_NAME;
+csThread char cs_Agd66Name   [cs_FNM_MAXLEN]  = cs_AGD66_NAME;
+csThread char cs_Agd84Name   [cs_FNM_MAXLEN]  = cs_AGD84_NAME;
+csThread char cs_Nzgd49Name  [cs_FNM_MAXLEN]  = cs_NZGD49_NAME;
+csThread char cs_Ats77Name   [cs_FNM_MAXLEN]  = cs_ATS77_NAME;
+csThread char cs_CsrsName    [cs_FNM_MAXLEN]  = cs_CSRS_NAME;
+csThread char cs_Csrs27Name  [cs_FNM_MAXLEN]  = cs_CSRS27_NAME;
+csThread char cs_Jgd2kName   [cs_FNM_MAXLEN]  = cs_JGD2K_NAME;
+csThread char cs_Ed50Name    [cs_FNM_MAXLEN]  = cs_ED50_NAME;
+csThread char cs_Rgf93Name   [cs_FNM_MAXLEN]  = cs_RGF93_NAME;
+csThread char cs_DhdnName    [cs_FNM_MAXLEN]  = cs_DHDN_NAME;
+csThread char cs_Ch1903Name  [cs_FNM_MAXLEN]  = cs_CH1903_NAME;
+csThread char cs_N27A77Name  [cs_FNM_MAXLEN]  = cs_N27A77_NAME;
+
+/*
+	The following array supports the enumerator for GDC file
+	names.  This is used in the GDC file editor.  Adding a new
+	file to this array will, essentially, add it to the
+	GDC File Editor.
+
+	This array is also used for the functions which enable
+	applications to change the default names.  While
+	applications can modify the global variables directly,
+	this is no longer recommended.  When connvenient,
+	change your application to use the new name change
+	functions.
+
+	Note, that gdcFileNone marks the end of the table.
+*/
+struct cs_GdcCatalogTable_ cs_GdcCatalogTable [] =
+{
+	{  gdcFileNad27ToNad83, cs_NadName    ,	gdcTypeHorizontal,       0UL, ".las.los.gsb.dac",    "NADCON files (*.l?s)|*.l?s|Canadian Ntv2 (*.gsb)|*.gsb|Canadian Ntv1 (*.dac)|*.dac||"},
+	{   gdcFileNad83ToHarn, cs_HarnName   ,	gdcTypeHorizontal,       0UL, ".las.los"            ,"NADCON files (*.l?s)|*.l?s||"              },
+	{  gdcFileAgd66ToGda94, cs_Agd66Name  ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Canadian Ntv2 format (*.gsb)|*.gsb||"      },
+	{  gdcFileAgd84ToGda94, cs_Agd84Name  ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Canadian Ntv2 format (*.gsb)|*.gsb||"      },
+	{gdcFileNzgd49ToNzgd2K, cs_Nzgd49Name ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Canadian Ntv2 format (*.gsb)|*.gsb||"      },
+	{   gdcFileAts77ToCsrs, cs_Ats77Name  ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Canadian Ntv2 format (*.gsb)|*.gsb||"      },
+	{   gdcFileNad83ToCsrs, cs_CsrsName   ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Canadian Ntv2 format (*.gsb)|*.gsb||"      },
+	{  gdcFileTokyoToJgd2k, cs_Jgd2kName  ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Japanese Grid format (*.par)|*.par||"      },
+	{   gdcFileNad27ToCsrs, cs_Csrs27Name ,	gdcTypeHorizontal,       0UL, ".gsb.gdc"            ,"Canadian Ntv2 format (*.gsb)|*.gsb|Ats77 Geodetic Data Catalog (*.gdc)|*.gdc||"},
+	{  gdcFileEd50ToEtrf89, cs_Ed50Name   ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Canadian Ntv2 format (*.gsb)|*.gsb||"      },
+	{  gdcFileDhdnToEtrf89, cs_DhdnName   ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"Canadian Ntv2 format (*.gsb)|*.gsb||"      },
+	{  gdcFileNad27ToAts77, cs_N27A77Name ,	gdcTypeHorizontal,       0UL, ".gsb"                ,"ATS77 Transform files (*.DAT)|*.DAT"       },
+	{   gdcFileGeoidHeight, cs_GeoidName  ,	gdcTypeSeparation,       0UL, ".geo.bin.byn.txt.grd","Geoid96 (*.geo)|*.geo|Geoid99 (*.bin)|*.bin|Canadian (*.byn)|*.byn|UK OSGM91 (*.txt)|*.txt|EGM96 (*.grd)|*.grd||"},
+	{       gdcFileVertcon, cs_VertconName,	gdcTypeVertical,         0UL, ".94"                 ,"Vertcon files (*.94)|*.94||"               },
+	{    gdcFileRgf93ToNtf, cs_Rgf93Name  ,	gdcTypeThreeDimensional, 0UL, ".txt.gsb"            ,"French IGN Datum Shift Files (*.txt)|*.txt|Canadian Ntv2 (*.gsb)|*.gsb|All Files (*.*)|*.*||"},
+	{          gdcFileNone, 0             ,	gdcTypeNone,             0UL, ""                    ,""                                          }
+};
+
+/*
+	The following arrays are used to process default values
+	for datums, ellipsoids, and units.  The value assigned,
+	the null string, says that the specific feature is
+	inactive.
+*/
+csThread char csDtDflt [32] = "";	/* The current default datum. */
+csThread char csElDflt [32] = "";	/* The current default ellipsoid. */
+csThread char csLuDflt [32] = "";	/* The current default linear unit. */
+csThread char csAuDflt [32] = "";	/* The current default angular unit. */
+
+/*
+	The following are used to control the dictionary protection
+	scheme. cs_Unique is a character which must appear in a
+	user defined dictionary key name, one which the system
+	distributer will never use.  Disable this feature by setting
+	cs_Unique to '\0'.
+
+	cs_Protect controls the protection of distribution coordinate
+	systems and user defined systems.  Set cs_Protect to -1 to
+	disable all protection. Set cs_Protect to 0 to enable
+	distribution protection, but disable user coordinate system
+	protection.  If cs_Protect is positive and non-zero, it is
+	taken to mean that user coordinate systems are protected
+	after remaining unaltered for that number of days.
+*/
+
+char cs_Unique = ':';
+short cs_Protect = 0;
+int cs_Safe = 1;
+
+/*
+	The following are used to communicate certain information
+	between modules without overloading the calling sequence
+	of the functions involved.
+*/
+
+#if _MEM_MODEL == _mm_VIRTUAL || _MEM_MODEL == _mm_FLAT
+csThread int cs_Sortbs = 128 * 1024;
+#else
+csThread int cs_Sortbs = 24 * 1024;
+#endif
+csThread int cs_Error = 0;
+csThread int cs_Errno = 0;
+csThread int csErrlng = 0;
+csThread int csErrlat = 0;
+csThread unsigned short cs_ErrSup = 0;
+#if _RUN_TIME <= _rt_UNIXPCC
+csThread ulong32_t cs_Doserr = 0;
+#endif
+
+/* The following should be left assigned to zero.  When this variable is
+   non-zero, it is assumed to point to a a valid stream, and diagnostic
+   information is written to the stream.
+*/
+csFILE* csDiagnostic = 0;
+
+/*
+	The following points are used in the High Performance
+	Interface. We define them here, so that CS_init can
+	initialize them, without forcing the code of the
+	High Performance Interface.
+*/
+
+csThread struct csCscach_ *csCscachP = NULL;
+csThread int csCscachI = cs_CSCACH_MAX;
+csThread struct csDtcach_ *csDtcachP = NULL;
+csThread int csDtcachI = cs_DTCACH_MAX;
+
+csThread char *cs_CsKeyNames = NULL;
+csThread char *cs_DtKeyNames = NULL;
+csThread char *cs_ElKeyNames = NULL;
+csThread char *cs_CsLlEnum = NULL;
+csThread struct cs_Csgrplst_ *cs_CsGrpList = NULL;
+
+/* Used for high level MGRS access. */
+csThread struct cs_Mgrs_ *cs_MgrsPtr = NULL;
+
+/* Used for geocentric coordinate calculations. */
+csThread double csGeoCtrErad = 0.0;
+csThread double csGeoCtrEsq = 0.0;
+
+/* Note: several functions assume that csErrnam is dimensioned
+   at MAXPATH (i.e. a minimum value). */
+   
+csThread char csErrnam [MAXPATH] = "???";
+csThread char csErrmsg [cs_ERRMSG_SIZE] = "???";
+
+/* The following carries a pointer to the category list. */
+struct cs_Ctdef_* cs_CtDefHead = NULL;
+
+/**********************************************************************
+	Hook function pointers.  Set to NULL to deativate.
+**********************************************************************/
+
+/*
+	The following group of hook functions are called prior to actual
+	fetching of the related definition from the dictionaries/tables.
+	They have been implemented to support dynamically created (temporary)
+	definitions.
+*/
+int (*CS_usrCsDefPtr)(struct cs_Csdef_ *csDef,Const char *keyName) = NULL;
+int (*CS_usrDtDefPtr)(struct cs_Dtdef_ *dtDef,Const char *keyName) = NULL;
+int (*CS_usrElDefPtr)(struct cs_Eldef_ *elDef,Const char *keyName) = NULL;
+double (*CS_usrUnitPtr)(short type,Const char *unitName) = NULL;
+/*
+	The following hook functions are called after the definition has been read,
+	but before any default processing.
+*/
+int (*cs_CsHook)(struct cs_Csdef_ *csdef,unsigned short prj_code,ulong32_t prj_flags) = NULL;
+int (*cs_DtHook)(struct cs_Dtdef_ *dtdef) = NULL;
+
+/*
+	The following constants are used throughout CS_MAP.
+	They are declared here, once, to reduce data space
+	requirements of the package.  Variables, rather
+	than literals, are used to reduce code space and
+	improve performance.
+*/
+
+Const double cs_Pi       = PI;			/*  3.14159..... */
+Const double cs_Mpi      = -PI;			/* -3.14159..... */
+Const double cs_Two_pi   = (2.0 * PI);		/*  6.28218..... */
+Const double cs_Three_pi = (3.0 * PI);		/*  9.424777.... */
+Const double cs_3Pi_o_2  = (3.0 * PI / 2.0);	/*  3 pi over 2  */
+Const double cs_Pi_o_2   = PI_OVR_2;		/*  PI / 2.0     */
+Const double cs_Mpi_o_2  = -PI_OVR_2;		/*  -PI / 2.0    */
+Const double cs_Pi_o_3   = (PI / 3.0);		/*  PI / 3.0     */
+Const double cs_Pi_o_4   = PI_OVR_4;		/*  PI / 4.0     */
+Const double cs_Mpi_o_4  = -PI_OVR_4;		/*  PI / 4.0     */
+Const double cs_Radian   = RADIAN;		/* 57.29577..... */
+Const double cs_Degree   = ONE_DEGREE;		/* 1.0 / RADIAN  */
+Const double cs_Mone     =  -1.0;			/* -1.0 */
+Const double cs_Zero     =   0.0;
+Const double cs_Fifth    =   (1.0 / 5.0);
+Const double cs_Fourth   =   (1.0 / 4.0);
+Const double cs_Third    =   (1.0 / 3.0);
+Const double cs_Half     =   0.5;
+Const double cs_Mhalf    =  -0.5;
+Const double cs_One      =   1.0;
+Const double cs_Two      =   2.0;
+Const double cs_Three    =   3.0;
+Const double cs_Four     =   4.0;
+Const double cs_Mfour    =  -4.0;
+Const double cs_Five     =   5.0;
+Const double cs_Six      =   6.0;
+Const double cs_Seven    =   7.0;
+Const double cs_Eight    =   8.0;
+Const double cs_Nine     =   9.0;
+Const double cs_Ten      =  10.0;
+Const double cs_K15      =  15.0;
+Const double cs_K30      =  30.0;
+Const double cs_K45      =  45.0;
+Const double cs_Km45     = -45.0;
+Const double cs_K60      =  60.0;
+Const double cs_K75      =  75.0;
+Const double cs_K540     = 540.0;
+Const double cs_K360     = 360.0;
+Const double cs_K270     = 270.0;
+Const double cs_K180     = 180.0;
+Const double cs_K90      =  90.0;
+Const double cs_K89      =  89.0;
+Const double cs_Km360    = -360.0;
+Const double cs_Km270    = -270.0;
+Const double cs_Km180    = -180.0;
+Const double cs_Km90     = -90.0;
+Const double cs_Km89     = -89.0;
+Const double cs_SclInf   = 9999.99;		/* The value we return for
+										   a scale factor when the
+										   result actually approaches
+										   infinity. */
+
+	/*  The value of INFINITY has been carefully selected to
+	    be very large, but not so large as it cannot be used.
+	    Thus, for tan (PI/2), we often use this value and then
+	    proceed to square it, multiply by it, divide by it,
+	    etc.  Thus, don't make this value too small, but don't
+	    make it too big either.  Its possible that this value
+	    will be used in cases where floats are used, so we
+	    like to keep it around 1.0E+32. */
+
+Const double cs_Zero1  = 0.0;
+#if (_RUN_TIME == _rt_HPUX) || (_RUN_TIME == _rt_AIX)
+	/* It appears that HP UNIX has it's own idea about INFINITY.  I guess I should
+	   have used the name cs_INFINITY. */
+	Const double cs_Huge   = 1.0E+32;	/* Value often returned when
+										   the real result would be
+										   infinite. */
+	Const double cs_Mhuge  = -1.0E+32;	/* Negative infinity. */
+#else
+	Const double cs_Huge   = INFINITY;	/* Value often returned when
+										   the real result would be
+										   infinite. */
+	Const double cs_Mhuge  = -INFINITY;	/* Negative infinity. */
+#endif
+
+	/* The following constants are used to check the validity of
+	   a definitions following acquisition from disk.
+
+	   Change them here or at run time.  Note, we allow a
+	   radius as small as 1.0 to handle the test cases.  Also,
+	   some folks use this stuff to map planets and the moon. So,
+	   the following numbers are pretty liberal.  You may want
+	   to be more conservative. */
+
+double cs_ERadMax = 7.0E+06;
+double cs_PRadMax = 7.0E+06;
+double cs_ERadMin = 6.0E+06;
+double cs_PRadMin = 6.0E+06;
+
+double cs_EccentMax = 0.2;
+
+double cs_DelMax = 50000.0;
+double cs_RotMax = 50000.0;
+
+double cs_SclMax = 2000.0;
+
+double cs_SclRedMin = 0.5;
+double cs_SclRedMax = 1.5;
+
+double cs_ElevElMin = -25000.0;
+double cs_ElevElMax =  50000.0;
+
+	/* The following value is used to test angles for being equal
+	   to a specific value, usually 0.0 or 90 degrees.  The value
+	   is in radians an corresponds to .001 seconds of arc.  This
+	   equates to about 30 centimeters on the earth.  See Synder,
+	   page 71.  He suggests 1.E-07.  I feel that 4.85E-08 is
+	   close enough to his value, works fine, and is a bit easier
+	   to document.
+	   
+	   This value was established here in release 6.05.  The replacement
+	   of the several different literal constants currently used will
+	   take place over the next few releases. */
+   
+Const double cs_AnglTest  = 4.85E-08;
+Const double cs_AnglTest1 = (1.0 - 4.85E-08);
+
+	/* cs_ParmTest is similar to cs_AnglTest, but it:
+	   1) is in units of degrees;
+	   2) is used when checking user entered parameters;
+	   3) is a bit larger, representing .1 seconds of arc, about
+	      3 meters on the surface of the earth (at the equator).
+	      
+	   This is the value used to, for example, see if the two
+	   standard parallels of a conic are the same.
+	*/
+
+Const double cs_ParmTest = 2.78E-05;
+
+/*
+	The following values are used to test for proximity to
+	the north and south poles, and 90 degrees east and west
+	of the central merdian for many projections.  Essentially,
+	these values represent +- 90 degrees of latitude, less the
+	cs_AnglTest value, in radians.  These constants are designed
+	to be consistent with cs_AnglTest, but make checking more
+	efficient.
+*/
+
+Const double cs_NPTest = ( PI_OVR_2 - 4.85E-08);	/* North Pole TEST value. */
+Const double cs_SPTest = (-PI_OVR_2 + 4.85E-08);	/* South Pole TEST value. */
+Const double cs_EETest = ( PI_OVR_2 - 4.85E-08);	/* East Extent TEST value. */
+Const double cs_WETest = (-PI_OVR_2 + 4.85E-08);	/* West Extent TEST value. */
+
+/*
+	The following are used where appropriate to filter out noise
+	in the low order bits of double precision latitude and
+	longitude numbers.
+*/
+
+Const double cs_Micron  = 1.0E-06;
+Const double cs_LlNoise = 1.0E-12;
+
+
+/*
+	The following values, all in degrees, are used to test
+	coordinate system definition parameters.
+*/
+
+Const double cs_MinLng    = -180.00;
+Const double cs_MaxLng    =  180.00;
+Const double cs_MinLat    = -90.00;
+Const double cs_MaxLat    =  90.00;
+Const double cs_MinLngFz  = -179.9997222;	/* 1 second greater than -180. */
+Const double cs_MaxLngFz  =  179.9997222;	/* 1 second less than 180. */
+Const double cs_MinLatFz  = -89.9997222;	/* 1 second less than 90. */
+Const double cs_MaxLatFz  =  89.9997222;	/* 1 second greater than -90. */
+  
+Const double cs_Deg2Sec = 3600.0;			/* Converts degrees to
+											   arc seconds. */
+Const double cs_Sec2Deg = (1.0 / 3600.0);	/* Converts arc seconds to
+											   degrees. */
+Const double cs_Min2Deg = (1.0 / 60.0);		/* Converts arc minutes to
+											   degrees. */
+Const double cs_HlfSecDeg = (0.5 / 3600.0);	/* One half second of arc
+											   in degrees. */
+Const double cs_Sec2Rad = (1.0 / 3600.0 / RADIAN);/* Converts arc seconds to
+												   radians. */
+Const double cs_Sin1Sec  = 0.00000484813681107636782;
+											/* Sine of one second of arc,
+											   also can be used as one
+											   arc second in radians. */
+Const double cs_NPSecs = (90.0 * 3600.0);	/* Latitude of the north
+											   pole in arc seconds. */
+
+Const double cs_Wgs84_aa = 6378137.000;			/* WGS-84 major radius. */
+Const double cs_Wgs84_ff = 1.0 / 298.257223563;	/* WGS-84 flattening */
+Const double cs_Wgs84_esq = 0.00669437999013;	/* WGS-84 eccentricity
+												   squared */
+Const double cs_Wgs84_1esq = 0.99330562000987;	/* WGS-84 1.0 - e_sq */
+
+/* Formatting variables used by the CScs2src, CScs2xml, and similar
+   functions. */
+long32_t csLatFrmt = 16L;
+long32_t csLngFrmt = 16L;
+long32_t csAnglFrmt = 16L;
+long32_t csXyFrmt = 5L;
+long32_t csZzFrmt = 5L;
+long32_t csRedFrmt = 0L;
+long32_t csSclFrmt = 0L;
+long32_t csCoefFrmt = 11L;
+
+/* The following definition is used in fallback cases only.  That is, where
+   extraordinary calculations are being performed.  In all "normal"
+   situations, the definition fetched from the dictionary(s) is/are used. */
+struct cs_Datum_ cs_Wgs84Def =
+{
+	"WGS84",				/* datum key name */
+	"WGS84",				/* ellipsoid key name */
+	6378137.000,			/* equatorial radius */
+	6356752.3142,			/* polar radius */
+	1.0 / 298.257223563,	/* flattening */
+	0.0818191908426,		/* eccentricity */
+	0.0,					/* Delta X */
+	0.0,					/* Delta Y */
+	0.0,					/* Delta Z */
+	0.0,					/* Rot X */
+	0.0,					/* Rot Y */
+	0.0,					/* Rot Z */
+	0.0,					/* Scale */
+	cs_DTCTYP_WGS84,		/* to84_via */
+	"World Geodetic System of 1984",
+	"World Geodetic System of 1984"
+};
+#if !defined(__SUNPRO_C)
+	struct cs_Datum_ *cs_Wgs84Ptr = &cs_Wgs84Def;
+#endif
+
+/*
+	The following are global constants used to define the
+	operation of the non-standard cartesian system
+	feature of CS_MAP.
+
+	cs_QuadMin & cs_QuadMax are used in the CS_cschk function
+	to determine validity of the user supplied value.
+	cs_QuadMap is used in the projection setup functions
+	to convert the user supplied value to the bit map
+	value expected by CS_quadF and cs_quadI.
+
+	Note, the projection setup functions use
+
+	trmer->quad = cs_QuadMap [csprm->csdef.quad - cs_QuadMin];
+
+	to convert from user specified code to internal code.
+*/
+
+Const short cs_QuadMax =  4;
+Const short cs_QuadMin = -4;
+Const short cs_QuadMap [] =
+{
+		cs_QUAD_SWAP | cs_QUAD_INVY,				/* -4 */
+		cs_QUAD_SWAP | cs_QUAD_INVX | cs_QUAD_INVY,	/* -3 */
+		cs_QUAD_SWAP | cs_QUAD_INVX,				/* -2 */
+		cs_QUAD_SWAP,								/* -1 */
+		0,											/*  0 */
+		0,											/*  1 */
+		cs_QUAD_INVX,								/*  2 */
+		cs_QUAD_INVX | cs_QUAD_INVY,				/*  3 */
+		cs_QUAD_INVY								/*  4 */
+};
+/*
+	A quad map for use with south oriented coordinate systems.
+*/	
+Const short cs_QuadMapSO [] =
+{
+		cs_QUAD_SWAP | cs_QUAD_INVX,				/* -4 */
+		cs_QUAD_SWAP,								/* -3 */
+		cs_QUAD_SWAP | cs_QUAD_INVY,				/* -2 */
+		cs_QUAD_SWAP | cs_QUAD_INVX | cs_QUAD_INVY,	/* -1 */
+		cs_QUAD_INVX | cs_QUAD_INVY,				/*  0 */
+		cs_QUAD_INVX | cs_QUAD_INVY,				/*  1 */
+		cs_QUAD_INVY,								/*  2 */
+		0,											/*  3 */
+		cs_QUAD_INVX								/*  4 */
+};
+
+/*
+	The following table defines the list of currently supported
+	Coordinate System groups.  It is suggested that application
+	developers resist the temptation to add new groups.  If there
+	are too many groups, with too few members, the whole group
+	concept loses its effectiveness.  Applications developers
+	may, need however, to translate the table to a different
+	language.
+*/
+
+Const struct cs_Grptbl_ cs_CsGrptbl [] =
+{
+	{     "SPCS27","State Planes, NAD27 Based, US Foot"           ,cs_GRPTBL_ACTIVE},
+	{     "SPCS83","State Planes, NAD83 Based, Meters"            ,cs_GRPTBL_ACTIVE},
+	{    "SPCS83F","State Planes, NAD83 Based, US Foot"           ,cs_GRPTBL_ACTIVE},
+	{    "SPCS83I","State Planes, NAD83 Based, Intn'l Foot"       ,cs_GRPTBL_ACTIVE},
+	{     "SPCSHP","State Planes, HARN (HPGN) Based, Meters"      ,cs_GRPTBL_ACTIVE},
+	{    "SPCSHPF","State Planes, HARN (HPGN) Based, US Foot"     ,cs_GRPTBL_ACTIVE},
+	{    "SPCSHPI","State Planes, HARN (HPGN) Based, Intn'l Foot" ,cs_GRPTBL_ACTIVE},
+	{   "SPNSRS07","State Planes, NSRS 2007 Based, Meters"        ,cs_GRPTBL_ACTIVE},
+	{  "SPNSRS07F","State Planes, NSRS 2007 Based, US Foot"       ,cs_GRPTBL_ACTIVE},
+	{  "SPNSRS07I","State Planes, NSRS 2007 Based, Intn'l Foot"   ,cs_GRPTBL_ACTIVE},
+	{   "SPNSRS11","State Planes, NSRS 2011 Based, Meters"        ,cs_GRPTBL_ACTIVE},
+	{  "SPNSRS11F","State Planes, NSRS 2011 Based, US Foot"       ,cs_GRPTBL_ACTIVE},
+	{  "SPNSRS11I","State Planes, NSRS 2011 Based, Intn'l Foot"   ,cs_GRPTBL_ACTIVE},
+	{         "LL","Latitude/Longitude"                           ,cs_GRPTBL_ACTIVE},
+	{      "UTM27","UTM Zones, NAD27 Based, Meters"               ,cs_GRPTBL_ACTIVE},
+	{     "UTM27F","UTM Zones, NAD27 Based, US Foot"              ,cs_GRPTBL_ACTIVE},
+	{     "UTM27I","UTM Zones, NAD27 Based, Intn'l Foot"          ,cs_GRPTBL_ACTIVE},
+	{      "UTM83","UTM Zones, NAD83 Based, Meters"               ,cs_GRPTBL_ACTIVE},
+	{     "UTM83F","UTM Zones, NAD83 Based, US Foot"              ,cs_GRPTBL_ACTIVE},
+	{     "UTM83I","UTM Zones, NAD83 Based, Intn'l Foot"          ,cs_GRPTBL_ACTIVE},
+	{      "UTMHP","UTM Zones, HARN (HPGN) Based, Meters"         ,cs_GRPTBL_ACTIVE},
+	{     "UTMHPF","UTM Zones, HARN (HPGN) Based, US Foot"        ,cs_GRPTBL_ACTIVE},
+	{     "UTMHPI","UTM Zones, HARN (HPGN) Based, Intn'l Foot"    ,cs_GRPTBL_ACTIVE},
+	{  "UTMNSRS07","UTM Zones, NSRS 2007 Based, Meters"           ,cs_GRPTBL_ACTIVE},
+	{ "UTMNSRS07F","UTM Zones, NSRS 2007 Based, US Foot"          ,cs_GRPTBL_ACTIVE},
+	{ "UTMNSRS07I","UTM Zones, NSRS 2007 Based, Intn'l Foot"      ,cs_GRPTBL_ACTIVE},
+	{  "UTMNSRS11","UTM Zones, NSRS 2011 Based, Meters"           ,cs_GRPTBL_ACTIVE},
+	{ "UTMNSRS11F","UTM Zones, NSRS 2011 Based, US Foot"          ,cs_GRPTBL_ACTIVE},
+	{ "UTMNSRS11I","UTM Zones, NSRS 2011 Based, Intn'l Foot"      ,cs_GRPTBL_ACTIVE},
+	{    "OTHR-US","Other US Coordinate Systems"                  ,cs_GRPTBL_ACTIVE},
+	{     "CANADA","Canadian Coordinate Systems"                  ,cs_GRPTBL_ACTIVE},
+	{    "OTHR-NA","Other North American Coordinate Systems"      ,cs_GRPTBL_ACTIVE},
+	{       "UTMN","UTM Zones, Northern Hemisphere, Meters"       ,cs_GRPTBL_ACTIVE},
+	{       "UTMS","UTM Zones, Southern Hemisphere, Meters"       ,cs_GRPTBL_ACTIVE},
+	{      "WORLD","World/Continent Coordinate Systems"           ,cs_GRPTBL_ACTIVE},
+	{     "EUROPE","European Coordinate Systems"                  ,cs_GRPTBL_ACTIVE},
+	{      "AUSNZ","Australia/New Zealand Coordinate Systems"     ,cs_GRPTBL_ACTIVE},
+	{      "SAMER","South American Coordinate Systems"            ,cs_GRPTBL_ACTIVE},
+	{      "CAMER","Central American Coordinate Systems"          ,cs_GRPTBL_ACTIVE},
+	{     "AFRICA","African Coordinate Systems"                   ,cs_GRPTBL_ACTIVE},
+	{       "ASIA","Asian Coordinate Systems"                     ,cs_GRPTBL_ACTIVE},
+	{     "RUSSIA","Russian Coordinate Systems"                   ,cs_GRPTBL_ACTIVE},
+	{    "PACIFIC","Other Pacific Coordinate Systems"             ,cs_GRPTBL_ACTIVE},
+	{   "ATLANTIC","Other Atlantic Coordinate Systems"            ,cs_GRPTBL_ACTIVE},
+	{      "POLAR","Polar Coordinate Systems"                     ,cs_GRPTBL_ACTIVE},
+	{    "EPSGPRJ","Projected defs from EPSG, area undetermined"  ,cs_GRPTBL_ACTIVE},
+	{     "EPSGLL","Geographic defs from EPSG, area undetermined ",cs_GRPTBL_ACTIVE},
+	{       "TEST","Test Coordinate Systems"                      ,cs_GRPTBL_ACTIVE},
+	{       "USER","User Defined Coordinate Systems"              ,cs_GRPTBL_ACTIVE},
+	{   "WKTSUPPT","Well Known Text Support"                      ,cs_GRPTBL_ACTIVE},
+	{      "CARIB","Caribean/Gulf of Mexico and Vicinity"         ,cs_GRPTBL_ACTIVE},
+	{    "MIDEAST","Mideast/Holy Land"                            ,cs_GRPTBL_ACTIVE},
+	{     "INDIAN","Indian Ocean"                                 ,cs_GRPTBL_ACTIVE},
+	{      "NERTH","Non geospatial (non-Earth) transformations"   ,cs_GRPTBL_ACTIVE},
+	{       "NONE","No group specified in definition"             ,cs_GRPTBL_ACTIVE},
+	{     "LEGACY","Obsolete/Incorrect; for legacy use only"      ,cs_GRPTBL_ACTIVE},
+	{           "",""                                             ,cs_GRPTBL_END}
+};

Added: trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/Library.mak
===================================================================
--- trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/Library.mak	                        (rev 0)
+++ trunk/Tools/Vagrant/sources/patches/mapguide/Oem/CsMap/Source/Library.mak	2014-04-29 11:14:57 UTC (rev 8084)
@@ -0,0 +1,320 @@
+
+C_FLG = -c -DGCC_3 -D__CPP__ -Wall -O3 -I../Include
+
+CPP_FLG = -c -DGCC_3 -D__CPP__ -Wall -O3 -I../Include
+
+.cpp.o:
+	$(CXX) $(CPP_FLG) $<
+
+.c.o:
+	$(CC) $(C_FLG) $<
+
+CSMAP_LIB_SRC = \
+	csIoUtil.cpp \
+	CS_alber.c \
+	CS_angle.c \
+	CS_ansi.c \
+	CS_ats77New.c \
+	CS_azmea.c \
+	CS_azmed.c \
+	CS_badekas.c \
+	CS_bonne.c \
+	CS_bpcnc.c \
+	CS_bursa.c \
+	CS_bynFile.c \
+	CS_category.c \
+	cs_ctio.c \
+	CS_csini.c \
+	CS_csio.c \
+	CS_csprm.c \
+	CS_csWktLoc.c \
+	CS_datum.c \
+	CS_defaults.c \
+	CS_defCmp.c \
+	CS_defCmpEx.c \
+	CS_dtcalc.c \
+	CS_dtio.c \
+	CS_dtmBridge.c \
+	CS_edcnc.c \
+	CS_edcyl.c \
+	CS_egm96.c \
+	CS_ekrt4.c \
+	CS_ekrt6.c \
+	CS_elCalc.c \
+	CS_elio.c \
+	CS_erpt.c \
+	CS_error.c \
+	CS_fips.c \
+	CS_frame.c \
+	CS_frnch.c \
+	CS_gauss.c \
+	CS_general.c \
+	CS_geocn.c \
+	CS_geoct.c \
+	CS_geoid96.c \
+	CS_geoid99.c \
+	CS_GeoidHeight.c \
+	CS_gissupprt.c \
+	CS_gnomc.c \
+	CS_gpio.c \
+	CS_gridi.c \
+	CS_groups.c \
+	CS_guiApi.c \
+	CS_gxIndex.c \
+	CS_gxio.c \
+	CS_gxprm.c \
+	CS_hlApi.c \
+	CS_hmlsn.c \
+	CS_hpApi.c \
+	CS_japanNew.c \
+	CS_krovk.c \
+	CS_lmbrt.c \
+	CS_lmtan.c \
+	CS_mfc.cpp \
+	CS_mgrs.c \
+	CS_millr.c \
+	CS_modpc.c \
+	CS_molod.c \
+	CS_molwd.c \
+	CS_mrcat.c \
+	CS_mstro.c \
+	CS_mulrg.c \
+	CS_nacyl.c \
+	CS_nadcn.c \
+	CS_nerth.c \
+	CS_ntv1.c \
+	CS_ntv2.c \
+	CS_nullx.c \
+	CS_nzlnd.c \
+	CS_oblqm.c \
+	CS_optional.c \
+	CS_ortho.c \
+	CS_osgm91.c \
+	CS_ost02.c \
+	CS_ost97.c \
+	CS_ostn02.c \
+	CS_ostn97.c \
+	CS_ostro.c \
+	CS_parm3.c \
+	CS_parm4.c \
+	CS_parm6.c \
+	CS_parm7.c \
+	CS_plycn.c \
+	CS_pstro.c \
+	CS_rlsUpdt.c \
+	CS_robin.c \
+	CS_sinus.c \
+	CS_sstro.c \
+	CS_supprt.c \
+	CS_swiss.c \
+	CS_sys34.c \
+	CS_system.c \
+	CS_tacyl.c \
+	CS_trmer.c \
+	CS_trmrs.c \
+	CS_units.c \
+	CS_unity.c \
+	CS_vdgrn.c \
+	CS_VertconUS.c \
+	CS_vrtcon.c \
+	cs_wellknowntext.cpp \
+	CS_wgs72.c \
+	CS_winkelTripel.c \
+	CS_zones.c \
+	csBrowser.cpp \
+	CScs2Wkt.cpp \
+	cscscomp.c \
+	csCsvFileSupport.cpp \
+	CSdata.c \
+	csDataDir.cpp \
+	CSdataDT.c \
+	CSdataPJ.c \
+	CSdataU.c \
+	CSdatumCatalog.c \
+	CSdictDiff.c \
+	CSdt2Wkt.cpp \
+	CSdtcomp.c \
+	csDualBrowse.cpp \
+	csEdit.cpp \
+	CSel2Wkt.cpp \
+	CSelcomp.c \
+	csEpsgStuff.cpp \
+	csEpsgSupport.cpp \
+	CSgeodeticSupport.c \
+	CSgpcomp.c \
+	CSgxcomp.c \
+	csKeyNm.cpp \
+	CSmrcomp.c \
+	csNameMapper.cpp \
+	csNameMapperSupport.cpp \
+	csTest.cpp \
+	CSwinHlp.cpp \
+	CSwktFlavors.c \
+	dtEdit.cpp \
+	dtSelect.cpp \
+	elEdit.cpp \
+	elSelect.cpp \
+	gdcEdit.cpp \
+	mgTest.cpp \
+	rcWellKnownText.cpp \
+	rcWktKonstants.cpp
+
+CSMAP_LIB_OBJ = \
+	csIoUtil.o \
+	CS_alber.o \
+	CS_angle.o \
+	CS_ansi.o \
+	CS_ats77New.o \
+	CS_azmea.o \
+	CS_azmed.o \
+	CS_badekas.o \
+	CS_bonne.o \
+	CS_bpcnc.o \
+	CS_bursa.o \
+	CS_bynFile.o \
+	CS_category.o \
+	cs_ctio.o \
+	CS_csini.o \
+	CS_csio.o \
+	CS_csprm.o \
+	CS_csWktLoc.o \
+	CS_datum.o \
+	CS_defaults.o \
+	CS_defCmp.o \
+	CS_defCmpEx.o \
+	CS_dtcalc.o \
+	CS_dtio.o \
+	CS_dtmBridge.o \
+	CS_edcnc.o \
+	CS_edcyl.o \
+	CS_egm96.o \
+	CS_ekrt4.o \
+	CS_ekrt6.o \
+	CS_elCalc.o \
+	CS_elio.o \
+	CS_erpt.o \
+	CS_error.o \
+	CS_fips.o \
+	CS_frame.o \
+	CS_frnch.o \
+	CS_gauss.o \
+	CS_general.o \
+	CS_geocn.o \
+	CS_geoct.o \
+	CS_geoid96.o \
+	CS_geoid99.o \
+	CS_GeoidHeight.o \
+	CS_gissupprt.o \
+	CS_gnomc.o \
+	CS_gpio.o \
+	CS_gridi.o \
+	CS_groups.o \
+	CS_guiApi.o \
+	CS_gxIndex.o \
+	CS_gxio.o \
+	CS_gxprm.o \
+	CS_hlApi.o \
+	CS_hmlsn.o \
+	CS_hpApi.o \
+	CS_japanNew.o \
+	CS_krovk.o \
+	CS_lmbrt.o \
+	CS_lmtan.o \
+	CS_mfc.o \
+	CS_mgrs.o \
+	CS_millr.o \
+	CS_modpc.o \
+	CS_molod.o \
+	CS_molwd.o \
+	CS_mrcat.o \
+	CS_mstro.o \
+	CS_mulrg.o \
+	CS_nacyl.o \
+	CS_nadcn.o \
+	CS_nerth.o \
+	CS_ntv1.o \
+	CS_ntv2.o \
+	CS_nullx.o \
+	CS_nzlnd.o \
+	CS_oblqm.o \
+	CS_optional.o \
+	CS_ortho.o \
+	CS_osgm91.o \
+	CS_ost02.o \
+	CS_ost97.o \
+	CS_ostn02.o \
+	CS_ostn97.o \
+	CS_ostro.o \
+	CS_parm3.o \
+	CS_parm4.o \
+	CS_parm6.o \
+	CS_parm7.o \
+	CS_plycn.o \
+	CS_pstro.o \
+	CS_rlsUpdt.o \
+	CS_robin.o \
+	CS_sinus.o \
+	CS_sstro.o \
+	CS_supprt.o \
+	CS_swiss.o \
+	CS_sys34.o \
+	CS_system.o \
+	CS_tacyl.o \
+	CS_trmer.o \
+	CS_trmrs.o \
+	CS_units.o \
+	CS_unity.o \
+	CS_vdgrn.o \
+	CS_VertconUS.o \
+	CS_vrtcon.o \
+	cs_wellknowntext.o \
+	CS_wgs72.o \
+	CS_winkelTripel.o \
+	CS_zones.o \
+	csBrowser.o \
+	CScs2Wkt.o \
+	cscscomp.o \
+	csCsvFileSupport.o \
+	CSdata.o \
+	csDataDir.o \
+	CSdataDT.o \
+	CSdataPJ.o \
+	CSdataU.o \
+	CSdatumCatalog.o \
+	CSdictDiff.o \
+	CSdt2Wkt.o \
+	CSdtcomp.o \
+	csDualBrowse.o \
+	csEdit.o \
+	CSel2Wkt.o \
+	CSelcomp.o \
+	csEpsgStuff.o \
+	csEpsgSupport.o \
+	CSgeodeticSupport.o \
+	CSgpcomp.o \
+	CSgxcomp.o \
+	csKeyNm.o \
+	CSmrcomp.o \
+	csNameMapper.o \
+	csNameMapperSupport.o \
+	csTest.o \
+	CSwinHlp.o \
+	CSwktFlavors.o \
+	dtEdit.o \
+	dtSelect.o \
+	elEdit.o \
+	elSelect.o \
+	gdcEdit.o \
+	mgTest.o \
+	rcWellKnownText.o \
+	rcWktKonstants.o
+
+CsMap.a : $(CSMAP_LIB_OBJ)
+	ar rv CsMap.a $?
+
+clean:
+	rm -f $(CSMAP_LIB_OBJ)
+	rm -f CsMap.a
+
+rebuild: clean CsMap.a
+

Added: trunk/Tools/Vagrant/sources/patches/patchinfo.txt
===================================================================
--- trunk/Tools/Vagrant/sources/patches/patchinfo.txt	                        (rev 0)
+++ trunk/Tools/Vagrant/sources/patches/patchinfo.txt	2014-04-29 11:14:57 UTC (rev 8084)
@@ -0,0 +1,2 @@
+http://trac.osgeo.org/csmap/ticket/172
+http://trac.osgeo.org/fdo/ticket/888
\ No newline at end of file

Modified: trunk/Tools/Vagrant/support/apt_list.txt
===================================================================
--- trunk/Tools/Vagrant/support/apt_list.txt	2014-04-28 14:14:08 UTC (rev 8083)
+++ trunk/Tools/Vagrant/support/apt_list.txt	2014-04-29 11:14:57 UTC (rev 8084)
@@ -1,3 +1,13 @@
+Ubuntu 12.04
+------------
+
 build-essential bison automake libtool libpng-dev libjpeg62-dev libxslt-dev libfreetype6-dev libpcre3-dev openjdk-7-jdk subversion lintian ant scons dos2unix liboss4-salsa-dev libldap-dev libssl-dev libcurl4-openssl-dev libexpat-dev libmysqlclient-dev unixODBC-dev python-dev libpq-dev libcppunit-dev
 libboost-thread1.46-dev (for non-internal boost for cmake)
-libboost-date-time-dev
\ No newline at end of file
+libboost-date-time-dev
+
+Ubuntu 14.04
+------------
+
+Need atomic.h copied to /usr/include/asm/atomic.h
+
+build-essential bison automake libtool libpng-dev libjpeg62-dev libxslt-dev libfreetype6-dev libpcre3-dev openjdk-7-jdk subversion lintian ant scons dos2unix libldap-dev libssl-dev libcurl4-openssl-dev libexpat-dev libmysqlclient-dev unixODBC-dev python-dev libpq-dev libcppunit-dev
\ No newline at end of file

Modified: trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh
===================================================================
--- trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh	2014-04-28 14:14:08 UTC (rev 8083)
+++ trunk/Tools/Vagrant/support/vagrant_base_box_prep.sh	2014-04-29 11:14:57 UTC (rev 8084)
@@ -1,4 +1,13 @@
 #!/usr/bin/env bash
+
+# vagrant_base_box_prep.sh
+#
+# Prepares an Ubuntu VM for packaging by vagrant.
+#
+# Targeted for Ubuntu 14.04. Assumes the default user is "vagrant".
+#
+# Make sure the Virtualbox Guest Additions ISO is mounted on the VM before
+# running this script
 apt-get -y update
 apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
 cd /tmp
@@ -16,9 +25,7 @@
 wget http://github.com/mitchellh/vagrant/raw/master/keys/vagrant.pub
 mv vagrant.pub authorized_keys
 apt-get install linux-headers-$(uname -r) build-essential
-mkdir /media/cdrom
-mount /dev/cdrom /media/cdrom
-sh /media/cdrom/VBoxLinuxAdditions.run
+
 apt-get clean
 groupadd admin
 usermod -G admin vagrant
\ No newline at end of file

Modified: trunk/Tools/Vagrant/ubuntu/x64/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/ubuntu/x64/Vagrantfile	2014-04-28 14:14:08 UTC (rev 8083)
+++ trunk/Tools/Vagrant/ubuntu/x64/Vagrantfile	2014-04-29 11:14:57 UTC (rev 8084)
@@ -10,7 +10,7 @@
   # please see the online documentation at vagrantup.com.
 
   # Every Vagrant virtual environment requires a box to build off of.
-  config.vm.box = "vagrant-mapguide-ubuntu-precise64"
+  config.vm.box = "vagrant-trusty64"
 
   # The url from where the 'config.vm.box' box will be fetched if it
   # doesn't already exist on the user's system.
@@ -132,6 +132,7 @@
 HAVE_FDO=0
 HAVE_FDO_LIBS=0
 HAVE_MAPGUIDE=0
+MG_UNIT_TEST=0
 SCRIPT_ROOT=~/scripts
 FDO_SRC_ROOT=~/fdo
 FDO_SRC=$FDO_SRC_ROOT/trunk
@@ -150,8 +151,16 @@
 then
     HAVE_MAPGUIDE=1
 fi
-echo [provision]: Checking all tools and libs are in place
-sudo apt-get -y install build-essential bison automake libtool libpng-dev libjpeg62-dev libxslt-dev libfreetype6-dev libpcre3-dev openjdk-7-jdk subversion lintian ant scons dos2unix liboss4-salsa-dev libldap-dev libssl-dev libcurl4-openssl-dev libexpat-dev libmysqlclient-dev unixODBC-dev python-dev libpq-dev libcppunit-dev
+if [ -f /usr/include/asm/atomic.h ];
+then
+    echo [provision]: atomic.h exists. Doing nothing
+else
+    echo [provision]: Copy atomic.h
+    sudo mkdir -p /usr/include/asm
+    sudo cp /mapguide_sources/atomic.h /usr/include/asm
+fi
+echo [provision]: Checking libraries
+sudo apt-get install -y libpq-dev libmysqlclient-dev
 echo [provision]: Copying shell scripts
 mkdir -p $SCRIPT_ROOT
 cp -f /vagrant/*.sh $SCRIPT_ROOT
@@ -163,6 +172,7 @@
 sed -i 's/FDO_PLATFORM=32/FDO_PLATFORM=64/g' build_fdo.sh
 sed -i 's/FDO_CPU=x86/FDO_CPU=x64/g' build_fdo.sh
 sed -i 's/FDO_BUILD_CPU=i386/FDO_BUILD_CPU=amd64/g' build_fdo.sh
+sed -i 's/LIB_DIRNAME=lib/LIB_DIRNAME=lib64/g' build_fdo.sh
 if [ $HAVE_FDO_LIBS -eq 0 ];
 then
     echo [provision]: Extracting FDO thirdparty libs
@@ -182,12 +192,28 @@
 fi
 echo [provision]: svn update FDO
 BUILD_COMPONENT="svn update FDO"
+# Only for this VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
+svn upgrade $FDO_SRC
 svn update $FDO_SRC
 check_build
 echo [provision]: svn update MapGuide
 BUILD_COMPONENT="svn update MapGuide"
+# Only for this VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
+svn upgrade $MG_SRC
 svn update $MG_SRC
 check_build
+if [ -d /mapguide_sources/patches/fdo ];
+then
+    echo [provision]: Applying FDO source patches
+    cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+fi
+if [ -d /mapguide_sources/patches/mapguide ];
+then
+    echo [provision]: Applying MapGuide source patches
+    cp -R /mapguide_sources/patches/mapguide/* $MG_SRC
+fi
+echo [provision]: Making sure swig is executable
+chmod +x $MG_SRC/Oem/SWIGEx/Linux/swig
 cd ~/scripts
 BUILD_COMPONENT="FDO"
 sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
@@ -199,27 +225,35 @@
 BUILD_COMPONENT="MapGuide deb packages"
 sudo ./dpkgmapguide.sh amd64 $MG_REV
 check_build
-echo [provision]: Unit test MapGuide
-cd $SCRIPT_ROOT/mgdev
-sudo make check 2>&1 | tee ~/mapguide_unit_test.log
+if [ $MG_UNIT_TEST -eq 1 ];
+then
+    echo [provision]: Unit test MapGuide
+    cd $SCRIPT_ROOT/mgdev
+    sudo make check 2>&1 | tee ~/mapguide_unit_test.log
+fi
 cd $SCRIPT_ROOT
 sudo mkdir -p /vagrant/build
 sudo mv -f ~/*.log /vagrant/build
 sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
 sudo cp bin/*.deb /vagrant/build
-if [ ! -d /mapguide_sources/updated ]; then
-    sudo mkdir -p /mapguide_sources/updated
-    cd ~/mapguide/trunk
-    echo [provision]: Updating mapguide source tarball
-    tar -zcf mapguide-checkout.tar.gz MgDev
-    sudo mv mapguide-checkout.tar.gz /mapguide_sources/updated
-    cd ~/fdo
-    echo [provision]: Updating fdo source tarball
-    tar -zcf fdo-checkout.tar.gz trunk
-    sudo mv fdo-checkout.tar.gz /mapguide_sources/updated
-else
-    echo [provision]: Updated tarballs already exist. Doing nothing
-fi
+# Do not update the working copy tarballs. Ubuntu 14.04 uses svn 1.8 which will break
+# the working copy if copied over to a CentOS VM (which is still on 1.6)
+#
+# If anyone is doing to do the working copy update, it will be the CentOS VM
+#
+#if [ ! -d /mapguide_sources/updated ]; then
+#    sudo mkdir -p /mapguide_sources/updated
+#    cd ~/mapguide/trunk
+#    echo [provision]: Updating mapguide source tarball
+#    tar -zcf mapguide-checkout.tar.gz MgDev
+#    sudo mv mapguide-checkout.tar.gz /mapguide_sources/updated
+#    cd ~/fdo
+#    echo [provision]: Updating fdo source tarball
+#    tar -zcf fdo-checkout.tar.gz trunk
+#    sudo mv fdo-checkout.tar.gz /mapguide_sources/updated
+#else
+#    echo [provision]: Updated tarballs already exist. Doing nothing
+#fi
 echo [provision]: Build complete
 SCRIPT
   

Modified: trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile
===================================================================
--- trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile	2014-04-28 14:14:08 UTC (rev 8083)
+++ trunk/Tools/Vagrant/ubuntu/x86/Vagrantfile	2014-04-29 11:14:57 UTC (rev 8084)
@@ -10,7 +10,7 @@
   # please see the online documentation at vagrantup.com.
 
   # Every Vagrant virtual environment requires a box to build off of.
-  config.vm.box = "vagrant-mapguide-ubuntu-precise32"
+  config.vm.box = "vagrant-trusty32"
 
   # The url from where the 'config.vm.box' box will be fetched if it
   # doesn't already exist on the user's system.
@@ -151,8 +151,16 @@
 then
     HAVE_MAPGUIDE=1
 fi
-echo [provision]: Checking all tools and libs are in place
-sudo apt-get -y install build-essential bison automake libtool libpng-dev libjpeg62-dev libxslt-dev libfreetype6-dev libpcre3-dev openjdk-7-jdk subversion lintian ant scons dos2unix liboss4-salsa-dev libldap-dev libssl-dev libcurl4-openssl-dev libexpat-dev libmysqlclient-dev unixODBC-dev python-dev libpq-dev libcppunit-dev
+if [ -f /usr/include/asm/atomic.h ];
+then
+    echo [provision]: atomic.h exists. Doing nothing
+else
+    echo [provision]: Copy atomic.h
+    sudo mkdir -p /usr/include/asm
+    sudo cp /mapguide_sources/atomic.h /usr/include/asm
+fi
+echo [provision]: Checking libraries
+sudo apt-get install -y libpq-dev libmysqlclient-dev
 echo [provision]: Copying shell scripts
 mkdir -p $SCRIPT_ROOT
 cp -f /vagrant/*.sh $SCRIPT_ROOT
@@ -164,6 +172,7 @@
 sed -i 's/FDO_PLATFORM=64/FDO_PLATFORM=32/g' build_fdo.sh
 sed -i 's/FDO_CPU=x64/FDO_CPU=x86/g' build_fdo.sh
 sed -i 's/FDO_BUILD_CPU=amd64/FDO_BUILD_CPU=i386/g' build_fdo.sh
+sed -i 's/LIB_DIRNAME=lib64/LIB_DIRNAME=lib/g' build_fdo.sh
 if [ $HAVE_FDO_LIBS -eq 0 ];
 then
     echo [provision]: Extracting FDO thirdparty libs
@@ -183,12 +192,28 @@
 fi
 echo [provision]: svn update FDO
 BUILD_COMPONENT="svn update FDO"
+# Only for this VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
+svn upgrade $FDO_SRC
 svn update $FDO_SRC
 check_build
 echo [provision]: svn update MapGuide
 BUILD_COMPONENT="svn update MapGuide"
+# Only for this VM, svn is 1.8 so we have to upgrade the WC first before it can be updated
+svn upgrade $MG_SRC
 svn update $MG_SRC
 check_build
+if [ -d /mapguide_sources/patches/fdo ];
+then
+    echo [provision]: Applying FDO source patches
+    cp -R /mapguide_sources/patches/fdo/* $FDO_SRC
+fi
+if [ -d /mapguide_sources/patches/mapguide ];
+then
+    echo [provision]: Applying MapGuide source patches
+    cp -R /mapguide_sources/patches/mapguide/* $MG_SRC
+fi
+echo [provision]: Making sure swig is executable
+chmod +x $MG_SRC/Oem/SWIGEx/Linux/swig
 cd ~/scripts
 BUILD_COMPONENT="FDO"
 sudo -E ./build_fdo.sh 2>&1 | tee ~/fdo_build.log
@@ -211,19 +236,24 @@
 sudo mv -f ~/*.log /vagrant/build
 sudo cp fdo_build_area/install/bin/*.deb /vagrant/build
 sudo cp bin/*.deb /vagrant/build
-if [ ! -d /mapguide_sources/updated ]; then
-    sudo mkdir -p /mapguide_sources/updated
-    cd ~/mapguide/trunk
-    echo [provision]: Updating mapguide source tarball
-    tar -zcf mapguide-checkout.tar.gz MgDev
-    sudo mv mapguide-checkout.tar.gz /mapguide_sources/updated
-    cd ~/fdo
-    echo [provision]: Updating fdo source tarball
-    tar -zcf fdo-checkout.tar.gz trunk
-    sudo mv fdo-checkout.tar.gz /mapguide_sources/updated
-else
-    echo [provision]: Updated tarballs already exist. Doing nothing
-fi
+# Do not update the working copy tarballs. Ubuntu 14.04 uses svn 1.8 which will break
+# the working copy if copied over to a CentOS VM (which is still on 1.6)
+#
+# If anyone is doing to do the working copy update, it will be the CentOS VM
+#
+#if [ ! -d /mapguide_sources/updated ]; then
+#    sudo mkdir -p /mapguide_sources/updated
+#    cd ~/mapguide/trunk
+#    echo [provision]: Updating mapguide source tarball
+#    tar -zcf mapguide-checkout.tar.gz MgDev
+#    sudo mv mapguide-checkout.tar.gz /mapguide_sources/updated
+#    cd ~/fdo
+#    echo [provision]: Updating fdo source tarball
+#    tar -zcf fdo-checkout.tar.gz trunk
+#    sudo mv fdo-checkout.tar.gz /mapguide_sources/updated
+#else
+#    echo [provision]: Updated tarballs already exist. Doing nothing
+#fi
 echo [provision]: Build complete
 SCRIPT
   



More information about the mapguide-commits mailing list