php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49897 tsrm_config_common.h invalid integer constant problem
Submitted: 2009-10-16 10:52 UTC Modified: 2009-10-16 13:37 UTC
From: admin at atilailhankartal dot com dot tr Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.3.0 OS: Win32
Private report: No CVE-ID: None
 [2009-10-16 10:52 UTC] admin at atilailhankartal dot com dot tr
Description:
------------
Error	1	fatal error C1017: invalid integer constant expression	\tsrm\tsrm_config_common.h	5	php_myextension

my compiler Visual Studio C++ 2008 (VC9)





Reproduce code:
---------------
#ifndef TSRM_CONFIG_COMMON_H
#define TSRM_CONFIG_COMMON_H

#ifndef __CYGWIN__
# if WINNT|WIN32 // Problemed row
#  define TSRM_WIN32 
# endif
#endif

#ifdef TSRM_WIN32
# include "tsrm_config.w32.h"
#else
# include <tsrm_config.h>
# include <sys/param.h>
#endif


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-16 12:17 UTC] pajoye@php.net
Not really a php issue, every single extension out there use this header. Are you sure that everything is correct in your ext? You can ask on php-windows-internals for support if necessary.
 [2009-10-16 13:37 UTC] admin at atilailhankartal dot com dot tr
Yeah. ?t is realy;

My ext have not a problem but my ext a helloWorld function for test.

My Code 

hello.c

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "php.h"
#include "php_hello.h"

static function_entry hello_functions[] = {
    PHP_FE(hello_world, NULL)
    {NULL, NULL, NULL}
};




zend_module_entry hello_module_entry = {
#if ZEND_MODULE_API_NO >= 20010901
    STANDARD_MODULE_HEADER,
#endif
    PHP_HELLO_WORLD_EXTNAME,
    hello_functions,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
#if ZEND_MODULE_API_NO >= 20010901
    PHP_HELLO_WORLD_VERSION,
#endif
    STANDARD_MODULE_PROPERTIES
};

#ifdef COMPILE_DL_HELLO
ZEND_GET_MODULE(hello)
#endif

PHP_FUNCTION(hello_world)
{
    RETURN_STRING("Hello World", 1);
}

php_hello.h

#ifndef PHP_HELLO_H
#define PHP_HELLO_H 1

#define PHP_HELLO_WORLD_VERSION "1.0"
#define PHP_HELLO_WORLD_EXTNAME "hello"

PHP_FUNCTION(hello_world);

extern zend_module_entry hello_module_entry;
#define phpext_hello_ptr &hello_module_entry

#endif


My Included Directories 
"C:\PHPDEV\php-5.3.0";
"C:\PHPDEV\php-5.3.0\Zend";
"C:\PHPDEV\php-5.3.0\win32";
"C:\PHPDEV\php-5.3.0\TSRM";
"C:\PHPDEV\php-5.3.0\main"

And My Preprocessor Definitions

ZEND_DEBUG=0;
COMPILE_DL_MYEXT;
ZTS=1;
ZEND_WIN32;
PHP_WIN32;
MYEXT

can u analysis this code and parameters. Thanks

Atilla ?lhan KARTAL
Web Application & Software Architect
Turkey Republic
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Jun 23 11:00:02 2026 UTC