php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20752 Seems like it has something to do with ZEND_API(?).
Submitted: 2002-12-01 17:38 UTC Modified: 2003-01-13 15:54 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: novell at kiruna dot se Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4CVS-2002-12-01 (dev) OS: Tru64 5.1a
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: novell at kiruna dot se
New email:
PHP Version: OS:

 

 [2002-12-01 17:38 UTC] novell at kiruna dot se
I'm using the shipped c compiler, GNU versions of bison,
autoconf, automake, flex, gmake.

Here's the output from the compile:

cc: Error: /opt/DEV/php/php4/Zend/zend_globals_macros.h, line 37: Missing 
";". (nosemi)
extern ZEND_API struct _zend_compiler_globals compiler_globals;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_globals_macros.h, line 47: Missing 
";". (nosemi)
extern ZEND_API zend_executor_globals executor_globals;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_globals_macros.h, line 56: Missing 
";". (nosemi)
extern ZEND_API zend_alloc_globals alloc_globals;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_globals_macros.h, line 66: Missing 
";". (nosemi)
extern ZEND_API zend_scanner_globals language_scanner_globals;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_globals_macros.h, line 76: Missing 
";". (nosemi)
extern ZEND_API zend_scanner_globals ini_scanner_globals;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_alloc.h, line 73: Missing ";". 
(nosemi)
ZEND_API char *zend_strndup(const char *s, unsigned int length);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_hash.h, line 79: Missing ";". 
(nosemi)
ZEND_API int zend_hash_init(HashTable *ht, uint nSize, hash_func_t 
pHashFunction, dtor_func_t pDestructor, int persistent);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_hash.h, line 121: Missing ";". 
(nosemi)
ZEND_API void zend_hash_graceful_destroy(HashTable *ht);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_hash.h, line 203: Missing ";". 
(nosemi)
ZEND_API ulong zend_hash_func(char *arKey, uint nKeyLength);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_llist.h, line 51: Missing ";". 
(nosemi)
ZEND_API void zend_llist_init(zend_llist *l, size_t size, llist_dtor_func_t 
dtor, unsigned char persistent);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 360: Missing ";". (nosemi)
ZEND_API void _zend_bailout(char *filename, uint lineno);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 418: Missing ";". (nosemi)
extern ZEND_API int (*zend_printf)(const char *format, ...);
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 419: Missing ";". (nosemi)
extern ZEND_API zend_write_func_t zend_write;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 420: Missing ";". (nosemi)
extern ZEND_API FILE *(*zend_fopen)(const char *filename, char 
**opened_path);
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 421: Missing ";". (nosemi)
extern ZEND_API void (*zend_block_interruptions)(void);
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 422: Missing ";". (nosemi)
extern ZEND_API void (*zend_unblock_interruptions)(void);
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 423: Missing ";". (nosemi)
extern ZEND_API void (*zend_ticks_function)(int ticks);
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 424: Missing ";". (nosemi)
extern ZEND_API void (*zend_error_cb)(int type, const char *error_filename, 
const uint error_lineno, const char *format, va_list args);
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 428: Missing ";". (nosemi)
ZEND_API void zend_error(int type, const char *format, ...);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 434: Missing ";". (nosemi)
extern ZEND_API zend_class_entry zend_standard_class_def;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend.h, line 436: Missing ";". (nosemi)
extern ZEND_API zval zval_used_for_init;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_modules.h, line 81: Missing ";". 
(nosemi)
extern ZEND_API HashTable module_registry;
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_stack.h, line 32: Missing ";". 
(nosemi)
ZEND_API int zend_stack_init(zend_stack *stack);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_ptr_stack.h, line 33: Missing ";". 
(nosemi)
ZEND_API void zend_ptr_stack_init(zend_ptr_stack *stack);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_compile.h, line 196: Missing ";". 
(nosemi)
extern ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle 
*file_handle, int type TSRMLS_DC);
 ----------------^
cc: Error: /opt/DEV/php/php4/Zend/zend_compile.h, line 204: Missing ";". 
(nosemi)
ZEND_API int lex_scan(zval *zendlval TSRMLS_DC);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_compile.h, line 208: Missing ";". 
(nosemi)
ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename 
TSRMLS_DC);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_compile.h, line 237: Missing ";". 
(nosemi)
ZEND_API unary_op_type get_unary_op(int opcode);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_compile.h, line 275: Missing ";". 
(nosemi)
ZEND_API int do_bind_function_or_class(zend_op *opline, HashTable 
*function_table, HashTable *class_table, int compile_time);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_compile.h, line 353: Missing ";". 
(nosemi)
ZEND_API void function_add_ref(zend_function *function);
 ---------^
cc: Error: /opt/DEV/php/php4/Zend/zend_compile.h, line 383: Missing ";". 
(nosemi)
ZEND_API zend_bool zend_is_compiling(TSRMLS_D);
 ---------^
cc: Severe: More than 30 errors were encountered in the course of 
compilation. (toomanyerr)
*** Exit 1
Stop.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-01 18:36 UTC] novell at kiruna dot se
Just some notes what I need to test:
#define ZEND_API extern

Second one:
Remove the extern's and just use ZEND_API.
 [2002-12-01 18:39 UTC] sniper@php.net
The cc on tru64 does not like having 'empty' / non-existing defines. ZEND_API has to be defined to something..

Other projects, like Apache, have solved this by using this kind of macros:

#if !defined(WIN32)
#define APR_DECLARE(type)            type
#define APR_DECLARE_NONSTD(type)     type
#define APR_DECLARE_DATA#define APR_DECLARE_DATA
#elif defined(APR_DECLARE_STATIC)
#define APR_DECLARE(type)            type __stdcall
#define APR_DECLARE_NONSTD(type)     type
#elif defined(APR_DECLARE_EXPORT)
#define APR_DECLARE(type)            __declspec(dllexport) type __stdcall
#define APR_DECLARE_NONSTD(type)     __declspec(dllexport) type
#define APR_DECLARE_DATA             __declspec(dllexport)
#else
#define APR_DECLARE(type)            __declspec(dllimport) type __stdcall
#define APR_DECLARE_NONSTD(type)     __declspec(dllimport) type
#define APR_DECLARE_DATA             __declspec(dllimport)
#endif

So I guess we should be doing something similar.

--Jani

 [2002-12-02 01:42 UTC] novell at kiruna dot se
This one works, but spits out a warning every time
ZEND_API is used:
#define ZEND_API true();
#define ZEND_API false();

This _wont_ work:
#define ZEND_API " "
#define ZEND_API(type) type
#define ZEND_API 1

Just some that I've tested.
 [2003-01-13 15:54 UTC] nicos@php.net
According to novell, this has been fixed.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 14:04:04 2025 UTC