pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/34846: tnftpd compile problem on solaris10/sparc



>Number:         34846
>Category:       pkg
>Synopsis:       tnftpd doesn't compile on solaris10/sparc
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 18 08:00:00 +0000 2006
>Originator:     Richard Doty
>Release:        tnftpd-20040810
>Organization:
        
>Environment:
        -bash-3.00$ uname -a
        SunOS brink.twig.com 5.10 Generic_118833-18 sun4u sparc 
SUNW,UltraSPARC-IIi-cEngine

Architecture: sparc
Machine: netra-t1
>Description:
        variable scoping issues in ftpcmd.y prevent clean linking
>How-To-Repeat:
        PATH=/usr/pkg/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/sbin:/usr/bin
        export PATH
        cd /usr/pkgsrc/net/tnftpd
        bmake
        ...
        ftpcmd.y: In function `yyparse':
        ftpcmd.y:300: error: `epsvall' undeclared (first use in this function)
        ftpcmd.y:300: error: (Each undeclared identifier is reported only once
        ftpcmd.y:300: error: for each function it appears in.)
        ftpcmd.y:544: error: `sitetab' undeclared (first use in this function)
        ftpcmd.y: At top level:
        ftpcmd.y:1303: warning: static declaration of 'check_write' follows 
non-static declaration
        ftpcmd.y:423: warning: previous implicit declaration of 'check_write' 
was here
        ftpcmd.y:1304: error: conflicting types for 'help'
        ftpcmd.y:544: error: previous implicit declaration of 'help' was here
        ftpcmd.y:1305: error: conflicting types for 'port_check'
        ftpcmd.y:258: error: previous implicit declaration of 'port_check' was 
here
        *** Error code 1

>Fix:
*** ftpcmd.y.orig       Wed Oct 18 07:33:54 2006
--- ftpcmd.y    Wed Oct 18 07:46:54 2006
***************
*** 124,129 ****
--- 124,132 ----
  char  cbuf[FTP_BUFLEN];
  char  *cmdp;
  char  *fromname;
+ static        int     check_write(const char *, int);
+ static        void    help(struct tab *, const char *);
+ static        void    port_check(const char *, int);
  
  %}
  
***************
*** 295,300 ****
--- 298,304 ----
  
        | LPSV check_login CRLF
                {
+                       extern int epsvall;
                        if ($2) {
                                if (CURCLASS_FLAGS_ISSET(passive)) {
                                        if (epsvall)
***************
*** 320,325 ****
--- 324,330 ----
  
        | EPSV check_login SP ALL CRLF
                {
+                       extern int epsvall;
                        if ($2) {
                                if (CURCLASS_FLAGS_ISSET(passive)) {
                                        reply(200,
***************
*** 541,546 ****
--- 546,552 ----
  
        | SITE SP HELP CRLF
                {
+                       extern struct tab sitetab[];
                        help(sitetab, NULL);
                }
  
***************
*** 561,566 ****
--- 567,573 ----
  
        | SITE SP HELP SP STRING CRLF
                {
+                       extern struct tab sitetab[];
                        help(sitetab, $5);
                        free($5);
                }
***************
*** 719,724 ****
--- 726,732 ----
        | HELP SP STRING CRLF
                {
                        char *cp = $3;
+                       extern struct tab sitetab[];
  
                        if (strncasecmp(cp, "SITE", 4) == 0) {
                                cp = $3 + 4;
***************
*** 1300,1308 ****
        { NULL,         0,      0,      0,      NULL }
  };
  
- static        int     check_write(const char *, int);
- static        void    help(struct tab *, const char *);
- static        void    port_check(const char *, int);
        int     yylex(void);
  
  extern int epsvall;
--- 1308,1313 ----
***************
*** 1481,1486 ****
--- 1486,1492 ----
        struct tab *p;
        int n;
        char c;
+       extern struct tab *sitetab;
  
        switch (state) {
  

>Unformatted:
        
        



Home | Main Index | Thread Index | Old Index