Subject: wu-ftpd 2.4.2 beta 18 compiling on Digital Unix 4.0D with C2

From: "Zbigniew" <[email-masked]>
Date: Fri, 8 Jan 1999 16:37:23 -0600

Getting a rather frustrating compiliation error.

Running on Digital Unix 4.0D.
I have C2 Security enable.

I use to run build osf with the C2 modifications and that seemed work.
I am trying to run build dec and I get the following error:

Making ftpd.
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c ftpd.c
cc: Warning: ftpd.c, line 384: Strict ANSI C extension: The declaration of the "main" function has more than two parameters.
void
^
yacc  ftpcmd.y
mv  y.tab.c ftpcmd.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c ftpcmd.c
cc: Warning: ftpcmd.y, line 1245: In this statement, the expression "state=state==4?3:++state" modifies the variable "state" more than once without an intervening sequence point.  This behavior is undefined.
                state = state == OSTR ? STR2 : ++state;
----------------^
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c glob.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c logwtmp.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c popen.c
sh newvers.sh
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c vers.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c access.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c extensions.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c realpath.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c acl.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c private.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c authenticate.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c conversions.c
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c hostacc.c
cc: Warning: hostacc.c, line 302: In this statement, the referenced type of the pointer value "&(ha_arr[iHaInd])" is "unnamed struct", which is not compatible with "const char".
                bcopy(&(ha_arr[iHaInd]), &ptTmp, sizeof(hacc_t));
----------------^
cc: Warning: hostacc.c, line 302: In this statement, the referenced type of the pointer value "&ptTmp" is "unnamed struct", which is not compatible with "char".
                bcopy(&(ha_arr[iHaInd]), &ptTmp, sizeof(hacc_t));
----------------^
cc -std1 -O -I.. -I../support -Olimit 1000 -DVIRTUAL -L../support -s -x -c sigfix.c
Make: Don't know how to make syslog.o.  Stop.

Besides all the warnings, I'm stumped at why it doesn't know how to make syslog.o

Any ideas?

-Patrick

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 8 Jan 1999 17:58:35 -0500 (EST)

On Fri, 8 Jan 1999, Zbigniew wrote:

> cc: Warning: ftpd.c, line 384: Strict ANSI C extension: The
> declaration of the "main" function has more than two parameters.

Tell DU not to be so strict.  This is Unix, and Unix' main takes three
parameters.  Ignore this warning.

I believe I have a fix for this in the VR patches but I'd have to look.

> cc: Warning: ftpcmd.y, line 1245: In this statement, the expression
> "state=state==4?3:++state" modifies the variable "state" more than
> once without an intervening sequence point.  This behavior is
> undefined.

Good point.  Change this line to read:

  {
  int temp_state = (state == OSTR) ? STR2 : ++state;
  state = temp_state;
  }

Not seen this one before.  Either someone sent me a fix for the VR patches
or it's a new one.  I'll take a look at my tree and see if it needs fixing
there.

> cc: Warning: hostacc.c, line 302: In this statement, the referenced
> type of the pointer value "&(ha_arr[iHaInd])" is "unnamed struct",
> which is not compatible with "const char".

> cc: Warning: hostacc.c, line 302: In this statement, the referenced
> type of the pointer value "&ptTmp" is "unnamed struct", which is not
> compatible with "char".

I remember something about this for the VR patches.  Don't remember what
we did to fix it.  Probably a cast.  Best bet would be to grab my tarball
and see how it reads in the same areas.

> Make: Don't know how to make syslog.o.  Stop.

DU4 doesn't need support/syslog.c since the OS provides the function
(unlike, I guess, earlier versions of DEC Unix .. but I dunno).

If you grab the VR patched tarball a lot of these errors are fixed.
Note there were enough differences between DU3 and DU4 that the VR series
has its own config for DU4.

ISTM the VR series compiles and works fine on DU4, although I'll admit
there's been a number of patches to refine it and a couple more may be
needed.

-- 

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195