~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/gmp/php_gmp.h

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
   +----------------------------------------------------------------------+
 
3
   | PHP Version 5                                                        |
 
4
   +----------------------------------------------------------------------+
 
5
   | Copyright (c) 1997-2004 The PHP Group                                |
 
6
   +----------------------------------------------------------------------+
 
7
   | This source file is subject to version 3.0 of the PHP license,       |
 
8
   | that is bundled with this package in the file LICENSE, and is        |
 
9
   | available through the world-wide-web at the following url:           |
 
10
   | http://www.php.net/license/3_0.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: Stanislav Malyshev <stas@php.net>                            |
 
16
   +----------------------------------------------------------------------+
 
17
 */
 
18
 
 
19
#ifndef PHP_GMP_H
 
20
#define PHP_GMP_H
 
21
 
 
22
#if HAVE_GMP
 
23
 
 
24
#include <gmp.h>
 
25
 
 
26
extern zend_module_entry gmp_module_entry;
 
27
#define phpext_gmp_ptr &gmp_module_entry
 
28
 
 
29
#ifdef ZEND_WIN32
 
30
#define GMP_API __declspec(dllexport)
 
31
#else
 
32
#define GMP_API
 
33
#endif
 
34
 
 
35
ZEND_MODULE_STARTUP_D(gmp);
 
36
ZEND_MODULE_SHUTDOWN_D(gmp);
 
37
ZEND_MODULE_DEACTIVATE_D(gmp);
 
38
ZEND_MODULE_INFO_D(gmp);
 
39
 
 
40
ZEND_FUNCTION(gmp_init);
 
41
ZEND_FUNCTION(gmp_intval);
 
42
ZEND_FUNCTION(gmp_strval);
 
43
ZEND_FUNCTION(gmp_add);
 
44
ZEND_FUNCTION(gmp_sub);
 
45
ZEND_FUNCTION(gmp_mul);
 
46
ZEND_FUNCTION(gmp_div_qr);
 
47
ZEND_FUNCTION(gmp_div_q);
 
48
ZEND_FUNCTION(gmp_div_r);
 
49
ZEND_FUNCTION(gmp_mod);
 
50
ZEND_FUNCTION(gmp_divexact);
 
51
ZEND_FUNCTION(gmp_neg);
 
52
ZEND_FUNCTION(gmp_abs);
 
53
ZEND_FUNCTION(gmp_fact);
 
54
ZEND_FUNCTION(gmp_sqrt);
 
55
ZEND_FUNCTION(gmp_pow);
 
56
ZEND_FUNCTION(gmp_powm);
 
57
ZEND_FUNCTION(gmp_sqrtrem);
 
58
ZEND_FUNCTION(gmp_perfect_square);
 
59
ZEND_FUNCTION(gmp_prob_prime);
 
60
ZEND_FUNCTION(gmp_gcd);
 
61
ZEND_FUNCTION(gmp_gcdext);
 
62
ZEND_FUNCTION(gmp_invert);
 
63
ZEND_FUNCTION(gmp_jacobi);
 
64
ZEND_FUNCTION(gmp_legendre);
 
65
ZEND_FUNCTION(gmp_cmp);
 
66
ZEND_FUNCTION(gmp_sign);
 
67
ZEND_FUNCTION(gmp_and);
 
68
ZEND_FUNCTION(gmp_or);
 
69
ZEND_FUNCTION(gmp_com);
 
70
ZEND_FUNCTION(gmp_xor);
 
71
ZEND_FUNCTION(gmp_random);
 
72
ZEND_FUNCTION(gmp_setbit);
 
73
ZEND_FUNCTION(gmp_clrbit);
 
74
ZEND_FUNCTION(gmp_scan0);
 
75
ZEND_FUNCTION(gmp_scan1);
 
76
ZEND_FUNCTION(gmp_popcount);
 
77
ZEND_FUNCTION(gmp_hamdist);
 
78
 
 
79
ZEND_BEGIN_MODULE_GLOBALS(gmp)
 
80
        zend_bool rand_initialized;
 
81
        gmp_randstate_t rand_state;
 
82
ZEND_END_MODULE_GLOBALS(gmp)
 
83
 
 
84
#ifdef ZTS
 
85
#define GMPG(v) TSRMG(gmp_globals_id, zend_gmp_globals *, v)
 
86
#else
 
87
#define GMPG(v) (gmp_globals.v)
 
88
#endif
 
89
 
 
90
#else
 
91
 
 
92
#define phpext_gmp_ptr NULL
 
93
 
 
94
#endif
 
95
 
 
96
#endif  /* PHP_GMP_H */
 
97
 
 
98
 
 
99
/*
 
100
 * Local variables:
 
101
 * tab-width: 4
 
102
 * c-basic-offset: 4
 
103
 * End:
 
104
 */