summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-03-01 17:27:05 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2011-03-01 17:27:05 +0000
commit4b973953787cd7867e9d20afb79cfdb9915f4d58 (patch)
tree382f4387288e6b9aee9dac0af476d8e0e6c158eb /src
parent98da801a19cd2f0a97f76cc62a41f33252d6d3c5 (diff)
downloadmpc-4b973953787cd7867e9d20afb79cfdb9915f4d58.tar.gz
mpc.h: actually, some of the "unused" macros were used in mpc.h itself
added the actual checks again git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@976 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src')
-rw-r--r--src/mpc.h37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/mpc.h b/src/mpc.h
index 2f218e7..29f1a89 100644
--- a/src/mpc.h
+++ b/src/mpc.h
@@ -42,11 +42,6 @@ MA 02111-1307, USA. */
MPC_VERSION_NUM(MPC_VERSION_MAJOR,MPC_VERSION_MINOR,MPC_VERSION_PATCHLEVEL)
-/* Check if complex.h is included */
-#if defined (_Complex_I)
-# define _MPC_H_HAVE_COMPLEX 1
-#endif
-
/* Return values */
/* Transform negative to 2, positive to 1, leave 0 unchanged */
@@ -189,20 +184,6 @@ __MPC_DECLSPEC int mpc_set_z_z __MPC_PROTO ((mpc_ptr, mpz_srcptr, mpz_srcptr,
__MPC_DECLSPEC void mpc_swap __MPC_PROTO ((mpc_ptr, mpc_ptr));
__MPC_DECLSPEC int mpc_fma __MPC_PROTO ((mpc_ptr, mpc_srcptr, mpc_srcptr, mpc_srcptr, mpc_rnd_t));
-#ifdef _MPC_H_HAVE_INTMAX_T
-__MPC_DECLSPEC int mpc_set_sj __MPC_PROTO ((mpc_ptr, intmax_t, mpc_rnd_t));
-__MPC_DECLSPEC int mpc_set_uj __MPC_PROTO ((mpc_ptr, uintmax_t, mpc_rnd_t));
-__MPC_DECLSPEC int mpc_set_sj_sj __MPC_PROTO ((mpc_ptr, intmax_t, intmax_t, mpc_rnd_t));
-__MPC_DECLSPEC int mpc_set_uj_uj __MPC_PROTO ((mpc_ptr, uintmax_t, uintmax_t, mpc_rnd_t));
-#endif
-
-#ifdef _MPC_H_HAVE_COMPLEX
-__MPC_DECLSPEC int mpc_set_dc __MPC_PROTO ((mpc_ptr, double _Complex, mpc_rnd_t));
-__MPC_DECLSPEC int mpc_set_ldc __MPC_PROTO ((mpc_ptr, long double _Complex, mpc_rnd_t));
-__MPC_DECLSPEC double _Complex mpc_get_dc __MPC_PROTO ((mpc_srcptr, mpc_rnd_t));
-__MPC_DECLSPEC long double _Complex mpc_get_ldc __MPC_PROTO ((mpc_srcptr, mpc_rnd_t));
-#endif
-
__MPC_DECLSPEC void mpc_set_nan __MPC_PROTO ((mpc_ptr));
__MPC_DECLSPEC int mpc_real __MPC_PROTO ((mpfr_ptr, mpc_srcptr, mpfr_rnd_t));
@@ -239,7 +220,23 @@ __MPC_DECLSPEC int mpc_strtoc _MPFR_PROTO ((mpc_ptr, const char *, char **,
__MPC_DECLSPEC int mpc_set_str _MPFR_PROTO ((mpc_ptr, const char *, int, mpc_rnd_t));
__MPC_DECLSPEC char * mpc_get_str _MPFR_PROTO ((int, size_t, mpc_srcptr, mpc_rnd_t));
__MPC_DECLSPEC void mpc_free_str _MPFR_PROTO ((char *));
-#ifdef _MPC_H_HAVE_FILE
+
+/* declare certain functions only if appropriate headers have been included */
+#if defined (INTMAX_C) && defined (UINTMAX_C)
+__MPC_DECLSPEC int mpc_set_sj __MPC_PROTO ((mpc_ptr, intmax_t, mpc_rnd_t));
+__MPC_DECLSPEC int mpc_set_uj __MPC_PROTO ((mpc_ptr, uintmax_t, mpc_rnd_t));
+__MPC_DECLSPEC int mpc_set_sj_sj __MPC_PROTO ((mpc_ptr, intmax_t, intmax_t, mpc_rnd_t));
+__MPC_DECLSPEC int mpc_set_uj_uj __MPC_PROTO ((mpc_ptr, uintmax_t, uintmax_t, mpc_rnd_t));
+#endif
+
+#ifdef _Complex_I
+__MPC_DECLSPEC int mpc_set_dc __MPC_PROTO ((mpc_ptr, double _Complex, mpc_rnd_t));
+__MPC_DECLSPEC int mpc_set_ldc __MPC_PROTO ((mpc_ptr, long double _Complex, mpc_rnd_t));
+__MPC_DECLSPEC double _Complex mpc_get_dc __MPC_PROTO ((mpc_srcptr, mpc_rnd_t));
+__MPC_DECLSPEC long double _Complex mpc_get_ldc __MPC_PROTO ((mpc_srcptr, mpc_rnd_t));
+#endif
+
+#ifdef _GMP_H_HAVE_FILE
__MPC_DECLSPEC int mpc_inp_str __MPC_PROTO ((mpc_ptr, FILE *, size_t *, int, mpc_rnd_t));
__MPC_DECLSPEC size_t mpc_out_str __MPC_PROTO ((FILE *, int, size_t, mpc_srcptr, mpc_rnd_t));
#endif