php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6735 Zend failes to compile due to inline statements
Submitted: 2000-09-13 06:00 UTC Modified: 2000-10-12 08:25 UTC
From: ddhill at zk3 dot dec dot com Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.2 OS: Compaq Tru64 Unix
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ddhill at zk3 dot dec dot com
New email:
PHP Version: OS:

 

 [2000-09-13 06:00 UTC] ddhill at zk3 dot dec dot com
Greetings,
        I was unable to build PHP on Compaq's Tru64 unix because the 
native compiler complains (rightly so) about inline definitions the
don't really have any definitions. In Zend/zend_execute.h and
Zend/zend_operators.h, if C9X_INLINE_SEMANTICS is not defined, there
is not inline content. Attached find a set of diffs for what I did
to correct this issue. Basically, I added an extra macro that
will be defined to 'inline' if C9X_INLINE_SEMANTICS is defined, and
will be nothing otherwise. With these two changes, PHP4 built for me.

Dave Hill

*** Zend/zend_execute.h.orig    Wed Sep 13 17:52:29 2000
--- Zend/zend_execute.h Wed Sep 13 17:53:17 2000
***************
*** 50,60 ****
  
  ZEND_API extern void (*zend_execute)(zend_op_array *op_array ELS_DC);
  
  void init_executor(CLS_D ELS_DC);
  void shutdown_executor(ELS_D);
  void execute(zend_op_array *op_array ELS_DC);
  ZEND_API int zend_is_true(zval *op);
! ZEND_API inline void safe_free_zval_ptr(zval *p)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        ELS_FETCH();
--- 50,66 ----
  
  ZEND_API extern void (*zend_execute)(zend_op_array *op_array ELS_DC);
  
+ #if defined(C9X_INLINE_SEMANTICS)
+ #define C9X_INLINE inline
+ #else
+ #define C9X_INLINE
+ #endif
+ 
  void init_executor(CLS_D ELS_DC);
  void shutdown_executor(ELS_D);
  void execute(zend_op_array *op_array ELS_DC);
  ZEND_API int zend_is_true(zval *op);
! ZEND_API C9X_INLINE void safe_free_zval_ptr(zval *p)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        ELS_FETCH();
***************
*** 68,74 ****
  #endif
  
  ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
! ZEND_API inline int i_zend_is_true(zval *op)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        int result;
--- 74,80 ----
  #endif
  
  ZEND_API int zend_eval_string(char *str, zval *retval_ptr CLS_DC ELS_DC);
! ZEND_API C9X_INLINE int i_zend_is_true(zval *op)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        int result;
***************
*** 112,118 ****
  ZEND_API int zval_update_constant(zval **pp, void *arg);
  
  /* dedicated Zend executor functions - do not use! */
! ZEND_API inline void zend_ptr_stack_clear_multiple(ELS_D)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        void **p = EG(argument_stack).top_element-2;
--- 118,124 ----
  ZEND_API int zval_update_constant(zval **pp, void *arg);
  
  /* dedicated Zend executor functions - do not use! */
! ZEND_API C9X_INLINE void zend_ptr_stack_clear_multiple(ELS_D)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        void **p = EG(argument_stack).top_element-2;
***************
*** 128,134 ****
  ;
  #endif
  
! ZEND_API inline int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        void **p = EG(argument_stack).top_element-2;
--- 134,140 ----
  ;
  #endif
  
! ZEND_API C9X_INLINE int zend_ptr_stack_get_arg(int requested_arg, void **data ELS_DC)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        void **p = EG(argument_stack).top_element-2;
***************
*** 171,177 ****
  
  #define active_opline (*EG(opline_ptr))
  
! ZEND_API inline void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        zval *variable_ptr = *variable_ptr_ptr;
--- 177,183 ----
  
  #define active_opline (*EG(opline_ptr))
  
! ZEND_API C9X_INLINE void zend_assign_to_variable_reference(znode *result, zval **variable_ptr_ptr, zval **value_ptr_ptr, temp_variable *Ts ELS_DC)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        zval *variable_ptr = *variable_ptr_ptr;
*** Zend/zend_operators.h.orig  Wed Sep 13 17:49:53 2000
--- Zend/zend_operators.h       Wed Sep 13 17:51:51 2000
***************
*** 32,37 ****
--- 32,43 ----
  #include "ext/bcmath/number.h"
  #endif
  
+ #if defined(C9X_INLINE_SEMANTICS)
+ #define C9X_INLINE inline
+ #else
+ #define C9X_INLINE
+ #endif
+ 
  #define MAX_LENGTH_OF_LONG 18
  #define MAX_LENGTH_OF_DOUBLE 32
  
***************
*** 58,64 ****
  ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
  ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
  ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
! ZEND_API inline int is_numeric_string(char *str, int length, long *lval, double *dval)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        long local_lval;
--- 64,70 ----
  ZEND_API int is_not_equal_function(zval *result, zval *op1, zval *op2);
  ZEND_API int is_smaller_function(zval *result, zval *op1, zval *op2);
  ZEND_API int is_smaller_or_equal_function(zval *result, zval *op1, zval *op2);
! ZEND_API C9X_INLINE int is_numeric_string(char *str, int length, long *lval, double *dval)
  #if defined(C9X_INLINE_SEMANTICS)
  {
        long local_lval;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-09-13 06:50 UTC] joey@php.net
Have you tried adding --enable-c9x-inline to
your ./configure line?
 [2000-10-12 08:25 UTC] sniper@php.net
No feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 15 18:01:34 2024 UTC