You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.3 KiB

25 years ago
25 years ago
24 years ago
24 years ago
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 4 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2002 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 2.02 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available at through the world-wide-web at |
  10. | http://www.php.net/license/2_02.txt. |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: Kristian Koehntopp <kris@koehntopp.de> |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef PHP_RECODE_H
  20. #define PHP_RECODE_H
  21. #ifdef PHP_WIN32
  22. #define PHP_MYSQL_API __declspec(dllexport)
  23. #else
  24. #define PHP_MYSQL_API
  25. #endif
  26. #if HAVE_LIBRECODE
  27. /* Checking for thread safety and issue warning if necessary. */
  28. #ifdef ZTS
  29. #warning Recode module has not been tested for thread-safety.
  30. #endif
  31. /* Recode 3.5 is broken in the sense that it requires the definition
  32. * of a symbol "program_name" in order to link.
  33. */
  34. #define HAVE_BROKEN_RECODE
  35. #ifdef HAVE_STDBOOL_H
  36. # include <stdbool.h>
  37. #else
  38. typedef enum {false = 0, true = 1} bool;
  39. #endif
  40. #include <sys/types.h>
  41. #include <stdio.h>
  42. #include <recode.h>
  43. #include <unistd.h>
  44. extern zend_module_entry recode_module_entry;
  45. #define phpext_recode_ptr &recode_module_entry
  46. PHP_MINIT_FUNCTION(recode);
  47. PHP_MSHUTDOWN_FUNCTION(recode);
  48. PHP_MINFO_FUNCTION(recode);
  49. PHP_FUNCTION(recode_string);
  50. PHP_FUNCTION(recode_file);
  51. typedef struct {
  52. RECODE_OUTER outer;
  53. } php_recode_globals;
  54. #ifdef ZTS
  55. # define ReSG(v) TSRMG(recode_globals_id, php_recode_globals *, v)
  56. #else
  57. # define ReSG(v) (recode_globals.v)
  58. extern PHP_MYSQL_API php_recode_globals recode_globals;
  59. #endif
  60. #else
  61. #define phpext_recode_ptr NULL
  62. #endif
  63. #endif /* PHP_RECODE_H */