]> granicus.if.org Git - php/commitdiff
Fixed some compile problems (in ZTS mode)
authorfoobar <sniper@php.net>
Wed, 12 Dec 2001 15:04:23 +0000 (15:04 +0000)
committerfoobar <sniper@php.net>
Wed, 12 Dec 2001 15:04:23 +0000 (15:04 +0000)
ext/ming/config.m4
ext/ming/ming.c

index b7452eaf629a4bb181daef8beb5c8aed3c32ff45..e3619c12737593e6258d3c8af4377b24a731e595 100644 (file)
@@ -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
index 0bfcfe9de7747fa0d9cec2b5e21904f6ab9db865..67b706bb619a2c9d4c2d4c5f568753d166729754 100644 (file)
@@ -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);
@@ -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)
   {
@@ -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);
   }
@@ -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)
@@ -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));
 }
@@ -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);