Guest User

null-sapi Patch

a guest
Aug 16th, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.31 KB | None | 0 0
  1. diff --git a/sapi/null/CREDITS b/sapi/null/CREDITS
  2. new file mode 100644
  3. index 0000000..47ab44a
  4. --- /dev/null
  5. +++ b/sapi/null/CREDITS
  6. @@ -0,0 +1,4 @@
  7. +The null SAPI was created by copying the embed SAPI, renaming it, and
  8. +removing everything that didn't break the build. As such, Edin Kadribasic
  9. +deserves the credit.
  10. +
  11. diff --git a/sapi/null/config.m4 b/sapi/null/config.m4
  12. new file mode 100644
  13. index 0000000..ed96a15
  14. --- /dev/null
  15. +++ b/sapi/null/config.m4
  16. @@ -0,0 +1,29 @@
  17. +dnl
  18. +dnl $Id$
  19. +dnl
  20. +
  21. +PHP_ARG_ENABLE(null,,
  22. +[ --enable-null EXPERIMENTAL: Enable building of null SAPI shared
  23. + library], no, no)
  24. +
  25. +AC_MSG_CHECKING([for null SAPI library support])
  26. +
  27. +if test "$PHP_NULL" != "no"; then
  28. + case "$PHP_NULL" in
  29. + yes|shared)
  30. + PHP_NULL_TYPE=shared
  31. + INSTALL_IT="\$(mkinstalldirs) \$(INSTALL_ROOT)\$(prefix)/lib; \$(INSTALL) -m 0755 $SAPI_SHARED \$(INSTALL_ROOT)\$(prefix)/lib"
  32. + ;;
  33. + *)
  34. + PHP_NULL_TYPE=no
  35. + ;;
  36. + esac
  37. + if test "$PHP_NULL_TYPE" != "no"; then
  38. + PHP_SELECT_SAPI(null, $PHP_NULL_TYPE, php_null.c)
  39. + PHP_INSTALL_HEADERS([sapi/null/php_null.h])
  40. + fi
  41. + AC_MSG_RESULT([$PHP_NULL_TYPE])
  42. +else
  43. + AC_MSG_RESULT(no)
  44. +fi
  45. +
  46. diff --git a/sapi/null/php_null.c b/sapi/null/php_null.c
  47. new file mode 100644
  48. index 0000000..b0265e7
  49. --- /dev/null
  50. +++ b/sapi/null/php_null.c
  51. @@ -0,0 +1,22 @@
  52. +/*
  53. + +----------------------------------------------------------------------+
  54. + | PHP Version 5 |
  55. + +----------------------------------------------------------------------+
  56. + | Copyright (c) 1997-2013 The PHP Group |
  57. + +----------------------------------------------------------------------+
  58. + | This source file is subject to version 3.01 of the PHP license, |
  59. + | that is bundled with this package in the file LICENSE, and is |
  60. + | available through the world-wide-web at the following url: |
  61. + | http://www.php.net/license/3_01.txt |
  62. + | If you did not receive a copy of the PHP license and are unable to |
  63. + | obtain it through the world-wide-web, please send a note to |
  64. + | [email protected] so we can mail you a copy immediately. |
  65. + +----------------------------------------------------------------------+
  66. +*/
  67. +/* $Id$ */
  68. +
  69. +/*
  70. +** "Perfection is achieved, not when there is nothing left to add, but
  71. +** when there is nothing left to take away." - Antoine de Saint-Exupery
  72. +*/
  73. +
  74. diff --git a/sapi/null/php_null.h b/sapi/null/php_null.h
  75. new file mode 100644
  76. index 0000000..78100a6
  77. --- /dev/null
  78. +++ b/sapi/null/php_null.h
  79. @@ -0,0 +1,46 @@
  80. +/*
  81. + +----------------------------------------------------------------------+
  82. + | PHP Version 5 |
  83. + +----------------------------------------------------------------------+
  84. + | Copyright (c) 1997-2013 The PHP Group |
  85. + +----------------------------------------------------------------------+
  86. + | This source file is subject to version 3.01 of the PHP license, |
  87. + | that is bundled with this package in the file LICENSE, and is |
  88. + | available through the world-wide-web at the following url: |
  89. + | http://www.php.net/license/3_01.txt |
  90. + | If you did not receive a copy of the PHP license and are unable to |
  91. + | obtain it through the world-wide-web, please send a note to |
  92. + | [email protected] so we can mail you a copy immediately. |
  93. + +----------------------------------------------------------------------+
  94. +*/
  95. +/* $Id$ */
  96. +
  97. +#ifndef _PHP_NULL_H_
  98. +#define _PHP_NULL_H_
  99. +
  100. +#include <main/php.h>
  101. +#include <main/SAPI.h>
  102. +#include <main/php_main.h>
  103. +#include <main/php_variables.h>
  104. +#include <main/php_ini.h>
  105. +#include <zend_ini.h>
  106. +
  107. +#ifdef ZTS
  108. +#define PTSRMLS_D void ****ptsrm_ls
  109. +#define PTSRMLS_DC , PTSRMLS_D
  110. +#define PTSRMLS_C &tsrm_ls
  111. +#define PTSRMLS_CC , PTSRMLS_C
  112. +
  113. +#else
  114. +#define PTSRMLS_D
  115. +#define PTSRMLS_DC
  116. +#define PTSRMLS_C
  117. +#define PTSRMLS_CC
  118. +
  119. +#endif
  120. +
  121. +/*
  122. +** From small beginnings come great things.
  123. +*/
  124. +
  125. +#endif /* _PHP_NULL_H_ */
Advertisement
Add Comment
Please, Sign In to add comment