Blame SOURCES/sqlite-3.6.23-lemon-system-template.patch
|
|
bfaf7a |
diff -up sqlite-3.6.23/tool/lemon.c.system-template sqlite-3.6.23/tool/lemon.c
|
|
|
bfaf7a |
--- sqlite-3.6.23/tool/lemon.c.system-template 2010-03-10 16:40:35.000000000 +0200
|
|
|
bfaf7a |
+++ sqlite-3.6.23/tool/lemon.c 2010-03-10 16:40:39.000000000 +0200
|
|
|
bfaf7a |
@@ -3106,6 +3106,8 @@ PRIVATE FILE *tplt_open(struct lemon *le
|
|
|
bfaf7a |
tpltname = buf;
|
|
|
bfaf7a |
}else if( access(templatename,004)==0 ){
|
|
|
bfaf7a |
tpltname = templatename;
|
|
|
bfaf7a |
+ }else if( access("/usr/share/lemon/lempar.c", R_OK)==0){
|
|
|
bfaf7a |
+ tpltname = "/usr/share/lemon/lempar.c";
|
|
|
bfaf7a |
}else{
|
|
|
bfaf7a |
tpltname = pathsearch(lemp->argv0,templatename,0);
|
|
|
bfaf7a |
}
|
|
|
bfaf7a |
@@ -3117,7 +3119,7 @@ PRIVATE FILE *tplt_open(struct lemon *le
|
|
|
bfaf7a |
}
|
|
|
bfaf7a |
in = fopen(tpltname,"rb");
|
|
|
bfaf7a |
if( in==0 ){
|
|
|
bfaf7a |
- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename);
|
|
|
bfaf7a |
+ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname);
|
|
|
bfaf7a |
lemp->errorcnt++;
|
|
|
bfaf7a |
return 0;
|
|
|
bfaf7a |
}
|