Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: mcdonald@axp2.umkc.edu (Gary Lee McDonald)
Subject: Difference VAX C DIR/ALL/ DEC C ?
Date: 15 Dec 94 12:39:48 CST	[thread overview]
Message-ID: <1994Dec15.123948@axp2.umkc.edu> (raw)

Greetings,

  In trying to port a program from VAX to AXP I ran into the following problem.
==================
        /* test.c */
#include <stdio.h>
#include <ctype.h>
#include <signal.h>
#include <string.h>	/* some systems require <strings.h> instead */
#include <curses.h>

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


             reply	other threads:[~1994-12-15 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-12-15 18:39 Gary Lee McDonald [this message]
1994-12-16 11:26 ` Difference VAX C DIR/ALL/ DEC C ? Core Technology Group - Run Time Libraries
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox