🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Hugh Sasse Thu, 18 Apr 1996 00:00
macros handled wrong??
#6142
Author: Hugh Sasse
Date: Thu, 18 Apr 1996 00:00
27 lines
993 bytes
The following short program:
/* To see what happens about macros involving chars */
#include <stdio.h>

#define OUTPUT(a) putchar('a')

main(argc, argv)
   int argc;
   char *argv[];
{
   OUTPUT(x);
   return(0);
};

produces the output 
a
under gcc but 
x
under Sun's Solaris 1.1 (Sunos 4.1.3) cc compiler.
This means that /usr/include/ioccom.h will be interpreted differently
for these compilers, in particular the definition:
#define	_IOW(x,y,t)	(_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)

How should I proceed with this?

	Hugh
	hgs@dmu.ac.uk
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads