Skip to content

Commit

Permalink
Fixed some compile problems (in ZTS mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
foobar committed Dec 12, 2001
1 parent 515e8c2 commit bc033a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 17 deletions.
16 changes: 7 additions & 9 deletions ext/ming/config.m4
Expand Up @@ -16,19 +16,17 @@ if test "$PHP_MING" != "no"; then
AC_MSG_ERROR(Please reinstall libming.so - I cannot find libming.so)
fi

PHP_ADD_INCLUDE($MING_DIR/include)

PHP_SUBST(MING_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)

old_LIBS=$LIBS
LIBS="$LIBS -L$MING_DIR/lib -lm -ldl"
AC_CHECK_LIB(ming, Ming_useSWFVersion, [
PHP_CHECK_LIBRARY(ming, Ming_useSWFVersion, [
AC_DEFINE(HAVE_MING,1,[ ])
],[
AC_MSG_ERROR(Ming library 0.2a or greater required.)
],[
-L$MING_DIR/lib -lm -ldl"
])
LIBS=$old_LIBS

PHP_ADD_INCLUDE($MING_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(ming, $MING_DIR/lib, MING_SHARED_LIBADD)

PHP_EXTENSION(ming, $ext_shared)
PHP_SUBST(MING_SHARED_LIBADD)
fi
15 changes: 7 additions & 8 deletions ext/ming/ming.c
Expand Up @@ -221,14 +221,13 @@ static SWFInput newSWFInput_sock(int socket)
return newSWFInput_allocedBuffer(buffer, offset);
}

static SWFInput getInput(zval **zfile)
static SWFInput getInput(zval **zfile TSRMLS_DC)
{
FILE *file;
int type;
SWFInput input;

file = (FILE *)zend_fetch_resource(zfile, -1, "File-Handle", &type, 3,
le_fopen, le_socket, le_popen);
file = (FILE *) zend_fetch_resource(zfile TSRMLS_CC, -1, "File-Handle", &type, 3, php_file_le_fopen(), php_file_le_popen(), php_file_le_socket());

if(type == le_socket)
input = newSWFInput_sock(*(int *)file);
Expand Down Expand Up @@ -335,7 +334,7 @@ PHP_FUNCTION(swfbitmap_init)
zend_list_addref(zend_list_insert(input, le_swfinputp));
}
else
input = getInput(zfile);
input = getInput(zfile TSRMLS_CC);

if(zmask != NULL)
{
Expand All @@ -346,7 +345,7 @@ PHP_FUNCTION(swfbitmap_init)
zend_list_addref(zend_list_insert(maskinput, le_swfinputp));
}
else
maskinput = getInput(zmask);
maskinput = getInput(zmask TSRMLS_CC);

bitmap = newSWFJpegWithAlpha_fromInput(input, maskinput);
}
Expand Down Expand Up @@ -977,7 +976,7 @@ PHP_FUNCTION(swfdisplayitem_addAction)
{
zval **zaction, **flags;
SWFAction action;
SWFDisplayItem item = getDisplayItem(getThis());
SWFDisplayItem item = getDisplayItem(getThis() TSRMLS_CC);

if(ZEND_NUM_ARGS() != 2 ||
zend_get_parameters_ex(2, &zaction, &flags) == FAILURE)
Expand All @@ -986,7 +985,7 @@ PHP_FUNCTION(swfdisplayitem_addAction)
convert_to_object_ex(zaction);
convert_to_long_ex(flags);

action = (SWFBlock)getAction(*zaction);
action = (SWFBlock)getAction(*zaction TSRMLS_CC);

SWFDisplayItem_addAction(item, action, Z_LVAL_PP(flags));
}
Expand Down Expand Up @@ -1715,7 +1714,7 @@ PHP_FUNCTION(swfmovie_streamMp3)
zend_list_addref(zend_list_insert(input, le_swfinputp));
}
else
input = getInput(zfile);
input = getInput(zfile TSRMLS_CC);

sound = newSWFSound_fromInput(input);
SWFMovie_setSoundStream(movie, sound);
Expand Down

0 comments on commit bc033a6

Please sign in to comment.