Skip to content

Commit b04c6c0

Browse files
committed
fix that zend_highlight.h is not introduced
解决:error: implicit declaration of function 'zend_strip' is invalid in C99
1 parent c36d550 commit b04c6c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

beast.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
3434
#include "zend.h"
3535
#include "zend_operators.h"
3636
#include "zend_globals.h"
37+
#include "zend_highlight.h"
3738
#include "zend_language_scanner.h"
3839

3940
#include "zend_API.h"
@@ -657,8 +658,9 @@ cgi_compile_file(zend_file_handle *h, int type TSRMLS_DC)
657658
}
658659

659660
if (h->type == ZEND_HANDLE_FP) fclose(h->handle.fp);
661+
#ifdef ZEND_HANDLE_FD
660662
if (h->type == ZEND_HANDLE_FD) close(h->handle.fd);
661-
663+
#endif
662664
/*
663665
* Get file handler and free context
664666
*/
@@ -667,10 +669,12 @@ cgi_compile_file(zend_file_handle *h, int type TSRMLS_DC)
667669
h->type = ZEND_HANDLE_FP;
668670
h->handle.fp = default_file_handler->get_fp(default_file_handler);
669671
break;
672+
#ifdef ZEND_HANDLE_FD
670673
case BEAST_FILE_HANDLER_FD:
671674
h->type = ZEND_HANDLE_FD;
672675
h->handle.fd = default_file_handler->get_fd(default_file_handler);
673676
break;
677+
#endif
674678
}
675679

676680
final:

0 commit comments

Comments
 (0)