Kaynağa Gözat

fix building under Solaris (sqlite.patch hunks are taken from upstream CVS and hence can be removed once 3.4.3 is released)

Ralf S. Engelschall 18 yıl önce
ebeveyn
işleme
7f0e0f8d99
2 değiştirilmiş dosya ile 80 ekleme ve 0 silme
  1. 79 0
      sqlite/sqlite.patch
  2. 1 0
      sqlite/sqlite.spec

+ 79 - 0
sqlite/sqlite.patch

@@ -56,3 +56,82 @@ Index: sqlite3.pc.in
 -Libs: -L${libdir} -lsqlite3
 +Libs: -L${libdir} -lsqlite3 @LIBS@
  Cflags: -I${includedir}
+Index: tool/lemon.c
+--- tool/lemon.c	30 Jul 2007 18:31:53 -0000	1.48
++++ tool/lemon.c	23 Aug 2007 02:50:56 -0000	1.49
+@@ -108,7 +108,7 @@
+ ** Principal data structures for the LEMON parser generator.
+ */
+ 
+-typedef enum {B_FALSE=0, B_TRUE} Boolean;
++typedef enum {LEMON_FALSE=0, LEMON_TRUE} Boolean;
+ 
+ /* Symbols (terminals and nonterminals) of the grammar are stored
+ ** in the following: */
+@@ -610,7 +610,7 @@
+   int progress;
+ 
+   for(i=0; i<lemp->nsymbol; i++){
+-    lemp->symbols[i]->lambda = B_FALSE;
++    lemp->symbols[i]->lambda = LEMON_FALSE;
+   }
+   for(i=lemp->nterminal; i<lemp->nsymbol; i++){
+     lemp->symbols[i]->firstset = SetNew();
+@@ -623,10 +623,10 @@
+       if( rp->lhs->lambda ) continue;
+       for(i=0; i<rp->nrhs; i++){
+          struct symbol *sp = rp->rhs[i];
+-         if( sp->type!=TERMINAL || sp->lambda==B_FALSE ) break;
++         if( sp->type!=TERMINAL || sp->lambda==LEMON_FALSE ) break;
+       }
+       if( i==rp->nrhs ){
+-        rp->lhs->lambda = B_TRUE;
++        rp->lhs->lambda = LEMON_TRUE;
+         progress = 1;
+       }
+     }
+@@ -649,10 +649,10 @@
+           }
+           break;
+ 	}else if( s1==s2 ){
+-          if( s1->lambda==B_FALSE ) break;
++          if( s1->lambda==LEMON_FALSE ) break;
+ 	}else{
+           progress += SetUnion(s1->firstset,s2->firstset);
+-          if( s2->lambda==B_FALSE ) break;
++          if( s2->lambda==LEMON_FALSE ) break;
+ 	}
+       }
+     }
+@@ -972,11 +972,11 @@
+   }
+ 
+   /* Report an error for each rule that can never be reduced. */
+-  for(rp=lemp->rule; rp; rp=rp->next) rp->canReduce = B_FALSE;
++  for(rp=lemp->rule; rp; rp=rp->next) rp->canReduce = LEMON_FALSE;
+   for(i=0; i<lemp->nstate; i++){
+     struct action *ap;
+     for(ap=lemp->sorted[i]->ap; ap; ap=ap->next){
+-      if( ap->type==REDUCE ) ap->x.rp->canReduce = B_TRUE;
++      if( ap->type==REDUCE ) ap->x.rp->canReduce = LEMON_TRUE;
+     }
+   }
+   for(rp=lemp->rule; rp; rp=rp->next){
+@@ -1210,7 +1210,7 @@
+             break;
+ 	  }else{
+             SetUnion(newcfp->fws,xsp->firstset);
+-            if( xsp->lambda==B_FALSE ) break;
++            if( xsp->lambda==LEMON_FALSE ) break;
+ 	  }
+ 	}
+         if( i==rp->nrhs ) Plink_add(&cfp->fplp,newcfp);
+@@ -4271,7 +4271,7 @@
+     sp->prec = -1;
+     sp->assoc = UNK;
+     sp->firstset = 0;
+-    sp->lambda = B_FALSE;
++    sp->lambda = LEMON_FALSE;
+     sp->destructor = 0;
+     sp->datatype = 0;
+     Symbol_insert(sp,sp->name);

+ 1 - 0
sqlite/sqlite.spec

@@ -121,6 +121,7 @@ AutoReqProv:  no
     export CFLAGS
     export LDFLAGS
     export LIBS
+    GREP="grep" \
     ./configure \
         --prefix=%{l_prefix} \
 %if "%{with_utf8}" == "yes"