Subject: access denied on AIX

From: [email-masked]
Date: Wed, 23 Jul 1997 14:24:42 -0500

Not sure if anyone has reported this or not but here goes...

I was trying to compile wuftp 2.4 on AIX 4.2.0 and got a yacc error when
it's trying to 'yacc ftpcmd.y'.  Come to find out that yacc works different
on AIX 4.2.x than AIX 3.2.5.  The errors are:

     yacc ftpcmd.y
     mv y.tab.c ftpcmd.c
     cc -   cc -O -DDEBUG -I.. -I../support -L../support -c ftpcmd.c

      "ftpcmd.y", line 371.18: 1506-045 (S) Undeclared identifier cmdtab.

      "ftpcmd.y", line 383.26: 1506-045 (S) Undeclared identifier sitetab.

      "ftpdcmd.y", line 1057.36: 1506-280 (W) Function argument assignment
between types "void(*) (int)" and "void(*) ()" is not        allowed.

      "ftpcmd.y", line 1519.1: 1506-050 (S) redeclaration of print_groups
differs from previous declaration on line 683 of             "ftpcmd.y".

      "ftpcmd.y", line 1519.1: 1506-050 (I) Return type "void" in
redeclaration is not compatible with the previous return type "int".
      make: 1254-004 The error code from the last command is 1.

 Stop.

Anyway, if I rearrange the declarations in ftpcmd.y, then the compile
completes successfully.  The lines with an '*' in front of it are the lines
I rearranged in ftpcmd.y - meaning these lines should be towards the top of
ftpcmd.y

     %union {
          char *String;
          int  Number;
     }

*    %{
*    extern jmp_buf errcatch;
*
*    void
*    print_groups();
*
*    #define CMD         0         /* begginning of command */
*    #define ARGS        1    /* expect miscellaneous arguments */
*    #define STR1        2    /* expect SP followed by STRING */
*    #define STR2        3    /* expect STRING */
*    #define OSTR        4    /* optional SP then STRING */
*    #define ZSTR1       5    /* SP then optional STRING */
*    #define ZSTR2       6    /* optional STRING after SP */
*    #define SITECMD     7    /* SITE command */
*    #define NSTR        8    /* Number followed by a string */
*    #define STR3        9    /* expect STRING followed by optional SP then
STRING */
*
*    struct tab {
*         char *name;
*         short     token;
*         short     state;
*         short     implemented;   /* 1 if command is implemented */
*         char *help;
*    };
*
*    struct tab cmdtab[ ] = {         /* In order defined in RFC 765 */
*         { "USER", USER, STR1, 1, "<sp> username: },
*         ...
*         ...
*         ...
*    };
*
*    struct tab sitetab [ ] = {"<sp>
*         { "UMASK", UMASK, ARGS, 1,     "[ <sp> umask ]" },
*         ...
*         ...
*         ...
*    };
*    %}
*
     %type <String>      STRING password pathname pathstring username
     %type <Number> NUMBER byte_size check_login form_code mode_code
octal_number
     %type <Number> struct_code

     %start    cmd_list

     %%