Karim BELABAS on Tue, 20 Oct 1998 20:57:32 +0200 (MET DST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: I cannot make gp on WIN32


[Kiyoshi Ohgishi writes:]
> I cannot meke gp 2.0.11.beta on WIN32.
> 
> Error massage is
> 
> ../src/language/init.c: In function `pari_sighandler':
> ../src/language/init.c:68: `SIGBREAK' undeclared (first use this function)
> ../src/language/init.c:68: (Each undeclared identifier is reported only once
> ../src/language/init.c:68: for each function it appears in.)
> ../src/language/init.c: In function `pari_sig_init':
> ../src/language/init.c:283: `SIGBREAK' undeclared (first use this function)

The following patch will probably cure it.

[Note: since I don't have Windows, I can't check whether this is really
correct...]

Karim.

P.S: Out of curiosity, which compiler are you using? Cygnus gcc? (in that
case, I received a report long ago saying the #define _WIN32 was better
left out).

*** src/gp/gp.c.orig    Tue Oct 20 18:17:45 1998
--- src/gp/gp.c Tue Oct 20 20:41:14 1998
***************
*** 1222,1228 ****
  #endif
      signal(SIGSEGV,SIG_DFL);
      signal(SIGINT,SIG_DFL);
! #ifdef _WIN32
      signal(SIGBREAK,SIG_DFL);
  #endif
    }
--- 1222,1228 ----
  #endif
      signal(SIGSEGV,SIG_DFL);
      signal(SIGINT,SIG_DFL);
! #ifdef SIGBREAK
      signal(SIGBREAK,SIG_DFL);
  #endif
    }
***************
*** 1625,1631 ****
--- 1625,1633 ----
    {
      case SIGINT:
  #ifdef _WIN32
+ # ifdef SIGBREAK
      case SIGBREAK:
+ # endif
        if (++win32ctrlc >= 5) _exit(3);
        signal(sig,gp_sighandler);
        return;
*** src/language/init.c.orig    Tue Oct 20 17:54:03 1998
--- src/language/init.c Tue Oct 20 20:35:55 1998
***************
*** 64,70 ****
--- 64,72 ----
    {
      case SIGINT:
  #ifdef _WIN32
+ # ifdef SIGBREAK
      case SIGBREAK:
+ # endif
        if (++win32ctrlc >= 5) _exit(3);
        signal(sig,pari_sighandler);
        return;
***************
*** 267,273 ****
    signal(SIGBUS,f);
  #endif
    signal(SIGINT,f);
! #ifdef _WIN32
    signal(SIGBREAK,f);
  #endif
    signal(SIGSEGV,f);
--- 269,275 ----
    signal(SIGBUS,f);
  #endif
    signal(SIGINT,f);
! #ifdef SIGBREAK
    signal(SIGBREAK,f);
  #endif
    signal(SIGSEGV,f);


--
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://pari.home.ml.org