[PHP-DEV] Linking with pthreads

2003-03-02 Thread Justin Garrett
I have a module that references a library that uses pthreads.  What's the
preferred method for linking with pthreads?

Currently If I don't do
LIBS=-lpthread ./configure ...
configure will croak when running the test on conftest.c

Justin Garrett



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] [PATCH] bug #15547

2002-07-01 Thread Justin Garrett

Stops tempnam() from bypassing open_basedir directive.

This is my very first patch...thought I'd start small.  Will someone 
with karma please take a look and commit this if it meets your approval?

Justin Garrett



Index: ext/standard/file.c
===
RCS file: /repository/php4/ext/standard/file.c,v
retrieving revision 1.234
diff -u -b -w -B -r1.234 file.c
--- ext/standard/file.c 18 Jun 2002 12:16:27 -  1.234
+++ ext/standard/file.c 2 Jul 2002 01:18:48 -
 -525,6 +525,11 
}
convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
+   
+   if (php_check_open_basedir(Z_STRVAL_PP(arg1) TSRMLS_CC)){
+   RETURN_FALSE;
+   }
+   
d = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1));
strlcpy(p, Z_STRVAL_PP(arg2), sizeof(p));
 



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DEV] [PATCH] clibpdf -- get_buffer_length()

2001-10-27 Thread Justin Garrett

Patch that allows retrieval of the length in bytes of the output buffer for
a finalized pdf document that has been created in memory.

This is good for sending a 'Content-Length' header before outputting the pdf
file from memory. MSIE requires a properly set 'Content-Length' header in
order to display the pdf document correctly.

--
Justin Garrett


--START PATCH

/* {{{ proto int cpdf_buffer_length(int pdfdoc)
   Returns current length of the output buffer */
PHP_FUNCTION(cpdf_buffer_length) {
pval *arg1;
int id, type, length;
CPDFdoc *pdf;
CPDF_TLS_VARS;

if (ZEND_NUM_ARGS() != 1 || getParameters(ht, 1, arg1) == FAILURE)
{
WRONG_PARAM_COUNT;
}

convert_to_long(arg1);
id=arg1-value.lval;
pdf = zend_list_find(id,type);
if(!pdf || type!=CPDF_GLOBAL(le_cpdf)) {
php_error(E_WARNING,Unable to find identifier %d,id);
RETURN_FALSE;
}

cpdf_getBufferForPDF(pdf, length);

RETURN_LONG(length);
}
/* }}} */

END PATCH---


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]