Ticket #78: 0002-OS-X-specific-changes-to-include-statements.patch

File 0002-OS-X-specific-changes-to-include-statements.patch, 11.3 KB (added by chuck@…, 13 years ago)

OS X specific changes to include statements

  • catalogmgr/ops.cc

    From efb3ce66f648fccc7c46e92ffcfbb4a5202aed4c Mon Sep 17 00:00:00 2001
    From: Charlie Sharpsteen <source@sharpsteen.net>
    Date: Mon, 27 Sep 2010 15:01:34 -0700
    Subject: [PATCH 2/4] OS X specific changes to include statements
    
    On OS X some header files are in different locations or have different names.
    The most notable change is that `sys/malloc.h` must be included instead of
    `malloc.h` on OS X.
    ---
     catalogmgr/ops.cc                      |    7 ++++++-
     conversion/memfs.cc                    |    4 ++++
     raslib/metaobject.cc                   |    4 ++++
     raslib/property.cc                     |    5 ++++-
     raslib/structuretype.cc                |    6 +++++-
     rasmgr/rasmgr_config.cc                |    3 +++
     rasmgr/rasmgr_config.hh                |    4 ++++
     rasmgr/rasmgr_localsrv.cc              |    4 ++++
     reladminif/databaseifcommon.cc         |    4 ++++
     relcatalogif/complextype.hh            |    4 ++++
     relcatalogif/floattype.C               |    4 ++++
     relcatalogif/mddbasetypecommon.cc      |    4 ++++
     relcatalogif/mdddimensiontypecommon.cc |    4 ++++
     relcatalogif/mdddomaintypecommon.cc    |    6 +++++-
     relcatalogif/mddtypecommon.cc          |    4 ++++
     relcatalogif/settypecommon.cc          |    4 ++++
     servercomm/callbackmgr.cc              |    4 ++++
     servercomm/httpserver.cc               |    4 ++++
     servercomm/manager.cc                  |    5 +++++
     servercomm/servercomm.cc               |    6 ++++++
     servercomm/servercomm2.cc              |    4 ++++
     21 files changed, 90 insertions(+), 4 deletions(-)
    
    diff --git a/catalogmgr/ops.cc b/catalogmgr/ops.cc
    index 0bf67f8..7911e65 100644
    a b rasdaman GmbH.  
    2323static const char rcsid[] = "@(#)catalogif,ops.cc: $Header: /home/rasdev/CVS-repository/rasdaman/catalogmgr/ops.cc,v 1.67 2003/12/20 23:41:27 rasdev Exp $";
    2424
    2525#include <limits.h>
    26 #include <values.h>
    2726#include <string.h> // memcpy()
     27#ifdef __APPLE__
     28#include <sys/malloc.h> // malloc()
     29#include <float.h>
     30#else
    2831#include <malloc.h> // malloc()
     32#include <values.h>
     33#endif
    2934#include "ops.hh"
    3035#include "relcatalogif/alltypes.hh"
    3136#include "typefactory.hh"
  • conversion/memfs.cc

    diff --git a/conversion/memfs.cc b/conversion/memfs.cc
    index 8dca196..5b6db04 100644
    a b rasdaman GmbH.  
    3535#include "mymalloc/mymalloc.h"
    3636
    3737#include <stdio.h>
     38#ifdef __APPLE__
     39#include <sys/malloc.h>
     40#else
    3841#include <malloc.h>
     42#endif
    3943#include <string.h>
    4044#include "conversion/memfs.hh"
    4145
  • raslib/metaobject.cc

    diff --git a/raslib/metaobject.cc b/raslib/metaobject.cc
    index 844aa48..9253a5a 100644
    a b static const char rcsid[] = "@(#)raslib, r_Meta_Object: $Header: /home/rasdev/CV  
    2727#include "raslib/metaobject.hh"
    2828
    2929#include <stdlib.h> // OSF1 has the definition for malloc here
     30#ifdef __APPLE__
     31#include <sys/malloc.h>
     32#else
    3033#include <malloc.h>
     34#endif
    3135#include <string.h>
    3236
    3337r_Meta_Object::r_Meta_Object()
  • raslib/property.cc

    diff --git a/raslib/property.cc b/raslib/property.cc
    index ddd75c2..414a887 100644
    a b static const char rcsid[] = "@(#)raslib, r_Meta_Object: $Header: /home/rasdev/CV  
    2828#include "raslib/rminit.hh"
    2929#include "raslib/error.hh"
    3030
    31 
     31#ifdef __APPLE__
     32#include <sys/malloc.h>
     33#else
    3234#include <malloc.h>
     35#endif
    3336#include <string.h>
    3437
    3538r_Property::r_Property()
  • raslib/structuretype.cc

    diff --git a/raslib/structuretype.cc b/raslib/structuretype.cc
    index ddfd9fb..3a3ec4d 100644
    a b rasdaman GmbH.  
    2323
    2424static const char rcsid[] = "@(#)raslib, r_Structure_Type: $Header: /home/rasdev/CVS-repository/rasdaman/raslib/structuretype.cc,v 1.23 2003/12/27 23:01:21 rasdev Exp $";
    2525
     26#ifdef __APPLE__
     27#include <sys/malloc.h>
     28#else
    2629#include <malloc.h>
     30#endif
    2731#include <string.h>
    2832
    2933#include "raslib/structuretype.hh"
    std::ostream &operator<<( std::ostream &str, const r_Structure_Type &type )  
    273277{
    274278  type.print_status(str);
    275279  return str;
    276 }
    277  No newline at end of file
     280}
  • rasmgr/rasmgr_config.cc

    diff --git a/rasmgr/rasmgr_config.cc b/rasmgr/rasmgr_config.cc
    index 20f47c4..7698f07 100644
    a b using namespace std;  
    5555#include <iomanip>
    5656#include <time.h>
    5757#include <bits/list.tcc>
     58#ifdef __APPLE__
     59#include <sys/stat.h> // mkdir()
     60#endif
    5861
    5962#include "debug-srv.hh"
    6063#include "raslib/rminit.hh"
  • rasmgr/rasmgr_config.hh

    diff --git a/rasmgr/rasmgr_config.hh b/rasmgr/rasmgr_config.hh
    index 506e7c1..8e14356 100644
    a b rasdaman GmbH.  
    3939#include <iostream>
    4040#include <string>
    4141#include <sys/time.h>
     42#ifdef __APPLE__
     43#include <limits.h>
     44#else
    4245#include <linux/limits.h>       // PATH_MAX
     46#endif
    4347
    4448#include "commline/cmlparser.hh"
    4549
  • rasmgr/rasmgr_localsrv.cc

    diff --git a/rasmgr/rasmgr_localsrv.cc b/rasmgr/rasmgr_localsrv.cc
    index 61058bc..eab7ee9 100644
    a b using namespace std;  
    4242#include <signal.h>
    4343#include <time.h>
    4444
     45#ifdef __APPLE__
     46#include <limits.h>
     47#else
    4548#include <linux/limits.h>       // ARG_MAX
     49#endif
    4650// fix for missing ARG_MAX; workaround for glibc-2.8 and above
    4751#if defined(_SC_ARG_MAX)
    4852# if defined(ARG_MAX)
  • reladminif/databaseifcommon.cc

    diff --git a/reladminif/databaseifcommon.cc b/reladminif/databaseifcommon.cc
    index b3e3097..23eca1f 100644
    a b rasdaman GmbH.  
    3636
    3737
    3838#include <string.h>
     39#ifdef __APPLE__
     40#include <sys/malloc.h>
     41#else
    3942#include <malloc.h>
     43#endif
    4044
    4145#include "globals.hh"   // DEFAULT_DBNAME
    4246
  • relcatalogif/complextype.hh

    diff --git a/relcatalogif/complextype.hh b/relcatalogif/complextype.hh
    index c3d5f16..b1e4d22 100644
    a b rasdaman GmbH.  
    3838#define _COMPLEXTYPE_HH_
    3939
    4040#include <iostream>
     41#ifdef __APPLE__
     42#include <float.h>
     43#else
    4144#include <values.h>
     45#endif
    4246#include "realtype.hh"
    4347#include "catalogmgr/ops.hh"
    4448
  • relcatalogif/floattype.C

    diff --git a/relcatalogif/floattype.C b/relcatalogif/floattype.C
    index f043dd9..cae4b4b 100644
    a b static const char rcsid[] = "@(#)catalogif,FloatType: $Header: /home/rasdev/CVS-  
    3838#include <iomanip>
    3939#include <string.h>
    4040#include "reladminif/oidif.hh"
     41#ifdef __APPLE__
     42#include <float.h>
     43#else
    4144#include <values.h>
     45#endif
    4246
    4347FloatType::FloatType(const OId& id) throw (r_Error)
    4448        :       RealType(id)
  • relcatalogif/mddbasetypecommon.cc

    diff --git a/relcatalogif/mddbasetypecommon.cc b/relcatalogif/mddbasetypecommon.cc
    index 036abe8..15867ec 100644
    a b rasdaman GmbH.  
    3131 * CHANGE HISTORY (append further entries):
    3232 */
    3333
     34#ifdef __APPLE__
     35#include <sys/malloc.h>
     36#else
    3437#include <malloc.h>
     38#endif
    3539#include "raslib/rmdebug.hh"
    3640#include "mddbasetype.hh"
    3741#include "mdddomaintype.hh"
  • relcatalogif/mdddimensiontypecommon.cc

    diff --git a/relcatalogif/mdddimensiontypecommon.cc b/relcatalogif/mdddimensiontypecommon.cc
    index dc71b06..91ce8bd 100644
    a b rasdaman GmbH.  
    2323#include "mymalloc/mymalloc.h"
    2424#include "raslib/rmdebug.hh"
    2525#include "mdddimensiontype.hh"
     26#ifdef __APPLE__
     27#include <sys/malloc.h>
     28#else
    2629#include <malloc.h>
     30#endif
    2731#include "basetype.hh"
    2832#include "mdddomaintype.hh"
    2933#include <iostream>
  • relcatalogif/mdddomaintypecommon.cc

    diff --git a/relcatalogif/mdddomaintypecommon.cc b/relcatalogif/mdddomaintypecommon.cc
    index 0f64848..5013e4a 100644
    a b rasdaman GmbH.  
    2424#include "raslib/rmdebug.hh"
    2525#include "mdddomaintype.hh"
    2626#include "mdddimensiontype.hh"
    27 #include "malloc.h"
     27#ifdef __APPLE__
     28#include <sys/malloc.h>
     29#else
     30#include <malloc.h>
     31#endif
    2832#include "basetype.hh"
    2933#include <iostream>
    3034#include "reladminif/sqlerror.hh"
  • relcatalogif/mddtypecommon.cc

    diff --git a/relcatalogif/mddtypecommon.cc b/relcatalogif/mddtypecommon.cc
    index e1ed1dd..6aba2d5 100644
    a b rasdaman GmbH.  
    2121* or contact Peter Baumann via <baumann@rasdaman.com>.
    2222*/
    2323#include "mymalloc/mymalloc.h"
     24#ifdef __APPLE__
     25#include <sys/malloc.h>
     26#else
    2427#include <malloc.h>
     28#endif
    2529#include <iostream>
    2630#include <string.h>
    2731#include "raslib/minterval.hh"
  • relcatalogif/settypecommon.cc

    diff --git a/relcatalogif/settypecommon.cc b/relcatalogif/settypecommon.cc
    index c05e74c..fa348b1 100644
    a b rasdaman GmbH.  
    2121* or contact Peter Baumann via <baumann@rasdaman.com>.
    2222*/
    2323#include "mymalloc/mymalloc.h"
     24#ifdef __APPLE__
     25#include <sys/malloc.h>
     26#else
    2427#include <malloc.h>
     28#endif
    2529#include "settype.hh"
    2630#include <stdlib.h>
    2731#include <string.h>
  • servercomm/callbackmgr.cc

    diff --git a/servercomm/callbackmgr.cc b/servercomm/callbackmgr.cc
    index ff5cb08..b244b38 100644
    a b rasdaman GmbH.  
    3131*/
    3232
    3333
     34#ifdef __APPLE__
     35#include <sys/malloc.h>
     36#else
    3437#include <malloc.h>
     38#endif
    3539#include <string.h>
    3640#include <stdio.h>
    3741
  • servercomm/httpserver.cc

    diff --git a/servercomm/httpserver.cc b/servercomm/httpserver.cc
    index f75b9b0..247517d 100644
    a b rasdaman GmbH.  
    3535static const char rcsid[] = "@(#)servercomm, HttpServer: $Id: httpserver.cc,v 1.54 2005/09/03 21:05:14 rasdev Exp $";
    3636
    3737#include <iostream>
     38#ifdef __APPLE__
     39#include <sys/malloc.h>
     40#else
    3841#include <malloc.h>
     42#endif
    3943#include <time.h>      // for time()
    4044#include <string.h>
    4145
  • servercomm/manager.cc

    diff --git a/servercomm/manager.cc b/servercomm/manager.cc
    index 8177919..9f9198b 100644
    a b using namespace std;  
    3838
    3939#include <string.h>    // for strcat()
    4040#include <time.h>      // for time()
     41#ifdef __APPLE__
     42#include <sys/malloc.h>
     43#else
    4144#include <malloc.h>
     45#endif
     46
    4247
    4348// server option for switching off garbageCollection (Formerly there were problems
    4449// because of illegal functions called in signal handler, see man 5 attributes;
  • servercomm/servercomm.cc

    diff --git a/servercomm/servercomm.cc b/servercomm/servercomm.cc
    index 076c532..52c7133 100644
    a b static const char rcsid[] = "@(#)servercomm, ServerComm: $Id: servercomm.cc,v 1.  
    5959#include<openssl/evp.h>
    6060
    6161#include <iostream>
     62#ifdef __APPLE__
     63#include <sys/malloc.h>
     64#else
    6265#include <malloc.h>
     66#endif
    6367#include <time.h>      // for time()
    6468#include <string.h>
    6569
    ServerComm::getServerStatus( ServerStatRes& returnStruct )  
    830834                }
    831835        }
    832836
     837#ifndef __APPLE__
    833838        struct mallinfo meminfo = mallinfo();
    834839
    835840        returnStruct.memArena    = meminfo.arena;
    ServerComm::getServerStatus( ServerStatRes& returnStruct )  
    837842        returnStruct.memOrdblks  = meminfo.ordblks;
    838843        returnStruct.memFordblks = meminfo.fordblks;
    839844        returnStruct.memUordblks = meminfo.uordblks;
     845#endif
    840846}
    841847
    842848
  • servercomm/servercomm2.cc

    diff --git a/servercomm/servercomm2.cc b/servercomm/servercomm2.cc
    index 14b7695..0db3010 100644
    a b static const char rcsid[] = "@(#)servercomm2, ServerComm: $Id: servercomm2.cc,v  
    4343#define ANDREAS_2306
    4444
    4545#include <iostream>
     46#ifdef __APPLE__
     47#include <sys/malloc.h>
     48#else
    4649#include <malloc.h>
     50#endif
    4751#include <string.h>
    4852#include <math.h>      // for log(), exp(), floor()
    4953#include <ctime>         // time