Xref: utzoo comp.sys.3b1:1265 comp.lang.perl:5188 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!dali.cs.montana.edu!milton!sumax!quick!cjsa!jeff From: jeff@cjsa.wa.com (Jeffery Small) Newsgroups: comp.sys.3b1,comp.lang.perl Subject: Problems compiling perl4.003 on the UNIXPC/3B1 Summary: #define conflict within /usr/include/sys/file.h Keywords: unixpc perl 3b1 sys/file.h Message-ID: <1991May3.183553.3605@cjsa.wa.com> Date: 3 May 91 18:35:53 GMT Organization: C. Jeffery Small and Associates Lines: 50 When compiling perl4.003 on the 3B1 using the stock compiler (Version 3.51m), I get the following messages for toke.o (and ttoke.o): ============================================================================== "toke.c", line 2333: warning: illegal member use: f_up "toke.c", line 2333: warning: illegal structure pointer combination, op = "toke.c", line 2345: warning: illegal member use: f_up "toke.c", line 2345: warning: illegal structure pointer combination, op = "toke.c", line 2453: warning: illegal member use: f_up "toke.c", line 2453: warning: illegal structure pointer combination, op = "toke.c", line 2464: warning: illegal member use: f_up "toke.c", line 2464: warning: illegal member use: f_type "toke.c", line 2517: warning: illegal member use: f_up "toke.c", line 2517: warning: illegal structure pointer combination, op = ============================================================================== This turns out to be a problem with a pre-existing #define in as follows: == /usr/include/sys/file.h =================================================== struct file { char f_flag; cnt_t f_count; /* reference count */ union { struct inode *f_uinode; /* pointer to inode structure */ struct file *f_unext; /* next entry in freelist */ } f_up; off_t f_offset; /* read/write character pointer */ }; #define f_inode f_up.f_uinode #define f_next f_up.f_unext ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ============================================================================== The perl structure formcmd (FCMD) contains a f_next member and this is being replaced by "f_up.unext" with obviously bad results. Although the program does compile, it is failing on the comp/decl.t and op/write.t tests - and I am assuming that these problem are caused by the above situation. Before I hack things up I wanted to see if there was a standard patch or fix for this condition? Have others gotten perl to compile on this platform without problems? Are you including sys/file.h in your config.sh? Thanks for any help you may be able to offer. -- Jeff Small C. Jeffery Small & Associates (206) 232-3338 uunet!nwnexus!cjsa!jeff 7000 E Mercer Way, Mercer Island, WA 98040