php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37163 timelib_structs.h requires explicit compiler include path setting
Submitted: 2006-04-22 10:51 UTC Modified: 2006-07-27 01:20 UTC
From: jdolecek at NetBSD dot org Assigned:
Status: Closed Package: WDDX related
PHP Version: 5.1.2 OS: NetBSD
Private report: No CVE-ID: None
 [2006-04-22 10:51 UTC] jdolecek at NetBSD dot org
Description:
------------
When php_date.h is used in a module, the build requires the include path of C compiler to be set to include ext/date/lib explicitely.

This is due to php_date.h pulling "lib/timelib.h" (this is fine), then timelib.h including "timelib_structs.h" (this is fine too), but timelib_structs.h including <timelib_config.h> (this fails).

If this is used in a separately built module (encountered with WDDX when build as an extension), this means the include path for the extension build must be setup  to include php/include/ext/date/lib.

Reproduce code:
---------------
Build WDDX as separate extension (i.e. not part of PHP build itself).

Expected result:
----------------
Compiles fine

Actual result:
--------------
Compile fails with error couldn't find timelib_config.h.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-04-22 10:52 UTC] jdolecek at NetBSD dot org
Fix:

--- ext/date/lib/timelib_structs.h.orig 2006-04-22 12:51:57.000000000 +0200
+++ ext/date/lib/timelib_structs.h      2006-04-22 12:52:01.000000000 +0200
@@ -21,7 +21,7 @@
 #ifndef __TIMELIB_STRUCTS_H__
 #define __TIMELIB_STRUCTS_H__
 
-#include <timelib_config.h>
+#include "timelib_config.h"
 
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 [2006-04-22 10:54 UTC] derick@php.net
This is correct, and should be fixed in the wddx config.m4 file.
 [2006-04-22 10:56 UTC] derick@php.net
The posted fix is therefore not correct...
 [2006-07-27 01:20 UTC] sniper@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 00:01:32 2024 UTC