1 /*********************************************************************** 2 * 3 * GEOS - Geometry Engine Open Source 4 * http://trac.osgeo.org/geos 5 * 6 * Copyright (C) 2010 Sandro Santilli <strk@kbt.io> 7 * 8 * This library is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU Lesser General Public 10 * License as published by the Free Software Foundation; either 11 * version 2.1 of the License, or (at your option) any later version. 12 * 13 * This library is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * Lesser General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program; if not, write to the Free Software 20 * Foundation, Inc., 51 Franklin St, Fifth Floor, 21 * Boston, MA 02110-1301 USA 22 * 23 ***********************************************************************/ 24 25 #ifndef PHP_GEOS_H 26 #define PHP_GEOS_H 27 28 /* TODO: generate from ./configure ? */ 29 #define PHP_GEOS_VERSION "0.0" 30 #define PHP_GEOS_EXTNAME "geos" 31 32 #ifdef HAVE_CONFIG_H 33 #include "config.h" 34 #endif 35 36 #include "php.h" 37 38 #ifdef ZTS 39 #include "TSRM.h" 40 #endif 41 42 extern zend_module_entry geos_module_entry; 43 #define phpext_geos_ptr &geos_module_entry; 44 45 #ifdef ZTS 46 #define GEOS_G(v) TSRMG(geos_globals_id, zend_geos_globals *, v) 47 #else 48 #define GEOS_G(v) (geos_globals.v) 49 #endif 50 51 ZEND_BEGIN_MODULE_GLOBALS(geos) 52 GEOSContextHandle_t handle; 53 ZEND_END_MODULE_GLOBALS(geos) 54 55 #endif /* PHP_GEOS_H */ 56