mathieu@ists.ists.ca (Pierre Mathieu) (01/31/89)
I've been trying to use function prototypes as described in the second edition of Kernighan & Ritchie. It appears though that the cc compiler on our HP9000 series 350 does not support these features. Can someone tell me if it is correct that the C compiler is a vanilla C conforming to the first edition of K&R? Should I abandon prototyping, especially if I want my programs to be easily portable? On a second note, I have unsuccessfully tried to figure out what the form of the tset command should be so that it will properly detect the terminal type when rlogin is used from another machine over an Ethernet link. I am using HP-UX 6.1 with release 6.0 of the Berkeley network utilities. (To narrow this down a bit, what device should I use with the -m option (ether, lan)? It works with ether on another of our HPs which hasn't yet been upgraded from HP-UX 5.5 (or so).) Does anyone know what this should be?
walter@hpclwjm.HP.COM (Walter Murray) (02/02/89)
> Should I abandon prototyping, especially if I want my > programs to be easily portable? No, don't abandon prototyping. Do something like this: #ifdef __STDC__ /* will be true in an ANSI compiler */ extern f (int i, double d); #else /* not ANSI */ extern f(); #endif Then, when you do compile with an ANSI compiler, you will get the benefits of function prototyping. Walter Murray ----------
mike@hpfcdc.HP.COM (Mike McNelly) (02/03/89)
> I've been trying to use function prototypes as described > in the second edition of Kernighan & Ritchie. > It appears though that the cc compiler on our HP9000 series > 350 does not support these features. Can someone tell me if it is correct > that the C compiler is a vanilla C conforming to the first edition > of K&R? Should I abandon prototyping, especially if I want my > programs to be easily portable? Function prototypes are not currently supported on Series 300 since they are a new feature of the ANSI proposal. We are working on an ANSI C compiler but it will not be released before the proposal becomes a standard. Because of release schedule differences you can expect to see ANSI C released on the Series 800 somewhat earlier than on Series 300 but rest assured that we consider ANSI C a high priority on both machines and it will be provided as soon as possible. Sorry, I have no knowledge of your tset problem. Mike McNelly mike%hpfcla@hplabs.hp.com
frank@zen.co.uk (Frank Wales) (02/03/89)
In article <356@ists.ists.ca> mathieu@ists.ists.ca (Pierre Mathieu) writes: >I've been trying to use function prototypes as described >in the second edition of Kernighan & Ritchie. > It appears though that the cc compiler on our HP9000 series >350 does not support these features. Can someone tell me if it is correct >that the C compiler is a vanilla C conforming to the first edition >of K&R? Should I abandon prototyping, especially if I want my >programs to be easily portable? According to a conversation with our tech support people a couple of days ago (we're interested in ANSI conformance too), function prototyping (and several other funky bits of ANSI C) is expected in HP-UX release level 7.0, tentatively due this autumn (this applies to both 300 and 800 series; yes, I know that the current 800 series release is 2.1 -- trust me). Maybe some HP persons with their noses closer to the grindstone can confirm or correct this. >On a second note, I have unsuccessfully tried to figure out what >the form of the tset command should be so that it will properly >detect the terminal type when rlogin is used from another machine >over an Ethernet link. I am using HP-UX 6.1 with release 6.0 of >the Berkeley network utilities. I'm not sure quite what you're after here; although tset can be provided with a list of possible login places, and can also gander in /etc/ttytype for fixed lines, rlogin doesn't come in that way; rlogin sessions are always associated with pseudo-terminals, such as the /dev/ttyp? chunk of devices. Consequently, therefore, your TERM variable (plus information like tty baud rate) gets propagated to the remote host so that it can communicate correctly with your terminal. This information is what tset should use when initialising your terminal during the login sequence, and at any other time during the remote session. Are you losing your TERM variable as part of /etc/profile, for instance (we had that problem for a time a while ago until we read the manuals more carefully)? Or have I missed the point of your question? -- Frank Wales, Systems Manager, [frank@zen.co.uk<->mcvax!zen.co.uk!frank] Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217
bd@hp-ses.SDE.HP.COM (Bob Desinger) (02/04/89)
Pierre Mathieu (mathieu@ists.ists.ca) asks: > On a second note, I have unsuccessfully tried to figure out what > the form of the tset command should be so that it will properly > detect the terminal type when rlogin is used from another machine > over an Ethernet link. To find out what's being used, put this line at the top of your .profile (or .login) file on the remote system: echo TERM == $TERM The value that gets printed is what you can use as an argument to tset's -m option. -- bd
shankar@hpclscu.HP.COM (Shankar Unni) (02/06/89)
> According to a conversation with our tech support people a couple of > days ago (we're interested in ANSI conformance too), function prototyping > (and several other funky bits of ANSI C) is expected in HP-UX > release level 7.0, tentatively due this autumn (this applies to both 300 > and 800 series; yes, I know that the current 800 series release is > 2.1 -- trust me). Maybe some HP persons with their noses closer to > the grindstone can confirm or correct this. HP-UX 7.0 on the series 800 will have a C compiler conforming to the Dec 1988 draft of the ANSI standard. On the s300, you won't have one on 7.0. It's planned for a later (fairly soon after) release, and it is (as Mike McNelly pointed out) a very high priority item on our list. --- Shankar.
marco@hpuamsa.UUCP (Marco Lesmeister) (02/06/89)
In article <356@ists.ists.ca> mathieu@ists.ists.ca (Pierre Mathieu) writes: >According to a conversation with our tech support people a couple of >days ago (we're interested in ANSI conformance too), function prototyping >(and several other funky bits of ANSI C) is expected in HP-UX >release level 7.0, tentatively due this autumn (this applies to both 300 >and 800 series; yes, I know that the current 800 series release is >2.1 -- trust me). Maybe some HP persons with their noses closer to >the grindstone can confirm or correct this. After release 2.1 for the 800, we are going to get 3.0 and probably a 3.5 or so, and after that we switch to release 7.0, so that the releases on the 300 and 800 systems have the same numbers. Also a lot of functionality of the 300 and 800 will be the same then (not everything, but a lot). >Frank Wales, Systems Manager, [frank@zen.co.uk<->mcvax!zen.co.uk!frank] >Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217 >---------- Regards, Marco Lesmeister |\ /| Hewlett Packard Coudenhoveflat 80 | \ / | Startbaan 16 1422 VK Uithoorn | \/ | 1187 XR Amstelveen Holland 02975-65878 | |____ Holland 020-5476911
scott@rdahp.UUCP (Scott Hammond) (02/08/89)
>> Assorted remarks on the absence of ANSI C
Just thought I'd mention, we are using GNU's gcc on our HP9000/300
and have been quite pleased with the results so far. The only
drawback is that the corresponding symbolic debugger isn't
available yet, though I've heard it is coming "soon".
--
Scott Hammond
R & D Associates, Marina del Rey, CA
Email: rdahp!scott, rdahp!scott@sm.unisys.com, scott@harris.cis.ksu.edu