When both polylib and piplib header files are included from a source,
.....
../piplib-1.4.0/include/piplib/piplib.h:44:1: warning: "VALUE_TO_INT" redefined
....
../polylib-5.22.5/include/polylib/arithmetique.h:138:1: warning: this
is the location of the previous definition
I assume these definitions need not be exposed to users. If they have
to be there for other reasons, can one of them be renamed?
VALUE_TO_INT -> PIPLIB_VALUE_TO_INT.
Thanks,
Uday
Does this help?
skimo
diff --git a/include/piplib/piplib.h b/include/piplib/piplib.h
index 0123c47..aa54b8b 100644
--- a/include/piplib/piplib.h
+++ b/include/piplib/piplib.h
@@ -41,7 +41,7 @@
# define VAL_UN 1LL
# define VAL_ZERO 0LL
-#define VALUE_TO_INT(val) ((int)(val))
+#define ENTIER_TO_INT(val) ((int)(val))
#define ENTIER_TO_DOUBLE(val) ((double)(val))
#elif defined(LINEAR_VALUE_IS_INT)
@@ -51,7 +51,7 @@
# define VAL_UN 1L
# define VAL_ZERO 0L
-#define VALUE_TO_INT(val) ((int)(val))
+#define ENTIER_TO_INT(val) ((int)(val))
#define ENTIER_TO_DOUBLE(val) ((double)(val))
#elif defined(LINEAR_VALUE_IS_MP)
@@ -61,7 +61,7 @@
# define FORMAT "%d"
# define GMP_INPUT_FORMAT "%lZd"
-#define VALUE_TO_INT(val) ((int)mpz_get_si(val))
+#define ENTIER_TO_INT(val) ((int)mpz_get_si(val))
#define ENTIER_TO_DOUBLE(val) (mpz_get_d(val))
#endif
diff --git a/source/sol.c b/source/sol.c
index 584c387..16dac6d 100644
--- a/source/sol.c
+++ b/source/sol.c
@@ -540,7 +540,7 @@ PipVector * sol_vector_edit(int *i, int Bg, int Urs_p, int flags)
exit(1) ;
}
p = sol_space + (*i) ;
- n = VALUE_TO_INT(p->param1);
+ n = ENTIER_TO_INT(p->param1);
if (flags & SOL_REMOVE)
--n;
n -= Urs_p;
@@ -627,7 +627,7 @@ PipNewparm * sol_newparm_edit(int *i, int Bg, int Urs_p, int flags)
exit(1) ;
}
newparm->vector = sol_vector_edit(i, Bg, Urs_p, flags);
- newparm->rank = VALUE_TO_INT(p->param1);
+ newparm->rank = ENTIER_TO_INT(p->param1);
/* On met p a jour pour lire le denominateur (un Val de param2 UN). */
p = sol_space + (*i) ;
entier_init_set(newparm->deno, p->param1);