Index: kernel/rmodulon.cc
===================================================================
--- kernel/rmodulon.cc	(revision 9655929209cd775b5b7cd5bc61d5b70c75f911b3)
+++ kernel/rmodulon.cc	(revision 1eef6931a6357260add7f7395138889e3ba0b44e)
@@ -2,5 +2,5 @@
 *  Computer Algebra System SINGULAR     *
 ****************************************/
-/* $Id: rmodulon.cc,v 1.31 2008-12-08 15:00:43 Singular Exp $ */
+/* $Id: rmodulon.cc,v 1.32 2009-01-19 12:43:53 Singular Exp $ */
 /*
 * ABSTRACT: numbers modulo n
@@ -21,6 +21,10 @@
 
 #ifdef HAVE_RINGMODN
-
-omBin gmp_nrn_bin = omGetSpecBin(sizeof(MP_INT));
+  #ifdef HAVE_RINGZ
+    #define gmp_nrn_bin gmp_nrz_bin
+    extern omBin gmp_nrz_bin;
+  #else
+    omBin gmp_nrn_bin = omGetSpecBin(sizeof(MP_INT));
+  #endif
 
 int_number nrnModul = NULL;
@@ -33,5 +37,5 @@
 number nrnInit (int i)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init_set_si(erg, i);
   mpz_mod(erg, erg, nrnModul);
@@ -49,5 +53,5 @@
 number nrnCopy(number a)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init_set(erg, (int_number) a);
   return (number) erg;
@@ -78,5 +82,5 @@
 number nrnMult (number a, number b)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_mul(erg, (int_number) a, (int_number) b);
@@ -87,5 +91,5 @@
 void nrnPower (number a, int i, number * result)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_powm_ui(erg, (int_number) a, i, nrnModul);
@@ -95,5 +99,5 @@
 number nrnAdd (number a, number b)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_add(erg, (int_number) a, (int_number) b);
@@ -104,5 +108,5 @@
 number nrnSub (number a, number b)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_sub(erg, (int_number) a, (int_number) b);
@@ -113,7 +117,5 @@
 number nrnNeg (number c)
 {
-// nNeg inplace !!! TODO
-//  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
-//  mpz_init(erg);
+// nNeg inplace !!!
   mpz_sub((int_number) c, nrnModul, (int_number) c);
   return c;
@@ -122,5 +124,5 @@
 number  nrnInvers (number c)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_invert(erg, (int_number) c, nrnModul);
@@ -148,5 +150,5 @@
 {
   if ((a == NULL) && (b == NULL)) return nrnInit(0);
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init_set(erg, nrnModul);
   if (a != NULL) mpz_gcd(erg, erg, (int_number) a);
@@ -158,5 +160,5 @@
 number nrnGcd3 (number a,number b, number c,ring r)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   if (a == NULL) a = (number) nrnModul;
@@ -176,7 +178,7 @@
 number  nrnExtGcd (number a, number b, number *s, number *t)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
-  int_number bs = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
-  int_number bt = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
+  int_number bs = (int_number) omAllocBin(gmp_nrn_bin);
+  int_number bt = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_init(bs);
@@ -291,5 +293,5 @@
 {
   if (a == NULL) a = (number) nrnModul;
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   if (mpz_divisible_p((int_number) a, (int_number) b))
@@ -323,5 +325,5 @@
 number nrnIntDiv (number a,number b)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   if (a == NULL) a = (number) nrnModul;
@@ -343,5 +345,5 @@
 number nrnMap2toM(number from)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_mul_ui(erg, nrnMapCoef, (NATNUMBER) from);
@@ -352,5 +354,5 @@
 number nrnMapZp(number from)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_mul_si(erg, nrnMapCoef, (NATNUMBER) from);
@@ -361,5 +363,5 @@
 number nrnMapGMP(number from)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   mpz_mod(erg, (int_number) from, nrnModul);
@@ -369,5 +371,5 @@
 number nrnMapQ(number from)
 {
-  int_number erg = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number erg = (int_number) omAllocBin(gmp_nrn_bin);
   mpz_init(erg);
   nlGMP(from, (number) erg);
@@ -395,5 +397,5 @@
     else
     {
-      int_number nrnMapModul = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+      int_number nrnMapModul = (int_number) omAllocBin(gmp_nrn_bin);
       // Computing the n of Z/n
       if (rField_is_Zp(src))
@@ -411,5 +413,5 @@
       if (nrnMapCoef == NULL)
       {
-        nrnMapCoef = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+        nrnMapCoef = (int_number) omAllocBin(gmp_nrn_bin);
         mpz_init(nrnMapCoef);
       }
@@ -464,7 +466,7 @@
   if (nrnModul == NULL)
   {
-    nrnModul = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+    nrnModul = (int_number) omAllocBin(gmp_nrn_bin);
     mpz_init(nrnModul);
-    nrnMinusOne = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+    nrnMinusOne = (int_number) omAllocBin(gmp_nrn_bin);
     mpz_init(nrnMinusOne);
   }
@@ -543,5 +545,5 @@
 const char * nrnRead (const char *s, number *a)
 {
-  int_number z = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin
+  int_number z = (int_number) omAllocBin(gmp_nrn_bin);
   {
     s = nlCPEatLongC((char *)s, z);
