Skip to content

Commit 497e21d

Browse files
committed
Feat: static built
1 parent 83b993d commit 497e21d

File tree

14 files changed

+65
-29
lines changed

14 files changed

+65
-29
lines changed

include/chart.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef PHP_EXT_EXCEL_EXPORT_CHART_H
1414
#define PHP_EXT_EXCEL_EXPORT_CHART_H
1515

16+
#include "common.h"
17+
1618
extern zend_class_entry *vtiful_chart_ce;
1719

1820
VTIFUL_STARTUP_FUNCTION(chart);

include/common.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
+----------------------------------------------------------------------+
3+
| XlsWriter Extension |
4+
+----------------------------------------------------------------------+
5+
| Copyright (c) 2017-2018 The Viest |
6+
+----------------------------------------------------------------------+
7+
| http://www.viest.me |
8+
+----------------------------------------------------------------------+
9+
| Author: viest <[email protected]> |
10+
+----------------------------------------------------------------------+
11+
*/
12+
13+
#ifndef PHP_EXT_XLS_WRITER_COMMON_H
14+
#define PHP_EXT_XLS_WRITER_COMMON_H
15+
16+
#ifdef PHP_WIN32
17+
# define PHP_VTIFUL_API __declspec(dllexport)
18+
#elif defined(__GNUC__) && __GNUC__ >= 4
19+
# define PHP_VTIFUL_API __attribute__ ((visibility("default")))
20+
#else
21+
# define PHP_VTIFUL_API
22+
#endif
23+
24+
#ifdef ZTS
25+
#include "TSRM.h"
26+
#endif
27+
28+
#if PHP_VERSION_ID >= 80000
29+
#define TSRMLS_D void
30+
#define TSRMLS_DC
31+
#define TSRMLS_C
32+
#define TSRMLS_CC
33+
#endif
34+
35+
#define VTIFUL_RESOURCE_NAME "xlsx"
36+
37+
#define VTIFUL_STARTUP_MODULE(module) ZEND_MODULE_STARTUP_N(xlsxwriter_##module)(INIT_FUNC_ARGS_PASSTHRU)
38+
#define VTIFUL_STARTUP_FUNCTION(module) ZEND_MINIT_FUNCTION(xlsxwriter_##module)
39+
40+
#if defined(ZTS) && defined(COMPILE_DL_VTIFUL)
41+
ZEND_TSRMLS_CACHE_EXTERN();
42+
#endif
43+
44+
#endif

include/csv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef PHP_EXT_XLS_WRITER_CSV_H
1414
#define PHP_EXT_XLS_WRITER_CSV_H
1515

16+
#include "common.h"
17+
1618
unsigned int xlsx_to_csv(
1719
zval *stream_resource,
1820
const char *delimiter_str, int delimiter_str_len,

include/excel.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef VTIFUL_XLS_H
1414
#define VTIFUL_XLS_H
1515

16+
#include "common.h"
17+
1618
#define V_XLS_HANDLE "handle"
1719
#define V_XLS_FIL "fileName"
1820
#define V_XLS_COF "config"

include/exception.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef VTIFUL_XLS_EXCEPTION_H
1414
#define VTIFUL_XLS_EXCEPTION_H
1515

16+
#include "common.h"
17+
1618
extern zend_class_entry *vtiful_exception_ce;
1719

1820
VTIFUL_STARTUP_FUNCTION(exception);

include/format.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef PHP_EXT_XLS_EXPORT_FORMAT_H
1414
#define PHP_EXT_XLS_EXPORT_FORMAT_H
1515

16+
#include "common.h"
17+
1618
extern zend_class_entry *vtiful_format_ce;
1719

1820
VTIFUL_STARTUP_FUNCTION(format);

include/help.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef PHP_EXT_XLS_EXPORT_HELP_H
1414
#define PHP_EXT_XLS_EXPORT_HELP_H
1515

16+
#include "common.h"
17+
1618
unsigned int file_exists(const char *path);
1719
unsigned int directory_exists(const char *path);
1820
zend_long date_double_to_timestamp(double value);

include/read.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef PHP_READ_INCLUDE_H
1414
#define PHP_READ_INCLUDE_H
1515

16+
#include "common.h"
17+
1618
#define READ_SKIP_ROW 0
1719
#define READ_ROW 0x01
1820
#define SKIP_EMPTY_VALUE 0x100

include/rich_string.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef PHP_EXT_XLS_EXPORT_RICH_STRING_H
1414
#define PHP_EXT_XLS_EXPORT_RICH_STRING_H
1515

16+
#include "common.h"
17+
1618
extern zend_class_entry *vtiful_rich_string_ce;
1719

1820
VTIFUL_STARTUP_FUNCTION(rich_string);

include/validation.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
#ifndef PHP_EXT_XLS_WRITER_VALIDATION_H
1414
#define PHP_EXT_XLS_WRITER_VALIDATION_H
1515

16+
#include "common.h"
17+
1618
extern zend_class_entry *vtiful_validation_ce;
1719

1820
VTIFUL_STARTUP_FUNCTION(validation);

0 commit comments

Comments
 (0)