Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!zehntel!hplabs!sdcrdcf!sdcsvax!dcdwest!ittvax!decvax!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!root%bostonu.csnet@csnet-relay.arpa From: BostonU SysMgr Newsgroups: net.unix-wizards Subject: 4.2::SYSV compatability problem Message-ID: <7797@brl-tgr.ARPA> Date: Tue, 29-Jan-85 03:40:17 EST Article-I.D.: brl-tgr.7797 Posted: Tue Jan 29 03:40:17 1985 Date-Received: Sat, 2-Feb-85 13:51:42 EST Sender: news@brl-tgr.ARPA Organization: Ballistic Research Lab Lines: 36 Apologies in advance if this has been resolved in the past or I am being dense (although that means several people here got denseness problems): Under 4.2bsd if, say, you have a foo.h file with a line like: int thing ; and include it in a few .c files everything goes fine. In SYS5 (we are running SYS5.2 on a 3B5) you get 'multiply defined' errors. Ok, not unexpected. I have in the past just changed such a file to something like: #ifdef MAIN #define EXTERN #else #define EXTERN extern #endif EXTERN int thing ; And defined MAIN in only one place (like where main() occurs.) Problem: Suppose now you are faced with a program with about 40 .h files and probably hundreds of such indiscretions. WORSE: many many typedefs making something like 'g/int /s//EXTERN int /' (if I may speak ed in mixed company) for each C type not enough. What's a nurd to do? 'Fixing' SYS5 ld certainly comes to mind, (apparently berkeley already took this course once) any other suggestions welcome as it will be a few weeks before sources arrive and I got things to get on with.... Tx in advance. -Barry Shein, Boston University