@@ -347,23 +347,23 @@ static void fcgi_setup_signals(void)
347
347
}
348
348
#endif
349
349
350
- FCGI_API void fcgi_set_in_shutdown (int new_value )
350
+ void fcgi_set_in_shutdown (int new_value )
351
351
{
352
352
in_shutdown = new_value ;
353
353
}
354
354
355
- FCGI_API int fcgi_in_shutdown (void )
355
+ int fcgi_in_shutdown (void )
356
356
{
357
357
return in_shutdown ;
358
358
}
359
359
360
- FCGI_API void fcgi_terminate (void )
360
+ void fcgi_terminate (void )
361
361
{
362
362
in_shutdown = 1 ;
363
363
}
364
364
365
365
#ifndef HAVE_ATTRIBUTE_WEAK
366
- FCGI_API void fcgi_set_logger (fcgi_logger lg ) {
366
+ 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
- FCGI_API int fcgi_init (void )
379
+ int fcgi_init (void )
380
380
{
381
381
if (!is_initialized ) {
382
382
#ifndef _WIN32
@@ -442,7 +442,7 @@ FCGI_API int fcgi_init(void)
442
442
}
443
443
444
444
445
- FCGI_API int fcgi_is_fastcgi (void )
445
+ int fcgi_is_fastcgi (void )
446
446
{
447
447
if (!is_initialized ) {
448
448
return fcgi_init ();
@@ -451,7 +451,7 @@ FCGI_API int fcgi_is_fastcgi(void)
451
451
}
452
452
}
453
453
454
- FCGI_API void fcgi_shutdown (void )
454
+ 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
- FCGI_API int fcgi_listen (const char * path , int backlog )
546
+ int fcgi_listen (const char * path , int backlog )
547
547
{
548
548
char * s ;
549
549
int tcp = 0 ;
@@ -723,7 +723,7 @@ FCGI_API int fcgi_listen(const char *path, int backlog)
723
723
return listen_socket ;
724
724
}
725
725
726
- FCGI_API void fcgi_set_allowed_clients (char * ip )
726
+ void fcgi_set_allowed_clients (char * ip )
727
727
{
728
728
char * cur , * end ;
729
729
int n ;
@@ -772,7 +772,7 @@ static void fcgi_hook_dummy() {
772
772
return ;
773
773
}
774
774
775
- FCGI_API fcgi_request * fcgi_init_request (fcgi_request * req , int listen_socket )
775
+ fcgi_request * fcgi_init_request (fcgi_request * req , int listen_socket )
776
776
{
777
777
memset (req , 0 , sizeof (fcgi_request ));
778
778
req -> listen_socket = listen_socket ;
@@ -807,7 +807,7 @@ FCGI_API fcgi_request *fcgi_init_request(fcgi_request *req, int listen_socket)
807
807
return req ;
808
808
}
809
809
810
- FCGI_API void fcgi_destroy_request (fcgi_request * req ) {
810
+ void fcgi_destroy_request (fcgi_request * req ) {
811
811
fcgi_hash_destroy (& req -> env );
812
812
}
813
813
@@ -1099,7 +1099,7 @@ static int fcgi_read_request(fcgi_request *req)
1099
1099
return 1 ;
1100
1100
}
1101
1101
1102
- FCGI_API int fcgi_read (fcgi_request * req , char * str , int len )
1102
+ int fcgi_read (fcgi_request * req , char * str , int len )
1103
1103
{
1104
1104
int ret , n , rest ;
1105
1105
fcgi_header hdr ;
@@ -1152,7 +1152,7 @@ FCGI_API int fcgi_read(fcgi_request *req, char *str, int len)
1152
1152
return n ;
1153
1153
}
1154
1154
1155
- FCGI_API void fcgi_close (fcgi_request * req , int force , int destroy )
1155
+ void fcgi_close (fcgi_request * req , int force , int destroy )
1156
1156
{
1157
1157
if (destroy && req -> has_env ) {
1158
1158
fcgi_hash_clean (& req -> env );
@@ -1203,7 +1203,7 @@ FCGI_API void fcgi_close(fcgi_request *req, int force, int destroy)
1203
1203
}
1204
1204
}
1205
1205
1206
- FCGI_API int fcgi_is_closed (fcgi_request * req )
1206
+ int fcgi_is_closed (fcgi_request * req )
1207
1207
{
1208
1208
return (req -> fd < 0 );
1209
1209
}
@@ -1246,7 +1246,7 @@ static int fcgi_is_allowed() {
1246
1246
return 0 ;
1247
1247
}
1248
1248
1249
- FCGI_API int fcgi_accept_request (fcgi_request * req )
1249
+ int fcgi_accept_request (fcgi_request * req )
1250
1250
{
1251
1251
#ifdef _WIN32
1252
1252
HANDLE pipe ;
@@ -1397,7 +1397,7 @@ static inline void close_packet(fcgi_request *req)
1397
1397
}
1398
1398
}
1399
1399
1400
- FCGI_API int fcgi_flush (fcgi_request * req , int close )
1400
+ int fcgi_flush (fcgi_request * req , int close )
1401
1401
{
1402
1402
int len ;
1403
1403
@@ -1427,7 +1427,7 @@ FCGI_API int fcgi_flush(fcgi_request *req, int close)
1427
1427
return 1 ;
1428
1428
}
1429
1429
1430
- FCGI_API int fcgi_write (fcgi_request * req , fcgi_request_type type , const char * str , int len )
1430
+ int fcgi_write (fcgi_request * req , fcgi_request_type type , const char * str , int len )
1431
1431
{
1432
1432
int limit , rest ;
1433
1433
@@ -1539,7 +1539,7 @@ FCGI_API int fcgi_write(fcgi_request *req, fcgi_request_type type, const char *s
1539
1539
return len ;
1540
1540
}
1541
1541
1542
- FCGI_API int fcgi_finish_request (fcgi_request * req , int force_close )
1542
+ int fcgi_finish_request (fcgi_request * req , int force_close )
1543
1543
{
1544
1544
int ret = 1 ;
1545
1545
@@ -1553,7 +1553,7 @@ FCGI_API int fcgi_finish_request(fcgi_request *req, int force_close)
1553
1553
return ret ;
1554
1554
}
1555
1555
1556
- FCGI_API char * fcgi_getenv (fcgi_request * req , const char * var , int var_len )
1556
+ char * fcgi_getenv (fcgi_request * req , const char * var , int var_len )
1557
1557
{
1558
1558
unsigned int val_len ;
1559
1559
@@ -1562,14 +1562,14 @@ FCGI_API char* fcgi_getenv(fcgi_request *req, const char* var, int var_len)
1562
1562
return fcgi_hash_get (& req -> env , FCGI_HASH_FUNC (var , var_len ), (char * )var , var_len , & val_len );
1563
1563
}
1564
1564
1565
- FCGI_API char * fcgi_quick_getenv (fcgi_request * req , const char * var , int var_len , unsigned int hash_value )
1565
+ char * fcgi_quick_getenv (fcgi_request * req , const char * var , int var_len , unsigned int hash_value )
1566
1566
{
1567
1567
unsigned int val_len ;
1568
1568
1569
1569
return fcgi_hash_get (& req -> env , hash_value , (char * )var , var_len , & val_len );
1570
1570
}
1571
1571
1572
- FCGI_API char * fcgi_putenv (fcgi_request * req , char * var , int var_len , char * val )
1572
+ char * fcgi_putenv (fcgi_request * req , char * var , int var_len , char * val )
1573
1573
{
1574
1574
if (!req ) return NULL ;
1575
1575
if (val == NULL ) {
@@ -1580,7 +1580,7 @@ FCGI_API char* fcgi_putenv(fcgi_request *req, char* var, int var_len, char* val)
1580
1580
}
1581
1581
}
1582
1582
1583
- FCGI_API char * fcgi_quick_putenv (fcgi_request * req , char * var , int var_len , unsigned int hash_value , char * val )
1583
+ char * fcgi_quick_putenv (fcgi_request * req , char * var , int var_len , unsigned int hash_value , char * val )
1584
1584
{
1585
1585
if (val == NULL ) {
1586
1586
fcgi_hash_del (& req -> env , hash_value , var , var_len );
@@ -1590,13 +1590,13 @@ FCGI_API char* fcgi_quick_putenv(fcgi_request *req, char* var, int var_len, unsi
1590
1590
}
1591
1591
}
1592
1592
1593
- FCGI_API void fcgi_loadenv (fcgi_request * req , fcgi_apply_func func , zval * array )
1593
+ void fcgi_loadenv (fcgi_request * req , fcgi_apply_func func , zval * array )
1594
1594
{
1595
1595
fcgi_hash_apply (& req -> env , func , array );
1596
1596
}
1597
1597
1598
1598
#ifdef _WIN32
1599
- FCGI_API void fcgi_impersonate (void )
1599
+ void fcgi_impersonate (void )
1600
1600
{
1601
1601
char * os_name ;
1602
1602
@@ -1607,19 +1607,19 @@ FCGI_API void fcgi_impersonate(void)
1607
1607
}
1608
1608
#endif
1609
1609
1610
- FCGI_API void fcgi_set_mgmt_var (const char * name , size_t name_len , const char * value , size_t value_len )
1610
+ void fcgi_set_mgmt_var (const char * name , size_t name_len , const char * value , size_t value_len )
1611
1611
{
1612
1612
zval zvalue ;
1613
1613
ZVAL_NEW_STR (& zvalue , zend_string_init (value , value_len , 1 ));
1614
1614
zend_hash_str_add (& fcgi_mgmt_vars , name , name_len , & zvalue );
1615
1615
}
1616
1616
1617
- FCGI_API void fcgi_free_mgmt_var_cb (zval * zv )
1617
+ void fcgi_free_mgmt_var_cb (zval * zv )
1618
1618
{
1619
1619
pefree (Z_STR_P (zv ), 1 );
1620
1620
}
1621
1621
1622
- FCGI_API const char * fcgi_get_last_client_ip ()
1622
+ const char * fcgi_get_last_client_ip ()
1623
1623
{
1624
1624
static char str [INET6_ADDRSTRLEN ];
1625
1625
0 commit comments