~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/pars/make_flex.sh

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# generate lexer files from flex input files.
 
4
 
 
5
set -eu
 
6
 
 
7
TMPFILE=_flex_tmp.c
 
8
OUTFILE=lexyy.c
 
9
 
 
10
flex -o $TMPFILE pars0lex.l
 
11
 
 
12
# AIX needs its includes done in a certain order, so include "univ.i" first
 
13
# to be sure we get it right.
 
14
echo '#include "univ.i"' > $OUTFILE
 
15
 
 
16
# flex assigns a pointer to an int in one place without a cast, resulting in
 
17
# a warning on Win64. this adds the cast.
 
18
sed -e 's/int offset = (yy_c_buf_p) - (yytext_ptr);/int offset = (int)((yy_c_buf_p) - (yytext_ptr));/;' < $TMPFILE >> $OUTFILE
 
19
 
 
20
rm $TMPFILE