Changeset 05051f in git
- Timestamp:
- Aug 28, 2012, 10:07:24 AM (12 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'fc741b6502fd8a97288eaa3eba6e5220f3c3df87')
- Children:
- 17228ebfd18336c7c9ef1b5d9c20e80ae49d91a0
- Parents:
- dec6c88a5a04cf848c091da42041c23143413b8d2b43ac1641773ee5c2c0c47688fd5bd477702c77
- Files:
-
- 2 added
- 2 deleted
- 24 edited
- 10 moved
Legend:
- Unmodified
- Added
- Removed
-
Singular/Makefile.am
rdec6c8 r05051f 20 20 ########################### libSingular* ######################### 21 21 22 libSingular_LTLIBRARIES = libSingular.la libSingular_g.la 22 if WANT_DEBUG 23 LIB_G=libSingular_g.la 24 else 25 LIB_G= 26 endif 27 28 libSingular_LTLIBRARIES = libSingular.la ${LIB_G} 23 29 libSingulardir = $(libdir)/singular 24 30 … … 184 190 ########################### Singular* ######################### 185 191 186 EXTRA_PROGRAMS = Singulard Singulardg libparse 192 if WANT_DEBUG 193 EXTRA_PROGRAMS = Singulard Singulardg libparse 194 else 195 EXTRA_PROGRAMS = Singulard libparse 196 endif 187 197 188 198 # the "optional_programs" variable should be defined in the configure … … 190 200 optional_Singular_programs = 191 201 192 bin_PROGRAMS = Singular Singularg ESingular TSingular $(optional_Singular_programs) 202 if WANT_DEBUG 203 bin_PROGRAMS = Singular Singularg ESingular TSingular $(optional_Singular_programs) 204 else 205 bin_PROGRAMS = Singular ESingular TSingular $(optional_Singular_programs) 206 endif 193 207 194 208 AMLDFLAGS = -L${abs_top_builddir}/Singular -L${abs_top_builddir}/numeric -L${abs_top_builddir}/kernel -L${abs_top_builddir}/libpolys/polys -L${top_builddir}/libpolys/coeffs -L${top_builddir}/libpolys/reporter -L${top_builddir}/libpolys/misc $(USE_FACTORY) -L${abs_top_builddir}/omalloc -L${abs_top_builddir}/findexec -
Singular/cntrlc.cc
r2b43ac r05051f 231 231 } 232 232 233 /*---------------------------------------------------------------------*/234 /**235 * @brief additional default signal handler236 237 // some newer Linux version cannot have SIG_IGN for SIGCHLD,238 // so use this nice routine here:239 // SuSe 9.x reports -1 always240 // Redhat 9.x/FC x reports sometimes -1241 // see also: hpux_system242 // also needed by getrusage (timer etc.)243 244 @param[in] sig245 **/246 /*---------------------------------------------------------------------*/247 void sig_chld_hdl(int sig)248 {249 waitpid(-1,NULL,WNOHANG);250 }251 252 233 /*2 253 234 * init signal handlers, linux/i386 version -
Singular/links/ndbm.cc
r2b43ac r05051f 51 51 # define bcopy(a,b,c) memmove(b,a,c) 52 52 #endif /* not HAVE_BCOPY */ 53 #include <Singular/ ndbm.h>53 #include <Singular/links/ndbm.h> 54 54 55 55 #define BYTESIZ 8 -
Singular/links/silink.cc
r2b43ac r05051f 29 29 #include <coeffs/numbers.h> 30 30 #include <misc/intvec.h> 31 #include <Singular/ ssiLink.h>32 #include <Singular/ pipeLink.h>31 #include <Singular/links/ssiLink.h> 32 #include <Singular/links/pipeLink.h> 33 33 34 34 // #ifdef HAVE_DBM -
Singular/links/sing_dbm.cc
r2b43ac r05051f 26 26 # include <Singular/ipid.h> 27 27 # include <Singular/silink.h> 28 # include <Singular/ sing_dbm.h>28 # include <Singular/links/sing_dbm.h> 29 29 30 30 // #ifdef ix86_Win -
Singular/links/ssiLink.cc
r2b43ac r05051f 19 19 #include <netdb.h> 20 20 #include <sys/wait.h> 21 #include <time.h> 21 22 22 23 … … 43 44 #include <Singular/lists.h> 44 45 #include <Singular/blackbox.h> 45 #include <Singular/ssiLink.h> 46 #include <Singular/links/s_buff.h> 47 #include <Singular/links/ssiLink.h> 46 48 47 49 struct snumber_dummy … … 60 62 //#endif 61 63 62 #define SSI_VERSION 364 #define SSI_VERSION 4 63 65 64 66 typedef struct 65 67 { 66 FILE *f_read;68 s_buff f_read; 67 69 FILE *f_write; 68 70 ring r; … … 70 72 int fd_read,fd_write; /* only valid for fork/tcp mode*/ 71 73 char level; 72 char ungetc_buf; /* status sets to !=0, if ungetc was used, ssiRead* set to 0*/73 74 char send_quit_at_exit; 74 75 … … 77 78 78 79 link_list ssiToBeClosed=NULL; 79 sigset_t ssi_sigmask; 80 sigset_t ssi_oldmask; 80 BOOLEAN ssiToBeClosed_inactive=TRUE; 81 81 #define SSI_BLOCK_CHLD sigprocmask(SIG_SETMASK, &ssi_sigmask, &ssi_oldmask) 82 82 #define SSI_UNBLOCK_CHLD sigprocmask(SIG_SETMASK, &ssi_oldmask, NULL) … … 114 114 { 115 115 SSI_BLOCK_CHLD; 116 fprintf(d->f_write,"%d %s ", strlen(s),s);116 fprintf(d->f_write,"%d %s ",(int)strlen(s),s); 117 117 SSI_UNBLOCK_CHLD; 118 118 //if (d->f_debug!=NULL) fprintf(d->f_debug,"stringi: %d \"%s\" ",strlen(s),s); … … 204 204 for(i=0;i<r->N;i++) 205 205 { 206 fprintf(d->f_write,"%d %s ", strlen(r->names[i]),r->names[i]);206 fprintf(d->f_write,"%d %s ",(int)strlen(r->names[i]),r->names[i]); 207 207 } 208 208 /* number of orderings:*/ … … 248 248 fprintf(d->f_write,"%d ",pLength(p));//number of terms 249 249 SSI_UNBLOCK_CHLD; 250 int i;251 250 252 251 while(p!=NULL) … … 305 304 void ssiWriteProc(ssiInfo *d,procinfov p) 306 305 { 307 ssiWriteString(d,p->data.s.body); 306 if (p->data.s.body==NULL) 307 iiGetLibProcBuffer(p); 308 if (p->data.s.body!=NULL) 309 ssiWriteString(d,p->data.s.body); 310 else 311 ssiWriteString(d,""); 308 312 } 309 313 … … 331 335 SSI_UNBLOCK_CHLD; 332 336 } 337 void ssiWriteIntmat(ssiInfo *d,intvec * v) 338 { 339 SSI_BLOCK_CHLD; 340 fprintf(d->f_write,"%d %d ",v->rows(),v->cols()); 341 int i; 342 for(i=0;i<v->length();i++) 343 { 344 fprintf(d->f_write,"%d ",(*v)[i]); 345 } 346 SSI_UNBLOCK_CHLD; 347 } 333 348 334 349 char *ssiReadString(ssiInfo *d) … … 336 351 char *buf; 337 352 int l; 338 SSI_BLOCK_CHLD; 339 fscanf(d->f_read,"%d ",&l); 340 SSI_UNBLOCK_CHLD; 341 buf=(char*)omAlloc(l+1); 342 SSI_BLOCK_CHLD; 343 fread(buf,1,l,d->f_read); 344 SSI_UNBLOCK_CHLD; 353 l=s_readint(d->f_read); 354 buf=(char*)omAlloc0(l+1); 355 int c =s_getc(d->f_read); /* skip ' '*/ 356 int ll=s_readbytes(buf,l,d->f_read); 357 //if (ll!=l) printf("want %d, got %d bytes\n",l,ll); 345 358 buf[l]='\0'; 346 359 return buf; 347 360 } 348 361 349 int ssiReadInt(FILE *fich) 350 { 351 int d; 352 SSI_BLOCK_CHLD; 353 fscanf(fich,"%d",&d); 354 SSI_UNBLOCK_CHLD; 355 return d; 362 int ssiReadInt(s_buff fich) 363 { 364 return s_readint(fich); 356 365 } 357 366 … … 359 368 { 360 369 int sub_type=-1; 361 SSI_BLOCK_CHLD; 362 fscanf(d->f_read,"%d",&sub_type); 363 SSI_UNBLOCK_CHLD; 370 sub_type=s_readint(d->f_read); 364 371 switch(sub_type) 365 372 { … … 367 374 {// read int or mpz_t or mpz_t, mpz_t 368 375 number n=(number)omAlloc0(sizeof(snumber_dummy)); 369 SSI_BLOCK_CHLD; 370 mpz_inp_str(((number_dummy)n)->z,d->f_read,0); 371 SSI_UNBLOCK_CHLD; 376 s_readmpz(d->f_read,((number_dummy)n)->z); 372 377 ((number_dummy)n)->s=sub_type; 373 378 return n; … … 376 381 { 377 382 int dd; 378 SSI_BLOCK_CHLD; 379 fscanf(d->f_read,"%d",&dd); 380 SSI_UNBLOCK_CHLD; 383 dd=s_readint(d->f_read); 381 384 return n_Init(dd,d->r->cf); 382 385 } … … 391 394 if (rField_is_Q(d->r)) 392 395 { 393 int sub_type=-1; 394 SSI_BLOCK_CHLD; 395 fscanf(d->f_read,"%d",&sub_type); 396 SSI_UNBLOCK_CHLD; 396 int sub_type=s_readint(d->f_read); 397 397 switch(sub_type) 398 398 { … … 401 401 {// read mpz_t, mpz_t 402 402 number n=(number)omAlloc0(sizeof(snumber_dummy)); 403 mpz_init(((number_dummy)n)->z); 403 404 mpz_init(((number_dummy)n)->n); 404 SSI_BLOCK_CHLD; 405 gmp_fscanf(d->f_read,"%Zd %Zd",((number_dummy)n)->z,((number_dummy)n)->n); 406 SSI_UNBLOCK_CHLD; 405 s_readmpz(d->f_read,((number_dummy)n)->z); 406 s_readmpz(d->f_read,((number_dummy)n)->n); 407 407 ((number_dummy)n)->s=sub_type; 408 408 return n; … … 412 412 {// read mpz_t 413 413 number n=(number)omAlloc0(sizeof(snumber_dummy)); 414 SSI_BLOCK_CHLD; 415 gmp_fscanf(d->f_read,"%Zd",((number_dummy)n)->z); 416 SSI_UNBLOCK_CHLD; 414 mpz_init(((number_dummy)n)->z); 415 s_readmpz(d->f_read,((number_dummy)n)->z); 417 416 ((number_dummy)n)->s=3; /*sub_type*/ 418 417 return n; … … 420 419 case 4: 421 420 { 422 int dd; 423 SSI_BLOCK_CHLD; 424 fscanf(d->f_read,"%d",&dd); 425 SSI_UNBLOCK_CHLD; 421 int dd=s_readint(d->f_read); 426 422 return n_Init(dd,d->r->cf); 427 423 } … … 430 426 {// read raw mpz_t, mpz_t 431 427 number n=(number)omAlloc0(sizeof(snumber_dummy)); 428 mpz_init(((number_dummy)n)->z); 432 429 mpz_init(((number_dummy)n)->n); 433 SSI_BLOCK_CHLD; 434 mpz_inp_str (((number_dummy)n)->z, d->f_read, 32); 435 mpz_inp_str (((number_dummy)n)->n, d->f_read, 32); 436 SSI_UNBLOCK_CHLD; 430 s_readmpz_base (d->f_read,((number_dummy)n)->z, 32); 431 s_readmpz_base (d->f_read,((number_dummy)n)->n, 32); 437 432 ((number_dummy)n)->s=sub_type-5; 438 433 return n; … … 441 436 {// read raw mpz_t 442 437 number n=(number)omAlloc0(sizeof(snumber_dummy)); 443 SSI_BLOCK_CHLD; 444 mpz_inp_str (((number_dummy)n)->z, d->f_read, 32); 445 SSI_UNBLOCK_CHLD; 438 mpz_init(((number_dummy)n)->z); 439 s_readmpz_base (d->f_read,((number_dummy)n)->z, 32); 446 440 ((number_dummy)n)->s=sub_type=3; /*subtype-5*/ 447 441 return n; … … 455 449 { 456 450 // read int 457 int dd; 458 SSI_BLOCK_CHLD; 459 fscanf(d->f_read,"%d",&dd); 460 SSI_UNBLOCK_CHLD; 451 int dd=s_readint(d->f_read); 461 452 return (number)dd; 462 453 } … … 468 459 { 469 460 /* syntax is <ch> <N> <l1> <v1> ...<lN> <vN> <number of orderings> <ord1> <block0_1> <block1_1> .... */ 470 int ch, N,i ,l;461 int ch, N,i; 471 462 char **names; 472 SSI_BLOCK_CHLD; 473 fscanf(d->f_read,"%d %d ",&ch,&N); 474 SSI_UNBLOCK_CHLD; 463 ch=s_readint(d->f_read); 464 N=s_readint(d->f_read); 475 465 names=(char**)omAlloc(N*sizeof(char*)); 476 466 for(i=0;i<N;i++) … … 480 470 // read the orderings: 481 471 int num_ord; // number of orderings 482 SSI_BLOCK_CHLD; 483 fscanf(d->f_read,"%d",&num_ord); 484 SSI_UNBLOCK_CHLD; 472 num_ord=s_readint(d->f_read); 485 473 int *ord=(int *)omAlloc0((num_ord+1)*sizeof(int)); 486 474 int *block0=(int *)omAlloc0((num_ord+1)*sizeof(int)); 487 475 int *block1=(int *)omAlloc0((num_ord+1)*sizeof(int)); 488 SSI_BLOCK_CHLD;489 476 int **wvhdl=(int**)omAlloc0((num_ord+1)*sizeof(int*)); 490 477 for(i=0;i<num_ord;i++) 491 478 { 492 fscanf(d->f_read,"%d %d %d",&ord[i],&block0[i],&block1[i]); 479 ord[i]=s_readint(d->f_read); 480 block0[i]=s_readint(d->f_read); 481 block1[i]=s_readint(d->f_read); 493 482 switch(ord[i]) 494 483 { … … 503 492 int ii; 504 493 for(ii=block0[i];ii<=block1[i];ii++) 505 fscanf(d->f_read,"%d",&(wvhdl[i][ii-block0[i]]));494 wvhdl[i][ii-block0[i]]=s_readint(d->f_read); 506 495 } 507 496 break; … … 517 506 } 518 507 } 519 SSI_UNBLOCK_CHLD;520 508 return rDefault(ch,N,names,num_ord,ord,block0,block1,wvhdl); 521 509 } … … 537 525 p=p_Init(D->r); 538 526 pGetCoeff(p)=ssiReadNumber(D); 539 int d; 540 SSI_BLOCK_CHLD; 541 fscanf(D->f_read,"%d",&d); 542 SSI_UNBLOCK_CHLD; 527 int d=s_readint(D->f_read); 543 528 p_SetComp(p,d,D->r); 544 529 for(i=1;i<=rVar(D->r);i++) 545 530 { 546 SSI_BLOCK_CHLD; 547 fscanf(D->f_read,"%d",&d); 548 SSI_UNBLOCK_CHLD; 531 d=s_readint(D->f_read); 549 532 p_SetExp(p,i,d,D->r); 550 533 } … … 560 543 ideal ssiReadIdeal(ssiInfo *d) 561 544 { 562 int n,i; 563 ideal I; 564 SSI_BLOCK_CHLD; 565 fscanf(d->f_read,"%d",&n); 566 SSI_UNBLOCK_CHLD; 567 I=idInit(n,1); 545 int i; 546 int n=s_readint(d->f_read); 547 ideal I=idInit(n,1); 568 548 for(i=0;i<IDELEMS(I);i++) // read n terms 569 549 { … … 575 555 matrix ssiReadMatrix(ssiInfo *d) 576 556 { 577 int n,m,i,j; 578 SSI_BLOCK_CHLD; 579 fscanf(d->f_read,"%d %d",&m,&n); 580 SSI_UNBLOCK_CHLD; 557 int m=s_readint(d->f_read); 558 int n=s_readint(d->f_read); 581 559 matrix M=mpNew(m,n); 582 560 poly p; … … 596 574 command D=(command)omAlloc0(sizeof(*D)); 597 575 int argc,op; 598 SSI_BLOCK_CHLD; 599 fscanf(d->f_read,"%d %d",&argc,&op); 600 SSI_UNBLOCK_CHLD; 576 argc=s_readint(d->f_read); 577 op=s_readint(d->f_read); 601 578 D->argc=argc; D->op=op; 602 579 leftv v; … … 650 627 { 651 628 ssiInfo *d=(ssiInfo*)l->data; 652 int nr; 653 SSI_BLOCK_CHLD; 654 fscanf(d->f_read,"%d",&nr); 655 SSI_UNBLOCK_CHLD; 629 int nr=s_readint(d->f_read); 656 630 lists L=(lists)omAlloc(sizeof(*L)); 657 631 L->Init(nr); … … 669 643 intvec* ssiReadIntvec(ssiInfo *d) 670 644 { 671 int nr; 672 SSI_BLOCK_CHLD; 673 fscanf(d->f_read,"%d",&nr); 674 SSI_UNBLOCK_CHLD; 645 int nr=s_readint(d->f_read); 675 646 intvec *v=new intvec(nr); 676 SSI_BLOCK_CHLD;677 647 for(int i=0;i<nr;i++) 678 648 { 679 fscanf(d->f_read,"%d",&((*v)[i])); 680 } 681 SSI_UNBLOCK_CHLD; 649 (*v)[i]=s_readint(d->f_read); 650 } 682 651 return v; 683 652 } 653 intvec* ssiReadIntmat(ssiInfo *d) 654 { 655 int r,c; 656 r=s_readint(d->f_read); 657 c=s_readint(d->f_read); 658 intvec *v=new intvec(r,c,0); 659 for(int i=0;i<r*c;i++) 660 { 661 (*v)[i]=s_readint(d->f_read); 662 } 663 return v; 664 } 684 665 685 666 void ssiReadBlackbox(leftv res, si_link l) 686 667 { 687 668 ssiInfo *d=(ssiInfo*)l->data; 688 int throwaway; 689 SSI_BLOCK_CHLD; 690 fscanf(d->f_read,"%d ",&throwaway); 691 SSI_UNBLOCK_CHLD; 669 int throwaway=s_readint(d->f_read); 692 670 char *name=ssiReadString(d); 693 671 int tok; … … 747 725 int pc[2]; 748 726 int cp[2]; 727 SSI_BLOCK_CHLD; 749 728 pipe(pc); 750 729 pipe(cp); 751 730 pid_t pid=fork(); 731 SSI_UNBLOCK_CHLD; 752 732 if (pid==0) /*fork: child*/ 753 733 { … … 756 736 while(hh!=NULL) 757 737 { 738 SI_LINK_SET_CLOSE_P(hh->l); 758 739 ssiInfo *dd=(ssiInfo*)hh->l->data; 759 fclose(dd->f_read); 740 SSI_BLOCK_CHLD; 741 s_close(dd->f_read); 760 742 fclose(dd->f_write); 743 SSI_UNBLOCK_CHLD; 761 744 if (dd->r!=NULL) rKill(dd->r); 762 745 omFreeSize((ADDRESS)dd,(sizeof *dd)); 763 746 hh->l->data=NULL; 764 SI_LINK_SET_CLOSE_P(hh->l);765 747 link_list nn=(link_list)hh->next; 766 748 omFree(hh); … … 768 750 } 769 751 ssiToBeClosed->next=NULL; 752 SSI_BLOCK_CHLD; 770 753 close(pc[1]); close(cp[0]); 771 d->f_read=fdopen(pc[0],"r");772 d->fd_read=pc[0];773 754 d->f_write=fdopen(cp[1],"w"); 755 SSI_UNBLOCK_CHLD; 756 d->f_read=s_open(pc[0]); 757 d->fd_read=pc[0]; 774 758 d->fd_write=cp[1]; 775 759 l->data=d; … … 804 788 { 805 789 d->pid=pid; 790 SSI_BLOCK_CHLD; 806 791 close(pc[0]); close(cp[1]); 807 d->f_read=fdopen(cp[0],"r");808 d->fd_read=cp[0];809 792 d->f_write=fdopen(pc[1],"w"); 793 SSI_UNBLOCK_CHLD; 794 d->f_read=s_open(cp[0]); 795 d->fd_read=cp[0]; 810 796 d->fd_write=pc[1]; 811 797 SI_LINK_SET_RW_OPEN_P(l); … … 825 811 int sockfd, newsockfd, portno, clilen; 826 812 struct sockaddr_in serv_addr, cli_addr; 827 int n;828 813 sockfd = socket(AF_INET, SOCK_STREAM, 0); 829 814 if(sockfd < 0) … … 864 849 d->fd_read = newsockfd; 865 850 d->fd_write = newsockfd; 866 d->f_read = fdopen(newsockfd, "r");851 d->f_read = s_open(newsockfd); 867 852 d->f_write = fdopen(newsockfd, "w"); 868 853 SI_LINK_SET_RW_OPEN_P(l); … … 886 871 int sockfd, newsockfd, portno, clilen; 887 872 struct sockaddr_in serv_addr, cli_addr; 888 int n;889 873 sockfd = socket(AF_INET, SOCK_STREAM, 0); 890 874 if(sockfd < 0) … … 953 937 d->fd_read = newsockfd; 954 938 d->fd_write = newsockfd; 955 d->f_read = fdopen(newsockfd, "r"); 939 d->f_read = s_open(newsockfd); 940 SSI_BLOCK_CHLD; 956 941 d->f_write = fdopen(newsockfd, "w"); 942 close(sockfd); 943 SSI_UNBLOCK_CHLD; 957 944 SI_LINK_SET_RW_OPEN_P(l); 958 945 d->send_quit_at_exit=1; 959 close(sockfd);960 946 fprintf(d->f_write,"98 %d %d %u %u\n",SSI_VERSION,MAX_TOK,test,verbose); 961 947 } … … 964 950 { 965 951 char* host = (char*)omAlloc(256); 966 int sockfd, portno , n;952 int sockfd, portno; 967 953 struct sockaddr_in serv_addr; 968 954 struct hostent *server; … … 985 971 { Werror("ERROR connecting(errno=%d)",errno); return TRUE; } 986 972 //PrintS("connected\n");mflush(); 987 d->f_read= fdopen(sockfd,"r");973 d->f_read=s_open(sockfd); 988 974 d->fd_read=sockfd; 989 975 d->f_write=fdopen(sockfd,"w"); … … 1020 1006 } 1021 1007 } 1008 SSI_BLOCK_CHLD; 1022 1009 outfile=myfopen(filename,mode); 1010 SSI_UNBLOCK_CHLD; 1023 1011 if (outfile!=NULL) 1024 1012 { 1025 if (strcmp(l->mode,"r")==0) d->f_read = outfile; 1013 if (strcmp(l->mode,"r")==0) 1014 { 1015 SSI_BLOCK_CHLD; 1016 fclose(outfile); 1017 d->f_read=s_open_by_name(filename); 1018 SSI_UNBLOCK_CHLD; 1019 } 1026 1020 else 1027 1021 { … … 1048 1042 if (l!=NULL) 1049 1043 { 1044 SI_LINK_SET_CLOSE_P(l); 1050 1045 ssiInfo *d = (ssiInfo *)l->data; 1051 1046 if (d!=NULL) 1052 1047 { 1048 if (d->send_quit_at_exit) 1049 { 1050 SSI_BLOCK_CHLD; 1051 fputs("99\n",d->f_write); 1052 fflush(d->f_write); 1053 SSI_UNBLOCK_CHLD; 1054 } 1053 1055 if (d->r!=NULL) rKill(d->r); 1056 if ((d->pid!=0) 1057 && (waitpid(d->pid,NULL,WNOHANG)==0)) 1058 { 1059 struct timespec t; 1060 t.tv_sec=0; 1061 t.tv_nsec=50000000; // <=50 ms 1062 int r=nanosleep(&t,NULL); 1063 if((r==0) && (waitpid(d->pid,NULL,WNOHANG)==0)) 1064 { 1065 kill(d->pid,15); 1066 t.tv_sec=0; 1067 t.tv_nsec=10000000; // <=10 ms 1068 r=nanosleep(&t,NULL); 1069 if((r==0)&&(waitpid(d->pid,NULL,WNOHANG)==0)) 1070 { 1071 kill(d->pid,9); // just to be sure 1072 waitpid(d->pid,NULL,0); 1073 } 1074 } 1075 } 1076 if (d->f_read!=NULL) s_close(d->f_read); 1077 if (d->f_write!=NULL) fclose(d->f_write); 1054 1078 if ((strcmp(l->mode,"tcp")==0) 1055 1079 || (strcmp(l->mode,"fork")==0)) … … 1063 1087 omFreeSize(hh,sizeof(link_struct)); 1064 1088 } 1065 else while(hh !=NULL)1089 else while(hh->next!=NULL) 1066 1090 { 1067 1091 link_list hhh=(link_list)hh->next; … … 1072 1096 break; 1073 1097 } 1074 hh=(link_list)hh->next; 1098 else 1099 hh=(link_list)hh->next; 1075 1100 } 1076 1101 } 1077 if (d->send_quit_at_exit)1078 {1079 fputs("99\n",d->f_write);fflush(d->f_write);1080 }1081 }1082 if (d->f_read!=NULL) fclose(d->f_read);1083 if (d->f_write!=NULL) fclose(d->f_write);1084 if (d->pid!=0)1085 {1086 kill(d->pid,15);1087 waitpid(d->pid,NULL,WNOHANG);1088 kill(d->pid,9); // just to be sure1089 waitpid(d->pid,NULL,0);1090 1102 } 1091 1103 omFreeSize((ADDRESS)d,(sizeof *d)); 1092 1104 } 1093 1105 l->data=NULL; 1094 SI_LINK_SET_CLOSE_P(l);1095 1106 } 1096 1107 return FALSE; … … 1101 1112 { 1102 1113 ssiInfo *d = (ssiInfo *)l->data; 1103 d->ungetc_buf='\0';1104 1114 leftv res=(leftv)omAlloc0(sizeof(sleftv)); 1105 int t=0; 1106 SSI_BLOCK_CHLD; 1107 fscanf(d->f_read,"%d",&t); 1108 SSI_UNBLOCK_CHLD; 1115 int t=s_readint(d->f_read); 1109 1116 //Print("got type %d\n",t); 1110 1117 switch(t) … … 1180 1187 res->data=ssiReadIntvec(d); 1181 1188 break; 1189 case 18: res->rtyp=INTMAT_CMD; 1190 res->data=ssiReadIntmat(d); 1191 break; 1182 1192 case 20: ssiReadBlackbox(res,l); 1183 1193 break; … … 1187 1197 int n98_v,n98_m; 1188 1198 BITSET n98_o1,n98_o2; 1189 SSI_BLOCK_CHLD; 1190 fscanf(d->f_read,"%d %d %u %u\n",&n98_v,&n98_m,&n98_o1,&n98_o2); 1191 SSI_UNBLOCK_CHLD; 1199 n98_v=s_readint(d->f_read); 1200 n98_m=s_readint(d->f_read); 1201 n98_o1=s_readint(d->f_read); 1202 n98_o2=s_readint(d->f_read); 1192 1203 if ((n98_v!=SSI_VERSION) ||(n98_m!=MAX_TOK)) 1193 1204 { … … 1204 1215 } 1205 1216 case 99: ssiClose(l); m2_end(0); 1206 case 0: if ( feof(d->f_read))1217 case 0: if (s_iseof(d->f_read)) 1207 1218 { 1208 1219 ssiClose(l); … … 1305 1316 ssiWriteIntvec(d,(intvec *)dd); 1306 1317 break; 1318 case INTMAT_CMD: 1319 fputs("18 ",d->f_write); 1320 ssiWriteIntmat(d,(intvec *)dd); 1321 break; 1307 1322 default: 1308 1323 if (tt>MAX_TOK) … … 1327 1342 } 1328 1343 1344 BOOLEAN ssiGetDump(si_link l); 1345 BOOLEAN ssiDump(si_link l); 1346 1329 1347 si_link_extension slInitSsiExtension(si_link_extension s) 1330 1348 { … … 1335 1353 s->Read2=(slRead2Proc)NULL; 1336 1354 s->Write=ssiWrite; 1355 s->Dump=ssiDump; 1356 s->GetDump=ssiGetDump; 1337 1357 1338 1358 s->Status=slStatusSsi; … … 1345 1365 ssiInfo *d=(ssiInfo*)l->data; 1346 1366 if (d==NULL) return "not open"; 1347 if (((strcmp(l->mode,"fork")==0)||(strcmp(l->mode,"tcp")==0)) 1367 if (((strcmp(l->mode,"fork")==0) 1368 ||(strcmp(l->mode,"tcp")==0) 1369 ||(strcmp(l->mode,"connect")==0)) 1348 1370 && (strcmp(request, "read") == 0)) 1349 1371 { 1350 fd_set mask , fdmask;1372 fd_set mask; 1351 1373 struct timeval wt; 1352 if ( d->ungetc_buf) return "ready";1374 if (s_isready(d->f_read)) return "ready"; 1353 1375 loop 1354 1376 { … … 1369 1391 /* yes: read 1 char*/ 1370 1392 /* if \n, check again with select else ungetc(c), ready*/ 1371 int c= fgetc(d->f_read);1393 int c=s_getc(d->f_read); 1372 1394 //Print("try c=%d\n",c); 1373 1395 if (c== -1) return "eof"; /* eof or error */ 1374 1396 else if (isdigit(c)) 1375 { ungetc(c,d->f_read); d->ungetc_buf='\1'; return "ready"; }1397 { s_ungetc(c,d->f_read); return "ready"; } 1376 1398 else if (c>' ') 1377 1399 { … … 1384 1406 else if (strcmp(request, "read") == 0) 1385 1407 { 1386 if (SI_LINK_R_OPEN_P(l) && (! feof(d->f_read))) return "ready";1408 if (SI_LINK_R_OPEN_P(l) && (!s_iseof(d->f_read)) && (s_isready(d->f_read))) return "ready"; 1387 1409 else return "not ready"; 1388 1410 } … … 1410 1432 si_link l; 1411 1433 ssiInfo *d; 1434 #ifdef HAVE_MPSR 1435 MP_Link_pt dd; 1436 #endif 1412 1437 int d_fd; 1413 1438 fd_set mask, fdmask; … … 1478 1503 return -2; 1479 1504 } 1505 #ifdef HAVE_MPSR 1506 if (strcmp(l->m->type,"ssi")==0) 1507 { 1508 d=(ssiInfo*)l->data; 1509 d_fd=d->fd_read; 1510 if (!s_isready(d->f_read)) 1511 { 1512 FD_SET(d_fd, &fdmask); 1513 if (d_fd > max_fd) max_fd=d_fd; 1514 } 1515 else 1516 return i+1; 1517 } 1518 else 1519 { 1520 dd=(MP_Link_pt)l->data; 1521 d_fd=((MP_TCP_t *)dd->transp.private1)->sock; 1522 FD_SET(d_fd, &fdmask); 1523 if (d_fd > max_fd) max_fd=d_fd; 1524 } 1525 #else 1480 1526 d=(ssiInfo*)l->data; 1481 1527 d_fd=d->fd_read; 1482 if ( d->ungetc_buf=='\0')1528 if (!s_isready(d->f_read)) 1483 1529 { 1484 1530 FD_SET(d_fd, &fdmask); … … 1487 1533 else 1488 1534 return i+1; 1535 #endif 1489 1536 } 1490 1537 } … … 1503 1550 1504 1551 /* check with select: chars waiting: no -> not ready */ 1552 #ifdef HAVE_SIMPLEIPC 1553 sipc_semaphore_release(0); 1554 #endif 1505 1555 #ifdef HAVE_PSELECT 1506 1556 s = pselect(max_fd, &mask, NULL, NULL, wt_ptr, &sigmask); … … 1510 1560 SSI_UNBLOCK_CHLD; 1511 1561 #endif 1562 #ifdef HAVE_SIMPLEIPC 1563 sipc_semaphore_acquire(0); 1564 #endif 1512 1565 1513 1566 if (s==-1) … … 1529 1582 { 1530 1583 l=(si_link)L->m[i].Data(); 1584 #ifdef HAVE_MPSR 1585 if (strcmp(l->m->type,"ssi")!=0) 1586 { 1587 // for MP links, return here: 1588 dd=(MP_Link_pt)l->data; 1589 d_fd=((MP_TCP_t *)dd->transp.private1)->sock; 1590 if(j==d_fd) return i+1; 1591 } 1592 else 1593 { 1594 d=(ssiInfo*)l->data; 1595 d_fd=d->fd_read; 1596 if(j==d_fd) break; 1597 } 1598 #else 1531 1599 d=(ssiInfo*)l->data; 1532 1600 d_fd=d->fd_read; 1533 1601 if(j==d_fd) break; 1602 #endif 1534 1603 } 1535 1604 } … … 1540 1609 /* if \n, check again with select else ungetc(c), ready*/ 1541 1610 /* setting: d: current ssiInfo, j current fd, i current entry in L*/ 1542 int c= fgetc(d->f_read);1611 int c=s_getc(d->f_read); 1543 1612 //Print("try c=%d\n",c); 1544 1613 if (c== -1) /* eof */ … … 1561 1630 { 1562 1631 timeout = si_max(0, 1563 1632 timeout - 1000000*(getRTimer()/TIMER_RESOLUTION - startingtime)); 1564 1633 wt.tv_sec = timeout / 1000000; 1565 1634 #ifdef HAVE_PSELECT … … 1573 1642 1574 1643 else if (isdigit(c)) 1575 { ungetc(c,d->f_read); d->ungetc_buf='\1'; return i+1; }1644 { s_ungetc(c,d->f_read); return i+1; } 1576 1645 else if (c>' ') 1577 1646 { … … 1614 1683 } 1615 1684 1685 static int ssiReserved_P=0; 1686 static int ssiReserved_sockfd; 1687 static struct sockaddr_in ssiResverd_serv_addr; 1688 static int ssiReserved_Clients; 1689 int ssiReservePort(int clients) 1690 { 1691 if (ssiReserved_P!=0) 1692 { 1693 WerrorS("ERROR already a reverved port requested"); 1694 return 0; 1695 } 1696 int portno; 1697 ssiReserved_sockfd = socket(AF_INET, SOCK_STREAM, 0); 1698 if(ssiReserved_sockfd < 0) 1699 { 1700 WerrorS("ERROR opening socket"); 1701 return 0; 1702 } 1703 memset((char *) &ssiResverd_serv_addr,0, sizeof(ssiResverd_serv_addr)); 1704 portno = 1025; 1705 ssiResverd_serv_addr.sin_family = AF_INET; 1706 ssiResverd_serv_addr.sin_addr.s_addr = INADDR_ANY; 1707 do 1708 { 1709 portno++; 1710 ssiResverd_serv_addr.sin_port = htons(portno); 1711 if(portno > 50000) 1712 { 1713 WerrorS("ERROR on binding (no free port available?)"); 1714 return 0; 1715 } 1716 } 1717 while(bind(ssiReserved_sockfd, (struct sockaddr *) &ssiResverd_serv_addr, sizeof(ssiResverd_serv_addr)) < 0); 1718 ssiReserved_P=portno; 1719 listen(ssiReserved_sockfd,clients); 1720 ssiReserved_Clients=clients; 1721 return portno; 1722 } 1723 1724 extern si_link_extension si_link_root; 1725 si_link ssiCommandLink() 1726 { 1727 if (ssiReserved_P==0) 1728 { 1729 WerrorS("ERROR no reverved port requested"); 1730 return NULL; 1731 } 1732 struct sockaddr_in cli_addr; 1733 int clilen = sizeof(cli_addr); 1734 int newsockfd = accept(ssiReserved_sockfd, (struct sockaddr *) &cli_addr, (socklen_t *)&clilen); 1735 if(newsockfd < 0) 1736 { 1737 Werror("ERROR on accept (errno=%d)",errno); 1738 return NULL; 1739 } 1740 si_link l=(si_link) omAlloc0Bin(sip_link_bin); 1741 si_link_extension s = si_link_root; 1742 si_link_extension prev = s; 1743 while (strcmp(s->type, "ssi") != 0) 1744 { 1745 if (s->next == NULL) 1746 { 1747 prev = s; 1748 s = NULL; 1749 break; 1750 } 1751 else 1752 { 1753 s = s->next; 1754 } 1755 } 1756 if (s != NULL) 1757 l->m = s; 1758 else 1759 { 1760 si_link_extension ns = (si_link_extension)omAlloc0Bin(s_si_link_extension_bin); 1761 prev->next=slInitSsiExtension(ns); 1762 l->m = prev->next; 1763 } 1764 l->name=omStrDup(""); 1765 l->mode=omStrDup("tcp"); 1766 l->ref=1; 1767 ssiInfo *d=(ssiInfo*)omAlloc0(sizeof(ssiInfo)); 1768 sigprocmask(SIG_SETMASK, NULL, &ssi_sigmask); 1769 sigaddset(&ssi_sigmask, SIGCHLD); 1770 l->data=d; 1771 d->fd_read = newsockfd; 1772 d->fd_write = newsockfd; 1773 d->f_read = s_open(newsockfd); 1774 d->f_write = fdopen(newsockfd, "w"); 1775 SI_LINK_SET_RW_OPEN_P(l); 1776 ssiReserved_Clients--; 1777 if (ssiReserved_Clients<=0) 1778 { 1779 ssiReserved_P=0; 1780 close(ssiReserved_sockfd); 1781 } 1782 return l; 1783 } 1784 /*---------------------------------------------------------------------*/ 1785 /** 1786 * @brief additional default signal handler 1787 1788 // some newer Linux version cannot have SIG_IGN for SIGCHLD, 1789 // so use this nice routine here: 1790 // SuSe 9.x reports -1 always 1791 // Redhat 9.x/FC x reports sometimes -1 1792 // see also: hpux_system 1793 // also needed by getrusage (timer etc.) 1794 1795 @param[in] sig 1796 **/ 1797 /*---------------------------------------------------------------------*/ 1798 void sig_chld_hdl(int sig) 1799 { 1800 pid_t kidpid; 1801 int status; 1802 1803 loop 1804 { 1805 kidpid = waitpid(-1, &status, WNOHANG); 1806 if (kidpid==-1) 1807 { 1808 /* continue on interruption (EINTR): */ 1809 if (errno == EINTR) continue; 1810 /* break on anything else (EINVAL or ECHILD according to manpage): */ 1811 break; 1812 } 1813 else if (kidpid==0) break; /* no more children to process, so break */ 1814 1815 //printf("Child %ld terminated\n", kidpid); 1816 link_list hh=ssiToBeClosed; 1817 while(hh!=NULL) 1818 { 1819 if((hh->l!=NULL) && (hh->l->m->Open==ssiOpen)) 1820 { 1821 ssiInfo *d = (ssiInfo *)hh->l->data; 1822 if(d->pid==kidpid) 1823 { 1824 if(ssiToBeClosed_inactive) 1825 { 1826 ssiToBeClosed_inactive=FALSE; 1827 slClose(hh->l); 1828 ssiToBeClosed_inactive=TRUE; 1829 break; 1830 } 1831 else break; 1832 } 1833 else hh=(link_list)hh->next; 1834 } 1835 else hh=(link_list)hh->next; 1836 } 1837 } 1838 } 1839 1840 static BOOLEAN DumpSsiIdhdl(si_link l, idhdl h) 1841 { 1842 int type_id = IDTYP(h); 1843 1844 // C-proc not to be dumped, also LIB-proc not 1845 if (type_id == PROC_CMD) 1846 { 1847 if (IDPROC(h)->language == LANG_C) return FALSE; 1848 if (IDPROC(h)->libname != NULL) return FALSE; 1849 } 1850 // do not dump links 1851 if (type_id == LINK_CMD) return FALSE; 1852 1853 // do not dump ssi internal rings: ssiRing* 1854 if ((type_id == RING_CMD) && (strncmp(IDID(h),"ssiRing",7)==0)) 1855 return FALSE; 1856 1857 command D=(command)omAlloc0(sizeof(*D)); 1858 sleftv tmp; 1859 memset(&tmp,0,sizeof(tmp)); 1860 tmp.rtyp=COMMAND; 1861 tmp.data=D; 1862 1863 if (type_id == PACKAGE_CMD) 1864 { 1865 // do not dump Top 1866 if (strcmp(IDID(h), "Top") == 0) return FALSE; 1867 package p=(package)IDDATA(h); 1868 // dump Singular-packages as load("..."); 1869 if (p->language==LANG_SINGULAR) 1870 { 1871 D->op=LOAD_CMD; 1872 D->argc=1; 1873 D->arg1.rtyp=STRING_CMD; 1874 D->arg1.data=p->libname; 1875 ssiWrite(l,&tmp); 1876 omFree(D); 1877 return FALSE; 1878 } 1879 } 1880 1881 // handle qrings separately 1882 //if (type_id == QRING_CMD) 1883 // return DumpSsiQringQring(l, h); 1884 1885 // put type and name 1886 //Print("generic dump:%s,%s\n",IDID(h),Tok2Cmdname(IDTYP(h))); 1887 D->op='='; 1888 D->argc=2; 1889 D->arg1.rtyp=DEF_CMD; 1890 D->arg1.name=IDID(h); 1891 D->arg2.rtyp=IDTYP(h); 1892 D->arg2.data=IDDATA(h); 1893 ssiWrite(l,&tmp); 1894 omFree(D); 1895 return FALSE; 1896 } 1897 static BOOLEAN ssiDumpIter(si_link l, idhdl h) 1898 { 1899 if (h == NULL) return FALSE; 1900 1901 if (ssiDumpIter(l, IDNEXT(h))) return TRUE; 1902 1903 // need to set the ring before writing it, otherwise we get in 1904 // trouble with minpoly 1905 if (IDTYP(h) == RING_CMD || IDTYP(h) == QRING_CMD) 1906 rSetHdl(h); 1907 1908 if (DumpSsiIdhdl(l, h)) return TRUE; 1909 1910 // do not dump ssi internal rings: ssiRing* 1911 // but dump objects of all other rings 1912 if ((IDTYP(h) == RING_CMD || IDTYP(h) == QRING_CMD) 1913 && (strncmp(IDID(h),"ssiRing",7)!=0)) 1914 return ssiDumpIter(l, IDRING(h)->idroot); 1915 else 1916 return FALSE; 1917 } 1918 BOOLEAN ssiDump(si_link l) 1919 { 1920 idhdl h = IDROOT, rh = currRingHdl; 1921 BOOLEAN status = ssiDumpIter(l, h); 1922 1923 //if (! status ) status = DumpAsciiMaps(fd, h, NULL); 1924 1925 if (currRingHdl != rh) rSetHdl(rh); 1926 //fprintf(fd, "option(set, intvec(%d, %d));\n", test, verbose); 1927 1928 return status; 1929 } 1930 BOOLEAN ssiGetDump(si_link l) 1931 { 1932 ssiInfo *d=(ssiInfo*)l->data; 1933 loop 1934 { 1935 if (!SI_LINK_OPEN_P(l)) break; 1936 if (s_iseof(d->f_read)) break; 1937 leftv h=ssiRead1(l); /*contains an exit.... */ 1938 if (feErrors != NULL && *feErrors != '\0') 1939 { 1940 // handle errors: 1941 PrintS(feErrors); /* currently quite simple */ 1942 return TRUE; 1943 *feErrors = '\0'; 1944 } 1945 h->CleanUp(); 1946 omFreeBin(h, sleftv_bin); 1947 } 1948 return FALSE; 1949 } 1616 1950 // ---------------------------------------------------------------- 1617 1951 // format … … 1633 1967 // 16 nothing 1634 1968 // 17 intvec <len> ... 1969 // 18 intmat 1635 1970 // 1636 1971 // 20 blackbox <name> ... -
Singular/misc_ip.cc
r2b43ac r05051f 341 341 342 342 #include <kernel/febase.h> 343 #include <kernel/page.h>344 343 #include <kernel/kstd1.h> 345 344 #include <kernel/timer.h> -
Singular/silink.h
r2b43ac r05051f 11 11 #include <kernel/structs.h> 12 12 13 #include <Singular/ sing_dbm.h>13 #include <Singular/links/sing_dbm.h> 14 14 #include <Singular/lists.h> 15 15 #include <Singular/attrib.h> -
Singular/slInit_Static.cc
r2b43ac r05051f 18 18 19 19 # ifndef USE_GDBM 20 # include <Singular/ dbm_sl.h>20 # include <Singular/links/dbm_sl.h> 21 21 # else 22 # include <Singular/ sing_dbm.h>22 # include <Singular/links/sing_dbm.h> 23 23 #endif 24 24 -
Singular/test.cc
r2b43ac r05051f 149 149 #include <kernel/npolygon.h> 150 150 // #include <kernel/Number.h> // Too old? 151 #include <kernel/page.h>152 151 // #include <kernel/Poly.h> // Too old? 153 152 // #include <kernel/PowerSeries.h> // Too old? … … 194 193 #include "CacheImplementation.h" 195 194 #include "cntrlc.h" 196 #include " dbm_sl.h"195 #include "links/dbm_sl.h" 197 196 #include "distrib.h" 198 197 #include "eigenval_ip.h" … … 214 213 #include "minpoly.h" 215 214 #include "misc_ip.h" 216 #include " ndbm.h"215 #include "links/ndbm.h" 217 216 #include "newstruct.h" 218 217 #include "omSingularConfig.h" 219 218 #include "pcv.h" 220 #include " pipeLink.h"219 #include "links/pipeLink.h" 221 220 #include "run.h" 222 221 #include "sdb.h" 223 222 #include "silink.h" 224 #include " sing_dbm.h"223 #include "links/sing_dbm.h" 225 224 #include "sing_win.h" 226 225 #include "slInit.h" 227 #include " ssiLink.h"226 #include "links/ssiLink.h" 228 227 #include "static.h" 229 228 #include "stype.h" -
Singular/tesths.cc
r2b43ac r05051f 37 37 #include "version.h" 38 38 #include "slInit.h" 39 #include "ssiLink.h"39 #include <Singular/links/ssiLink.h> 40 40 #include "bigintm.h" 41 41 #include "mmalloc.h" -
configure.ac
rdec6c8 r05051f 125 125 fi 126 126 127 AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug], [do NOT build the debugging version of the libraries]), 128 [if test "x$enableval" = "xyes"; then 129 ENABLE_DEBUG=yes 130 fi], ENABLE_DEBUG=no) 131 132 AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) 133 127 134 AC_CONFIG_SUBDIRS([findexec]) 128 135 AC_CONFIG_SUBDIRS([omalloc]) -
factory/Makefile.am
rdec6c8 r05051f 9 9 AM_CPPFLAGS = -I${builddir}/include -I${srcdir}/include $(FLINT_CFLAGS) ${GMP_CFLAGS} ${NTL_CFLAGS} ${OMALLOC_CFLAGS} 10 10 11 lib_LTLIBRARIES = libfactory.la libfactory_g.la 11 if WANT_DEBUG 12 LIB_G=libfactory_g.la 13 else 14 LIB_G= 15 endif 16 17 lib_LTLIBRARIES = libfactory.la ${LIB_G} 12 18 13 19 libfactory_la_CXXFLAGS = -O3 -fomit-frame-pointer ${CXXTEMPLFLAGS} -
factory/configure.ac
rdec6c8 r05051f 90 90 , 91 91 enable_debugoutput=no) 92 93 AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug], [do NOT build the debugging version of the libraries]), 94 [if test "x$enableval" = "xyes"; then 95 ENABLE_DEBUG=yes 96 fi], ENABLE_DEBUG=no) 97 98 AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) 92 99 93 100 # -
factory/libfac/Makefile.am
rdec6c8 r05051f 1 noinst_LTLIBRARIES=libfac.la libfac_g.la 1 if WANT_DEBUG 2 LIB_G=libfac_g.la 3 else 4 LIB_G= 5 endif 6 7 noinst_LTLIBRARIES=libfac.la ${LIB_G} 2 8 3 9 CXXTEMPLFLAGS = ## -fno-implicit-templates -
findexec/Makefile.am
rdec6c8 r05051f 1 1 ACLOCAL_AMFLAGS = -I ../m4 2 2 3 libfindexec_LTLIBRARIES = libfindexec.la libfindexec_g.la 3 if WANT_DEBUG 4 LIB_G=libfindexec_g.la 5 else 6 LIB_G= 7 endif 8 9 libfindexec_LTLIBRARIES = libfindexec.la ${LIB_G} 4 10 libfindexecdir = $(libdir)/singular 5 11 -
findexec/configure.ac
rdec6c8 r05051f 58 58 SING_CHECK_PIPE 59 59 60 AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug], [do NOT build the debugging version of the libraries]), 61 [if test "x$enableval" = "xyes"; then 62 ENABLE_DEBUG=yes 63 fi], ENABLE_DEBUG=no) 64 65 AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) 66 60 67 61 68 # CFLAGS -
kernel/Makefile.am
rdec6c8 r05051f 12 12 CXXTEMPLFLAGS = ## -fno-implicit-templates 13 13 14 libkernel_LTLIBRARIES = libkernel.la libkernel_g.la 14 if WANT_DEBUG 15 LIB_G=libkernel_g.la 16 else 17 LIB_G= 18 endif 19 20 libkernel_LTLIBRARIES = libkernel.la ${LIB_G} 15 21 libkerneldir = $(libdir)/singular 16 22 -
kernel/test.cc
r2b43ac r05051f 154 154 #include "npolygon.h" 155 155 // #include "Number.h" // Too old? 156 #include "page.h"157 156 // #include "Poly.h" // Too old? 158 157 // #include "PowerSeries.h" // Too old? -
libpolys/coeffs/Makefile.am
rdec6c8 r05051f 4 4 AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/.. -I${srcdir} -I${top_srcdir}/../factory/include -I${top_builddir}/../factory/include ${FACTORY_CFLAGS} ${GMP_CFLAGS} ${NTL_CFLAGS} 5 5 6 lib_LTLIBRARIES = libcoeffs.la libcoeffs_g.la 6 if WANT_DEBUG 7 LIB_G=libcoeffs_g.la 8 else 9 LIB_G= 10 endif 11 12 lib_LTLIBRARIES = libcoeffs.la ${LIB_G} 7 13 libcoeffsdir = $(libdir)/singular 8 14 -
libpolys/configure.ac
rdec6c8 r05051f 115 115 fi 116 116 117 AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug], [do NOT build the debugging version of the libraries]), 118 [if test "x$enableval" = "xyes"; then 119 ENABLE_DEBUG=yes 120 fi], ENABLE_DEBUG=no) 121 122 AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) 123 117 124 # AC_SUBST(PREFIX) 118 125 AC_DEFINE_UNQUOTED(INSTALL_PREFIX,"$PREFIX",Prefix) -
libpolys/misc/Makefile.am
rdec6c8 r05051f 4 4 AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/.. 5 5 6 lib_LTLIBRARIES = libmisc.la libmisc_g.la 6 if WANT_DEBUG 7 LIB_G=libmisc_g.la 8 else 9 LIB_G= 10 endif 11 12 lib_LTLIBRARIES = libmisc.la ${LIB_G} 7 13 libmiscdir = $(libdir)/singular 8 14 -
libpolys/polys/Makefile.am
rdec6c8 r05051f 27 27 endif 28 28 29 libpolys_LTLIBRARIES = libpolys.la libpolys_g.la 29 if WANT_DEBUG 30 LIB_G=libpolys_g.la 31 MOD_G=p_Procs_FieldGeneral_g.la p_Procs_FieldIndep_g.la p_Procs_FieldQ_g.la p_Procs_FieldZp_g.la 32 else 33 LIB_G= 34 MOD_G= 35 endif 36 37 libpolys_LTLIBRARIES = libpolys.la ${LIB_G} 30 38 libpolysdir = $(libdir)/singular 31 39 … … 117 125 118 126 if ENABLE_P_PROCS_DYNAMIC 119 module_LTLIBRARIES=p_Procs_FieldGeneral.la p_Procs_FieldIndep.la p_Procs_FieldQ.la p_Procs_FieldZp.la \ 120 p_Procs_FieldGeneral_g.la p_Procs_FieldIndep_g.la p_Procs_FieldQ_g.la p_Procs_FieldZp_g.la 127 module_LTLIBRARIES=p_Procs_FieldGeneral.la p_Procs_FieldIndep.la p_Procs_FieldQ.la p_Procs_FieldZp.la ${MOD_G} 121 128 endif 122 129 -
libpolys/reporter/Makefile.am
rdec6c8 r05051f 4 4 AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/.. 5 5 6 lib_LTLIBRARIES = libreporter.la libreporter_g.la 6 if WANT_DEBUG 7 LIB_G=libreporter_g.la 8 else 9 LIB_G= 10 endif 11 12 lib_LTLIBRARIES = libreporter.la ${LIB_G} 7 13 libreporterdir = $(libdir)/singular 8 14 -
numeric/Makefile.am
rdec6c8 r05051f 1 libnumeric_LTLIBRARIES = libnumeric.la libnumeric_g.la 1 if WANT_DEBUG 2 LIB_G=libnumeric_g.la 3 else 4 LIB_G= 5 endif 6 7 libnumeric_LTLIBRARIES = libnumeric.la ${LIB_G} 2 8 libnumericdir = $(libdir)/singular 3 9 -
omalloc/Makefile.am
rdec6c8 r05051f 1 1 ACLOCAL_AMFLAGS = -I ../m4 2 2 3 lib_LTLIBRARIES=libomalloc.la libomalloc_g.la 3 if WANT_DEBUG 4 LIB_G=libomalloc_g.la 5 else 6 LIB_G= 7 endif 8 9 lib_LTLIBRARIES=libomalloc.la ${LIB_G} 4 10 5 11 libomalloc_includedir=$(includedir)/omalloc -
omalloc/configure.ac
rdec6c8 r05051f 24 24 dnl help for configure 25 25 dnl 26 AC_ARG_ENABLE(debug, AS_HELP_STRING([--disable-debug], [do NOT build the debugging version of the libraries]), 27 [if test "x$enableval" = "xyes"; then 28 ENABLE_DEBUG=yes 29 fi], ENABLE_DEBUG=no) 30 31 AM_CONDITIONAL(WANT_DEBUG, test x"${ENABLE_DEBUG}" == xyes) 32 26 33 AC_ARG_WITH( 27 34 external-config_h, -
xalloc/Makefile.am
rdec6c8 r05051f 1 1 ACLOCAL_AMFLAGS = -I ../m4 2 2 3 libomalloc_LTLIBRARIES=libomalloc.la libomalloc_g.la 3 if WANT_DEBUG 4 LIB_G=libomalloc_g.la 5 else 6 LIB_G= 7 endif 8 9 libomalloc_LTLIBRARIES=libomalloc.la ${LIB_G} 4 10 libomallocdir = $(libdir)/ 5 11
Note: See TracChangeset
for help on using the changeset viewer.