Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,26 @@
*.slo
*.lo
*.o
*.obj

# Compiled Dynamic libraries
*.so
*.so*
*.dll
*.pdb
*.exe
*.exp
*.ilk

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

mitab/ogrinfo
mitab/tab2tab
mitab/tabdump
mitab/tabindex
mitab/mitabc_test
mitab/ogr2ogr
cpl/cpl_config.h
4 changes: 2 additions & 2 deletions GNUmake.opt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# BYTE_ORDER_FL = -DCPL_MSB
BYTE_ORDER_FL = -DCPL_LSB

OPTFLAGS = -g -Wall -DDEBUG $(BYTE_ORDER_FL)
OPTFLAGS = -g -Wall -DDEBUG $(BYTE_ORDER_FL) -DOGR_ENABLED
INCLUDE = -I. -I.. -I../cpl
#CXXFLAGS = $(INCLUDE) -fPIC --no-rtti -fno-exceptions $(OPTFLAGS)
CFLAGS = $(INCLUDE) -fPIC $(OPTFLAGS)
Expand Down Expand Up @@ -34,7 +34,7 @@ else
CXX = gcc
endif
endif
CXXFLAGS = $(INCLUDE) -fPIC --no-rtti -fno-exceptions $(OPTFLAGS)
CXXFLAGS = $(INCLUDE) -fPIC --no-rtti $(OPTFLAGS)
endif


Expand Down
5 changes: 4 additions & 1 deletion cpl/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ OBJ = cpl_conv.o cpl_error.o cpl_string.o cpl_vsisimple.o \
cpl_minixml.o cpl_vsil.o cpl_vsi_mem.o \
cpl_vsil_unix_stdio_64.o cpl_multiproc.o cplstring.o \
cpl_getexecpath.o cpl_atomic_ops.o cpl_http.o cpl_strtod.o \
cpl_vsil_subfile.o cpl_recode_stub.o cpl_vsil_stdout.o
cpl_vsil_subfile.o cpl_recode_stub.o cpl_vsil_stdout.o \
cplstringlist.o cpl_recode.o cpl_recode_stub.o cpl_vsil_stdin.o cpl_vsil_stdout.o \
cpl_vsil_sparsefile.o cpl_vsil_tar.o cpl_vsil_cache.o cpl_vsil_abstract_archive.o cpl_time.o \
cpl_hash_set.o cpl_list.o cpl_progress.o cpl_spawn.o cpl_virtualmem.o

LIB = cpl.a

Expand Down
18 changes: 16 additions & 2 deletions cpl/cpl_atomic_ops.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**********************************************************************
* $Id: cpl_atomic_ops.cpp,v 1.1 2010-07-08 19:29:35 aboudreault Exp $
* $Id: cpl_atomic_ops.cpp 27044 2014-03-16 23:41:27Z rouault $
*
* Name: cpl_atomic_ops.cpp
* Project: CPL - Common Portability Library
* Purpose: Atomic operation functions.
* Author: Even Rouault, <even dot rouault at mines dash paris dot org>
*
**********************************************************************
* Copyright (c) 2009, Even Rouault, <even dot rouault at mines dash paris dot org>
* Copyright (c) 2009-2010, Even Rouault <even dot rouault at mines-paris dot org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -110,3 +110,17 @@ int CPLAtomicAdd(volatile int* ptr, int increment)
}

#endif

#ifndef HAS_CPL_INLINE

int CPLAtomicInc(volatile int* ptr)
{
return CPLAtomicAdd(ptr, 1);
}

int CPLAtomicDec(volatile int* ptr)
{
return CPLAtomicAdd(ptr, -1);
}

#endif
12 changes: 10 additions & 2 deletions cpl/cpl_atomic_ops.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/**********************************************************************
* $Id: cpl_atomic_ops.h,v 1.1 2010-07-08 19:29:35 aboudreault Exp $
* $Id: cpl_atomic_ops.h 27044 2014-03-16 23:41:27Z rouault $
*
* Name: cpl_atomic_ops.h
* Project: CPL - Common Portability Library
* Purpose: Atomic operation functions.
* Author: Even Rouault, <even dot rouault at mines dash paris dot org>
*
**********************************************************************
* Copyright (c) 2009, Even Rouault, <even dot rouault at mines dash paris dot org>
* Copyright (c) 2009-2010, Even Rouault <even dot rouault at mines-paris dot org>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
Expand Down Expand Up @@ -69,10 +69,14 @@ int CPL_DLL CPLAtomicAdd(volatile int* ptr, int increment);
* @param ptr a pointer to an integer to increment
* @return the pointed value AFTER the opeation: *ptr + 1
*/
#ifdef HAS_CPL_INLINE
CPL_INLINE int CPLAtomicInc(volatile int* ptr)
{
return CPLAtomicAdd(ptr, 1);
}
#else
int CPL_DLL CPLAtomicInc(volatile int* ptr);
#endif

/** Decrement of 1 the pointed integer in a thread and SMP-safe way
* and return the resulting value of the operation.
Expand All @@ -83,10 +87,14 @@ CPL_INLINE int CPLAtomicInc(volatile int* ptr)
* @param ptr a pointer to an integer to decrement
* @return the pointed value AFTER the opeation: *ptr - 1
*/
#ifdef HAS_CPL_INLINE
CPL_INLINE int CPLAtomicDec(volatile int* ptr)
{
return CPLAtomicAdd(ptr, -1);
}
#else
int CPL_DLL CPLAtomicDec(volatile int* ptr);
#endif

CPL_C_END

Expand Down
235 changes: 204 additions & 31 deletions cpl/cpl_config.h.in
Original file line number Diff line number Diff line change
@@ -1,51 +1,224 @@
/* port/cpl_config.h.in. Generated automatically from configure.in by autoheader. */
/* port/cpl_config.h. Generated from cpl_config.h.in by configure. */
/* port/cpl_config.h.in. Generated from configure.in by autoheader. */

/* Define if you don't have vprintf but do have _doprnt. */
#undef HAVE_DOPRNT
/* Define if you want to use pthreads based multiprocessing support */
#define CPL_MULTIPROC_PTHREAD 1

/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
/* Define to 1 if you have the `PTHREAD_MUTEX_RECURSIVE' constant. */
#define HAVE_PTHREAD_MUTEX_RECURSIVE 1

/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
/* Define to 1 if you have the 5 args `mremap' function. */
#define HAVE_5ARGS_MREMAP 1

/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
/* --prefix directory for GDAL install */
#define GDAL_PREFIX "/home/even/gdal/svn/trunk/dummyinstall"

/* Define to 1 if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1

/* Define to 1 if you have the `atoll' function. */
#define HAVE_ATOLL 1

/* Define to 1 if you have the <csf.h> header file. */
/* #undef HAVE_CSF_H */

/* Define to 1 if you have the <dbmalloc.h> header file. */
/* #undef HAVE_DBMALLOC_H */

/* Define to 1 if you have the declaration of `strtof', and to 0 if you don't.
*/
#define HAVE_DECL_STRTOF 1

/* Define to 1 if you have the <direct.h> header file. */
/* #undef HAVE_DIRECT_H */

/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1

/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */

/* Define to 1 if you have the <errno.h> header file. */
#define HAVE_ERRNO_H 1

/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the <float.h> header file. */
#define HAVE_FLOAT_H 1

/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1

/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV

/* Define as 0 or 1 according to the floating point format suported by the
machine */
#define HAVE_IEEEFP 1

/* Define to 1 if the system has the type `int16'. */
/* #undef HAVE_INT16 */

/* Define to 1 if the system has the type `int32'. */
/* #undef HAVE_INT32 */

/* Define to 1 if the system has the type `int8'. */
/* #undef HAVE_INT8 */

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the <jpeglib.h> header file. */
#define HAVE_JPEGLIB_H 1

/* Define to 1 if you have the `dl' library (-ldl). */
#define HAVE_LIBDL 1

/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1

/* Define to 1 if you have the `pq' library (-lpq). */
#define HAVE_LIBPQ 1

/* Define to 1 if you have the `rt' library (-lrt). */
#define HAVE_LIBRT 1

/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1

/* Define to 1 if you have the <locale.h> header file. */
#define HAVE_LOCALE_H 1

/* Define to 1, if your compiler supports long long data type */
#define HAVE_LONG_LONG 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the <png.h> header file. */
#define HAVE_PNG_H 1

/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strtof' function. */
#define HAVE_STRTOF 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the <values.h> header file. */
#define HAVE_VALUES_H 1

/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1

/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1

/* Define to 1 if you have the `readlink' function. */
#define HAVE_READLINK 1

/* Define to 1 if you have the `posix_spawnp' function. */
#define HAVE_POSIX_SPAWNP 1

/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1

/* Define to 1 if you have the `lstat' function. */
#define HAVE_LSTAT 1

/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
#define HOST_FILLORDER FILLORDER_LSB2MSB

/* Define as const if the declaration of iconv() needs const. */
#define ICONV_CONST

/* For .cpp files, define as const if the declaration of iconv() needs const. */
#define ICONV_CPP_CONST

/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#define LT_OBJDIR ".libs/"

/* Define for Mac OSX Framework build */
/* #undef MACOSX_FRAMEWORK */

/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* The size of `long', as computed by sizeof. */
/* #undef SIZEOF_LONG */

/* The size of `unsigned long', as computed by sizeof. */
#define SIZEOF_UNSIGNED_LONG 8

/* The size of `void*', as computed by sizeof. */
#define SIZEOF_VOIDP 8

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you have fseek64, ftell64 */
#define UNIX_STDIO_64 1

/* Define to 1 if you want to use the -fvisibility GCC flag */
/* #undef USE_GCC_VISIBILITY_FLAG */

/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if GCC atomic builtins are available */
#define HAVE_GCC_ATOMIC_BUILTINS 1

/* Define if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to name of 64bit fopen function */
#define VSI_FOPEN64 fopen64

#undef HAVE_LIBDL
/* Define to name of 64bit ftruncate function */
#define VSI_FTRUNCATE64 ftruncate64

#undef HAVE_DLFCN_H
#undef HAVE_DBMALLOC_H
#undef HAVE_LIBDBMALLOC
#undef WORDS_BIGENDIAN
/* Define to name of 64bit fseek func */
#define VSI_FSEEK64 fseeko64

/* Define if you have ftell64 and fseek64 */
#undef UNIX_STDIO_64
/* Define to name of 64bit ftell func */
#define VSI_FTELL64 ftello64

/* What 64bit stdio api entry points to use */
#undef VSI_FTELL64
#undef VSI_FSEEK64
/* Define to 1, if you have 64 bit STDIO API */
#define VSI_LARGE_API_SUPPORTED 1

/* Define if you have 64 bit long long type */
#undef HAVE_LONG_LONG
/* Define to 1, if you have LARGEFILE64_SOURCE */
/* #undef VSI_NEED_LARGEFILE64_SOURCE */

/* Define if large file api should be enabled, normally with UNIX_STDIO_64 */
#undef VSI_LARGE_API_SUPPORTED
/* Define to name of 64bit stat function */
#define VSI_STAT64 stat64

/* Define if _LARGEFILE64_SOURCE needs to be defined. */
#undef VSI_NEED_LARGEFILE64_SOURCE
/* Define to name of 64bit stat structure */
#define VSI_STAT64_T stat64

/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */

/* Define to 1 if you have the `getaddrinfo' function. */
#define HAVE_GETADDRINFO 1

/* Use this file to override settings in instances where you're doing FAT compiles
on Apple. It is currently off by default because it doesn't seem to work with
newish ( XCode >= 3/28/11) XCodes */
/* #include "cpl_config_extras.h" */
Loading