Download | Plain Text | No Line Numbers


  1. diff -Naur php-5.3.6.orig/ext/standard/basic_functions.c php-5.3.6/ext/standard/basic_functions.c
  2. --- php-5.3.6.orig/ext/standard/basic_functions.c 2011-02-08 17:29:34.000000000 +0100
  3. +++ php-5.3.6/ext/standard/basic_functions.c 2011-03-22 16:38:03.000000000 +0100
  4. @@ -2481,6 +2481,12 @@
  5. ZEND_ARG_INFO(0, facility)
  6. ZEND_END_ARG_INFO()
  7.  
  8. +ZEND_BEGIN_ARG_INFO(arginfo_openlog2, 0)
  9. + ZEND_ARG_INFO(0, ident)
  10. + ZEND_ARG_INFO(0, option)
  11. + ZEND_ARG_INFO(0, facility)
  12. +ZEND_END_ARG_INFO()
  13. +
  14. ZEND_BEGIN_ARG_INFO(arginfo_closelog, 0)
  15. ZEND_END_ARG_INFO()
  16.  
  17. @@ -2488,6 +2494,11 @@
  18. ZEND_ARG_INFO(0, priority)
  19. ZEND_ARG_INFO(0, message)
  20. ZEND_END_ARG_INFO()
  21. +
  22. +ZEND_BEGIN_ARG_INFO(arginfo_syslog2, 0)
  23. + ZEND_ARG_INFO(0, priority)
  24. + ZEND_ARG_INFO(0, message)
  25. +ZEND_END_ARG_INFO()
  26. #endif
  27. /* }}} */
  28. /* {{{ type.c */
  29. @@ -3228,7 +3239,9 @@
  30. /* functions from syslog.c */
  31. #ifdef HAVE_SYSLOG_H
  32. PHP_FE(openlog, arginfo_openlog)
  33. + PHP_FE(openlog2, arginfo_openlog2)
  34. PHP_FE(syslog, arginfo_syslog)
  35. + PHP_FE(syslog2, arginfo_syslog2)
  36. PHP_FE(closelog, arginfo_closelog)
  37. PHP_DEP_FE(define_syslog_variables, arginfo_define_syslog_variables)
  38. #endif
  39. diff -Naur php-5.3.6.orig/ext/standard/php_ext_syslog.h php-5.3.6/ext/standard/php_ext_syslog.h
  40. --- php-5.3.6.orig/ext/standard/php_ext_syslog.h 2011-01-01 03:19:59.000000000 +0100
  41. +++ php-5.3.6/ext/standard/php_ext_syslog.h 2011-03-22 16:37:24.000000000 +0100
  42. @@ -33,7 +33,9 @@
  43. PHP_MSHUTDOWN_FUNCTION(syslog);
  44.  
  45. PHP_FUNCTION(openlog);
  46. +PHP_FUNCTION(openlog2);
  47. PHP_FUNCTION(syslog);
  48. +PHP_FUNCTION(syslog2);
  49. PHP_FUNCTION(closelog);
  50. PHP_FUNCTION(define_syslog_variables);
  51.  
  52. diff -Naur php-5.3.6.orig/ext/standard/syslog.c php-5.3.6/ext/standard/syslog.c
  53. --- php-5.3.6.orig/ext/standard/syslog.c 2011-01-01 03:19:59.000000000 +0100
  54. +++ php-5.3.6/ext/standard/syslog.c 2011-03-22 16:36:49.000000000 +0100
  55. @@ -222,6 +222,20 @@
  56. */
  57. PHP_FUNCTION(openlog)
  58. {
  59. + RETURN_TRUE;
  60. +}
  61. +/* }}} */
  62. +
  63. +
  64. +/* {{{ proto bool openlog(string ident, int option, int facility)
  65. + Open connection to system logger */
  66. +/*
  67. + ** OpenLog("nettopp", $LOG_PID, $LOG_LOCAL1);
  68. + ** Syslog($LOG_EMERG, "help me!")
  69. + ** CloseLog();
  70. + */
  71. +PHP_FUNCTION(openlog2)
  72. +{
  73. char *ident;
  74. long option, facility;
  75. int ident_len;
  76. @@ -260,6 +274,15 @@
  77. Generate a system log message */
  78. PHP_FUNCTION(syslog)
  79. {
  80. + RETURN_TRUE;
  81. +}
  82. +/* }}} */
  83. +
  84. +
  85. +/* {{{ proto bool syslog(int priority, string message)
  86. + Generate a system log message */
  87. +PHP_FUNCTION(syslog2)
  88. +{
  89. long priority;
  90. char *message;
  91. int message_len;
  92.