🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2354

gcc 1.30 and ioctl

#2354
From: Joe Wells
Date: Fri, 24 Feb 1989 21:47
36 lines
1221 bytes
The following happened to me on a Encore Multimax running UMAX 4.2.
When compiled with gcc, this ioctl call has different results than
when compiled with the system's cc (Greenhills CC).  Can anyone
explain?

% gcc -v
gcc version 1.30
% cc -v
CC release: 02.01.r003
[barfing on no arguments deleted]
% cat check.c
#include <sys/ioctl.h>
main ()
{
  int pgrp, rc;
  extern int errno;
  errno = 0;
  rc = ioctl (2, TIOCGPGRP, (char *) &pgrp);
  perror ("ioctl TIOCGPGRP");
  printf ("rc: %d, errno: %d, pgrp: %d\n", rc, errno, pgrp);
}
% cc check.c
% a.out
ioctl TIOCGPGRP: Unknown error 0
rc: 0, errno: 0, pgrp: 27553
% gcc check.c
% a.out
ioctl TIOCGPGRP: Not a typewriter
rc: -1, errno: 25, pgrp: 1024

Weird, huh?

--
Joe Wells
INTERNET: jbw%bucsf.bu.edu@bu-it.bu.edu    IP: [128.197.2.9]
UUCP: ...!harvard!bu-cs!bucsf!jbw
Technical Details
Message-ID: <8902242147.AA29500@bucsf>
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!BU-IT.BU.EDU!jbw%bucsf.BU.EDU

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!BU-IT.BU.EDU!jbw%bucsf.BU.EDU
From: jbw%bucsf.BU.EDU@BU-IT.BU.EDU (Joe Wells)
Newsgroups: gnu.gcc.bug
Subject: gcc 1.30 and ioctl
Message-ID: <8902242147.AA29500@bucsf>
Date: 24 Feb 89 21:47:15 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36