@@ -347,23 +347,23 @@ static void fcgi_setup_signals(void)
347
347
}
348
348
#endif
349
349
350
- void fcgi_set_in_shutdown (int new_value )
350
+ FCGI_API void fcgi_set_in_shutdown (int new_value )
351
351
{
352
352
in_shutdown = new_value ;
353
353
}
354
354
355
- int fcgi_in_shutdown (void )
355
+ FCGI_API int fcgi_in_shutdown (void )
356
356
{
357
357
return in_shutdown ;
358
358
}
359
359
360
- void fcgi_terminate (void )
360
+ FCGI_API void fcgi_terminate (void )
361
361
{
362
362
in_shutdown = 1 ;
363
363
}
364
364
365
365
#ifndef HAVE_ATTRIBUTE_WEAK
366
- void fcgi_set_logger (fcgi_logger lg ) {
366
+ FCGI_API void fcgi_set_logger (fcgi_logger lg ) {
367
367
fcgi_log = lg ;
368
368
}
369
369
#else
@@ -376,7 +376,7 @@ void __attribute__((weak)) fcgi_log(int type, const char *format, ...) {
376
376
}
377
377
#endif
378
378
379
- int fcgi_init (void )
379
+ FCGI_API int fcgi_init (void )
380
380
{
381
381
if (!is_initialized ) {
382
382
#ifndef _WIN32
@@ -442,7 +442,7 @@ int fcgi_init(void)
442
442
}
443
443
444
444
445
- int fcgi_is_fastcgi (void )
445
+ FCGI_API int fcgi_is_fastcgi (void )
446
446
{
447
447
if (!is_initialized ) {
448
448
return fcgi_init ();
@@ -451,7 +451,7 @@ int fcgi_is_fastcgi(void)
451
451
}
452
452
}
453
453
454
- void fcgi_shutdown (void )
454
+ FCGI_API void fcgi_shutdown (void )
455
455
{
456
456
if (is_initialized ) {
457
457
zend_hash_destroy (& fcgi_mgmt_vars );
@@ -543,7 +543,7 @@ static int is_port_number(const char *bindpath)
543
543
return 1 ;
544
544
}
545
545
546
- int fcgi_listen (const char * path , int backlog )
546
+ FCGI_API int fcgi_listen (const char * path , int backlog )
547
547
{
548
548
char * s ;
549
549
int tcp = 0 ;
@@ -723,7 +723,7 @@ int fcgi_listen(const char *path, int backlog)
723
723
return listen_socket ;
724
724
}
725
725
726
- void fcgi_set_allowed_clients (char * ip )
726
+ FCGI_API void fcgi_set_allowed_clients (char * ip )
727
727
{
728
728
char * cur , * end ;
729
729
int n ;
@@ -768,7 +768,7 @@ void fcgi_set_allowed_clients(char *ip)
768
768
}
769
769
}
770
770
771
- fcgi_request * fcgi_init_request (fcgi_request * req , int listen_socket )
771
+ FCGI_API fcgi_request * fcgi_init_request (fcgi_request * req , int listen_socket )
772
772
{
773
773
memset (req , 0 , sizeof (fcgi_request ));
774
774
req -> listen_socket = listen_socket ;
@@ -799,7 +799,7 @@ fcgi_request *fcgi_init_request(fcgi_request *req, int listen_socket)
799
799
return req ;
800
800
}
801
801
802
- void fcgi_destroy_request (fcgi_request * req ) {
802
+ FCGI_API void fcgi_destroy_request (fcgi_request * req ) {
803
803
if (req -> env .buckets ) {
804
804
fcgi_hash_destroy (& req -> env );
805
805
}
@@ -1093,7 +1093,7 @@ static int fcgi_read_request(fcgi_request *req)
1093
1093
return 1 ;
1094
1094
}
1095
1095
1096
- int fcgi_read (fcgi_request * req , char * str , int len )
1096
+ FCGI_API int fcgi_read (fcgi_request * req , char * str , int len )
1097
1097
{
1098
1098
int ret , n , rest ;
1099
1099
fcgi_header hdr ;
@@ -1146,7 +1146,7 @@ int fcgi_read(fcgi_request *req, char *str, int len)
1146
1146
return n ;
1147
1147
}
1148
1148
1149
- void fcgi_close (fcgi_request * req , int force , int destroy )
1149
+ FCGI_API void fcgi_close (fcgi_request * req , int force , int destroy )
1150
1150
{
1151
1151
if (destroy && req -> has_env ) {
1152
1152
fcgi_hash_clean (& req -> env );
@@ -1199,7 +1199,7 @@ void fcgi_close(fcgi_request *req, int force, int destroy)
1199
1199
}
1200
1200
}
1201
1201
1202
- int fcgi_is_closed (fcgi_request * req )
1202
+ FCGI_API int fcgi_is_closed (fcgi_request * req )
1203
1203
{
1204
1204
return (req -> fd < 0 );
1205
1205
}
@@ -1243,7 +1243,7 @@ static int fcgi_is_allowed() {
1243
1243
return 0 ;
1244
1244
}
1245
1245
1246
- int fcgi_accept_request (fcgi_request * req )
1246
+ FCGI_API int fcgi_accept_request (fcgi_request * req )
1247
1247
{
1248
1248
#ifdef _WIN32
1249
1249
HANDLE pipe ;
@@ -1399,7 +1399,7 @@ static inline void close_packet(fcgi_request *req)
1399
1399
}
1400
1400
}
1401
1401
1402
- int fcgi_flush (fcgi_request * req , int close )
1402
+ FCGI_API int fcgi_flush (fcgi_request * req , int close )
1403
1403
{
1404
1404
int len ;
1405
1405
@@ -1429,7 +1429,7 @@ int fcgi_flush(fcgi_request *req, int close)
1429
1429
return 1 ;
1430
1430
}
1431
1431
1432
- int fcgi_write (fcgi_request * req , fcgi_request_type type , const char * str , int len )
1432
+ FCGI_API int fcgi_write (fcgi_request * req , fcgi_request_type type , const char * str , int len )
1433
1433
{
1434
1434
int limit , rest ;
1435
1435
@@ -1541,7 +1541,7 @@ int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *str, int l
1541
1541
return len ;
1542
1542
}
1543
1543
1544
- int fcgi_finish_request (fcgi_request * req , int force_close )
1544
+ FCGI_API int fcgi_finish_request (fcgi_request * req , int force_close )
1545
1545
{
1546
1546
int ret = 1 ;
1547
1547
@@ -1555,7 +1555,7 @@ int fcgi_finish_request(fcgi_request *req, int force_close)
1555
1555
return ret ;
1556
1556
}
1557
1557
1558
- char * fcgi_getenv (fcgi_request * req , const char * var , int var_len )
1558
+ FCGI_API char * fcgi_getenv (fcgi_request * req , const char * var , int var_len )
1559
1559
{
1560
1560
unsigned int val_len ;
1561
1561
@@ -1564,14 +1564,14 @@ char* fcgi_getenv(fcgi_request *req, const char* var, int var_len)
1564
1564
return fcgi_hash_get (& req -> env , FCGI_HASH_FUNC (var , var_len ), (char * )var , var_len , & val_len );
1565
1565
}
1566
1566
1567
- char * fcgi_quick_getenv (fcgi_request * req , const char * var , int var_len , unsigned int hash_value )
1567
+ FCGI_API char * fcgi_quick_getenv (fcgi_request * req , const char * var , int var_len , unsigned int hash_value )
1568
1568
{
1569
1569
unsigned int val_len ;
1570
1570
1571
1571
return fcgi_hash_get (& req -> env , hash_value , (char * )var , var_len , & val_len );
1572
1572
}
1573
1573
1574
- char * fcgi_putenv (fcgi_request * req , char * var , int var_len , char * val )
1574
+ FCGI_API char * fcgi_putenv (fcgi_request * req , char * var , int var_len , char * val )
1575
1575
{
1576
1576
if (!req ) return NULL ;
1577
1577
if (val == NULL ) {
@@ -1582,7 +1582,7 @@ char* fcgi_putenv(fcgi_request *req, char* var, int var_len, char* val)
1582
1582
}
1583
1583
}
1584
1584
1585
- char * fcgi_quick_putenv (fcgi_request * req , char * var , int var_len , unsigned int hash_value , char * val )
1585
+ FCGI_API char * fcgi_quick_putenv (fcgi_request * req , char * var , int var_len , unsigned int hash_value , char * val )
1586
1586
{
1587
1587
if (val == NULL ) {
1588
1588
fcgi_hash_del (& req -> env , hash_value , var , var_len );
@@ -1592,13 +1592,13 @@ char* fcgi_quick_putenv(fcgi_request *req, char* var, int var_len, unsigned int
1592
1592
}
1593
1593
}
1594
1594
1595
- void fcgi_loadenv (fcgi_request * req , fcgi_apply_func func , zval * array )
1595
+ FCGI_API void fcgi_loadenv (fcgi_request * req , fcgi_apply_func func , zval * array )
1596
1596
{
1597
1597
fcgi_hash_apply (& req -> env , func , array );
1598
1598
}
1599
1599
1600
1600
#ifdef _WIN32
1601
- void fcgi_impersonate (void )
1601
+ FCGI_API void fcgi_impersonate (void )
1602
1602
{
1603
1603
char * os_name ;
1604
1604
@@ -1609,19 +1609,19 @@ void fcgi_impersonate(void)
1609
1609
}
1610
1610
#endif
1611
1611
1612
- void fcgi_set_mgmt_var (const char * name , size_t name_len , const char * value , size_t value_len )
1612
+ FCGI_API void fcgi_set_mgmt_var (const char * name , size_t name_len , const char * value , size_t value_len )
1613
1613
{
1614
1614
zval zvalue ;
1615
1615
ZVAL_NEW_STR (& zvalue , zend_string_init (value , value_len , 1 ));
1616
1616
zend_hash_str_add (& fcgi_mgmt_vars , name , name_len , & zvalue );
1617
1617
}
1618
1618
1619
- void fcgi_free_mgmt_var_cb (zval * zv )
1619
+ FCGI_API void fcgi_free_mgmt_var_cb (zval * zv )
1620
1620
{
1621
1621
pefree (Z_STR_P (zv ), 1 );
1622
1622
}
1623
1623
1624
- const char * fcgi_get_last_client_ip ()
1624
+ FCGI_API const char * fcgi_get_last_client_ip ()
1625
1625
{
1626
1626
static char str [INET6_ADDRSTRLEN ];
1627
1627
0 commit comments