From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,6f19a940ee5612a1,start X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,6f19a940ee5612a1,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-12-15 10:39:48 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!news.sprintlink.net!news.umkc.edu!axp2.umkc.edu!mcdonald From: mcdonald@axp2.umkc.edu (Gary Lee McDonald) Newsgroups: comp.sys.dec,comp.os.vms Subject: Difference VAX C DIR/ALL/ DEC C ? Date: 15 Dec 94 12:39:48 CST Organization: University of Missouri - Kansas City Message-ID: <1994Dec15.123948@axp2.umkc.edu> NNTP-Posting-Host: axp2.umkc.edu Xref: nntp.gmd.de comp.sys.dec:20490 comp.os.vms:61176 Greetings, In trying to port a program from VAX to AXP I ran into the following problem. ================== /* test.c */ #include #include #include #include /* some systems require instead */ #include main() /* VMS version */ { char *dummy; char term[81]; longname(dummy, term); printf("Terminal = %s\n", term); return(1); } ================= This snippet of code works as expected on the VAX (VAX C v.3.2-044), but doesn't on AXP (DEC C V.4.0-000). Both systems on OpenVMS v.6.1. I do very little C, so I may be missing something simple. :-) No options on either compile; no options on link on AXP; on VAX it's $ link test,opt/opt, where opt.opt contains sys$share:vaxcrtl.exe/share. Also the routine was originally named 'setup', which worked on VAX, but 'protection violation' on AXP. Changing 'setup' to 'main' fixed that. Thanks for any insight! UMKC GaryM. 5100 Rockhill Road Univ. of Mo. at K.C. Cockefair Hall (816) 235-1183 Room 2, Gary Lee McDonald MCDONALD @ CCTR.UMKC.EDU Kansas City, Mo. 64110 POSTMASTER @ CCTR.UMKC.EDU