components/php-5_3/php-sapi/patches/024_php_Zend_zend_dtrace_gen.php.patch
changeset 4987 6a82655eda42
parent 4986 90a869b3f47a
child 4988 4b69c7c7e09b
equal deleted inserted replaced
4986:90a869b3f47a 4987:6a82655eda42
     1 --- php-5.3.10_orig/Zend/zend_dtrace_gen.php	Wed Nov 23 11:34:50 2011
       
     2 +++ php-5.3.10/Zend/zend_dtrace_gen.php	Wed Nov 23 11:36:10 2011
       
     3 @@ -0,0 +1,31 @@
       
     4 +<?php
       
     5 +/*
       
     6 +   +----------------------------------------------------------------------+
       
     7 +   | Zend Engine                                                          |
       
     8 +   +----------------------------------------------------------------------+
       
     9 +   | Copyright (c) 1998-2009 Zend Technologies Ltd. (http://www.zend.com) |
       
    10 +   +----------------------------------------------------------------------+
       
    11 +   | This source file is subject to version 2.00 of the Zend license,     |
       
    12 +   | that is bundled with this package in the file LICENSE, and is        |
       
    13 +   | available through the world-wide-web at the following url:           |
       
    14 +   | http://www.zend.com/license/2_00.txt.                                |
       
    15 +   | If you did not receive a copy of the Zend license and are unable to  |
       
    16 +   | obtain it through the world-wide-web, please send a note to          |
       
    17 +   | [email protected] so we can mail you a copy immediately.              |
       
    18 +   +----------------------------------------------------------------------+
       
    19 +   | Authors: David Soria Parra <[email protected]>                |
       
    20 +   +----------------------------------------------------------------------+
       
    21 +
       
    22 +   $Id:$
       
    23 +*/
       
    24 +
       
    25 +echo "regenerating zend_dtrace.h\n";
       
    26 +system('dtrace -h -s zend_dtrace.d');
       
    27 +
       
    28 +echo "renaming probe definitions\n";
       
    29 +$content = file_get_contents('zend_dtrace.h');
       
    30 +$content = str_replace('#define        PHP_', '#define DTRACE_', $content);
       
    31 +$content = str_replace('PHP_STABILITY', 'DTRACE_STABILITY', $content);
       
    32 +$content = str_replace('PHP_TYPEDEFS', 'DTRACE_TYPEDEFS', $content);
       
    33 +$content = str_replace('#if _DTRACE_VERSION', '#if _DTRACE_VERSION && HAVE_SYS_SDT_H', $content);
       
    34 +file_put_contents('zend_dtrace.h', $content);