From: Tom Yu Date: Sat, 26 Aug 2000 01:30:04 +0000 (+0000) Subject: * ftpcmd.y: Fix up grammar so that single character token names X-Git-Tag: krb5-1.3-alpha1~1908 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4435955d741878cd8d8ae759b8598e953cfaefab;p=krb5.git * ftpcmd.y: Fix up grammar so that single character token names are no longer used; this was breaking the build using bison on HP/UX because some system headers declare structures with members having all-uppercase field names and bison puts the token name #define statements in front of the C declarations section in the output, causing them to be in force while those headers get #included. There doesn't seem to be much purpose in not just using character constants, anyway. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12632 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/gssftp/ftpd/ChangeLog b/src/appl/gssftp/ftpd/ChangeLog index 5bab683e9..971a4c458 100644 --- a/src/appl/gssftp/ftpd/ChangeLog +++ b/src/appl/gssftp/ftpd/ChangeLog @@ -1,3 +1,14 @@ +2000-08-25 Tom Yu + + * ftpcmd.y: Fix up grammar so that single character token names + are no longer used; this was breaking the build using bison on + HP/UX because some system headers declare structures with members + having all-uppercase field names and bison puts the token name + #define statements in front of the C declarations section in the + output, causing them to be in force while those headers get + #included. There doesn't seem to be much purpose in not just + using character constants, anyway. + Tue Aug 22 11:37:35 2000 Ezra Peisach * secure.h (myaddr): For secure data stream, pass the port number diff --git a/src/appl/gssftp/ftpd/ftpcmd.y b/src/appl/gssftp/ftpd/ftpcmd.y index bc252190e..197815a6f 100644 --- a/src/appl/gssftp/ftpd/ftpcmd.y +++ b/src/appl/gssftp/ftpd/ftpcmd.y @@ -172,9 +172,6 @@ struct tab sitetab[]; %union { int num; char *str; } %token - A B C E F I - L N P R S T - SP CRLF COMMA STRING NUMBER USER PASS ACCT REIN QUIT PORT @@ -353,7 +350,7 @@ cmd: USER SP username CRLF = { reply(202, "ALLO command ignored."); } - | ALLO SP NUMBER SP R SP NUMBER CRLF + | ALLO SP NUMBER SP 'R' SP NUMBER CRLF = { reply(202, "ALLO command ignored."); } @@ -698,103 +695,103 @@ host_port: NUMBER COMMA NUMBER COMMA NUMBER COMMA NUMBER COMMA } ; -form_code: N +form_code: 'N' = { $$ = FORM_N; } - | T + | 'T' = { $$ = FORM_T; } - | C + | 'C' = { $$ = FORM_C; } ; -prot_code: C +prot_code: 'C' = { $$ = PROT_C; } - | S + | 'S' = { $$ = PROT_S; } - | P + | 'P' = { $$ = PROT_P; } - | E + | 'E' = { $$ = PROT_E; } ; -type_code: A +type_code: 'A' = { cmd_type = TYPE_A; cmd_form = FORM_N; } - | A SP form_code + | 'A' SP form_code = { cmd_type = TYPE_A; cmd_form = $3; } - | E + | 'E' = { cmd_type = TYPE_E; cmd_form = FORM_N; } - | E SP form_code + | 'E' SP form_code = { cmd_type = TYPE_E; cmd_form = $3; } - | I + | 'I' = { cmd_type = TYPE_I; } - | L + | 'L' = { cmd_type = TYPE_L; cmd_bytesz = NBBY; } - | L SP byte_size + | 'L' SP byte_size = { cmd_type = TYPE_L; cmd_bytesz = $3; } /* this is for a bug in the BBN ftp */ - | L byte_size + | 'L' byte_size = { cmd_type = TYPE_L; cmd_bytesz = $2; } ; -struct_code: F +struct_code: 'F' = { $$ = STRU_F; } - | R + | 'R' = { $$ = STRU_R; } - | P + | 'P' = { $$ = STRU_P; } ; -mode_code: S +mode_code: 'S' = { $$ = MODE_S; } - | B + | 'B' = { $$ = MODE_B; } - | C + | 'C' = { $$ = MODE_C; } @@ -1349,51 +1346,51 @@ yylex() case 'A': case 'a': - return (A); + return ('A'); case 'B': case 'b': - return (B); + return ('B'); case 'C': case 'c': - return (C); + return ('C'); case 'E': case 'e': - return (E); + return ('E'); case 'F': case 'f': - return (F); + return ('F'); case 'I': case 'i': - return (I); + return ('I'); case 'L': case 'l': - return (L); + return ('L'); case 'N': case 'n': - return (N); + return ('N'); case 'P': case 'p': - return (P); + return ('P'); case 'R': case 'r': - return (R); + return ('R'); case 'S': case 's': - return (S); + return ('S'); case 'T': case 't': - return (T); + return ('T'); } break;