🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.d
Article #1296

Re: problems building abc

#1296
From: Sean Eric Fagan
Date: Tue, 01 Jan 1991 21:15
60 lines
2688 bytes
In article <SCHULTE.91Jan1200851@sun0.thp.uni-koeln.de> schulte@thp.uni-koeln.de (Martin Schulte) writes:
>>But the big question - which I have reported to the authors - is what is
>>the call to remove _really_ supposed to be?  Remove() deletes files.  It
>                                              ^^^^^^^^
>>doesn't look like that is what is wanted here at all.
>
>I only took a short look on the sources, why do you think it should remove
>files ?

kithrup 1> man S remove


     REMOVE(S)		       UNIX System V		     REMOVE(S)

     Name
	  remove - removes filename

     Syntax
	  #include <stdio.h>
	  int remove (filename)
	  const	char *filename;

     Description
	  The remove function causes the file whose name is the	string
	  pointed to by	filename to be no longer accessible by that
	  name.	 A subsequent attempt to open that file	using that
	  name will fail, unless it is created anew.  If the file is
	  open,	the behavior of	the remove function is
	  implementation-defined.

[etc.]

Seems to me that that pretty much indicates that remove() removes files,
don't you think?

Listen *very* carefully:  it doesn't matter *what* compiler you use, if you
have a function <x> in your standard library, and a program y which has its
own definition of a function <x>, then you are opening yourself up to
problems.  What are you going to do if some of the other routines from your
standard library use the function <x>, and the alien <x> has different
semantics?  (As it does in this case.)  For an example of how to totally
screw yourself, take any given program, and add this function:

	int
	write(int a, char *b, int c, void *d) {
		printf ("a = %d, b = %s, c = %d, d = %x\n",
			a, b, c, d);
		return -5;
	}

This is an example of "Name Space Pollution."  Both ANSI and POSIX have
addressed this, and have come up with a list of functions and variables that
are not to be touched by application programmers.  remove() is in both of
them.

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef@kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.
Technical Details
Message-ID: <1991Jan01.211524.18484@kithrup.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!pacbell.com!mips!zaphod.mps.ohio-state.edu!usc!csun!kithrup!sef
References: <SCHULTE.91Jan1200851@sun0.thp.uni-koeln.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!pacbell.com!mips!zaphod.mps.ohio-state.edu!usc!csun!kithrup!sef
From: sef@kithrup.COM (Sean Eric Fagan)
Newsgroups: comp.sources.d
Subject: Re: problems building abc
Message-ID: <1991Jan01.211524.18484@kithrup.COM>
Date: 1 Jan 91 21:15:24 GMT
References: <SCHULTE.91Jan1200851@sun0.thp.uni-koeln.de>
Organization: Kithrup Enterprises, Ltd.
Lines: 60