Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!phil@RICE.ARPA
From: phil@RICE.ARPA (William LeFebvre)
Newsgroups: net.unix-wizards
Subject: Bad choice of preprocessor variable name
Message-ID: <11428@brl-tgr.ARPA>
Date: Tue, 9-Jul-85 13:13:15 EDT
Article-I.D.: brl-tgr.11428
Posted: Tue Jul  9 13:13:15 1985
Date-Received: Thu, 11-Jul-85 20:39:14 EDT
Sender: news@brl-tgr.ARPA
Lines: 25

I really like the idea of predefined preprocessor names that identify
the architecture/os of the host, such as:  sun, vax, vax11c, etc....
But I just ran into a major, major problem.  Whoever decided that these
names should be lower case should be shot!

Consider the 4.2 networking code.  The common name to use for a "struct
sockaddr_in" (a structure that defines an Internet domain socket) is
"sin".  Look at the 4.2 IPC Primer.  Now, consider what the common name
would be for a Unix domain socket, or, more specifically, a "struct
sockaddr_un".  You guessed it:  "sun".

Aww, geez.  Now who would be THAT stupid, hmmmm???  Look at the source
for the 4.2 line printer spooling software, specifically: "lpd.c" and
"startdaemon.c" (the latter is used by "lpc").  Guess what?!?  "struct
sockaddr_un sun;"  Now try compiling that on a Sun!  It don't work too
well.

Why not "Sun" and "Vax" (or, better yet, "VAX")?  What ever happened to
putting all preprocessor names in upper case?

			William LeFebvre
			Department of Computer Science
			Rice University
			
                        or, for the daring: