SCO remove() and unlink()
Tim Rice
tim at multitalents.net
Tue Dec 19 05:39:55 EST 2000
On Mon, 18 Dec 2000, Gert Doering wrote:
> Hi,
>
> On Mon, Dec 18, 2000 at 04:49:12AM +0100, Kevin Steves wrote:
> > There was a patch merged in on 9/29 that changed remove() calls to
> > unlink():
> >
> > - (djm) Merged big SCO portability patch from Tim Rice
> > <tim at multitalents.net>
> >
> > Does SCO's libc not include remove()? Note that sftp-server.c is
> > currently using remove. The reason I ask is I'd like to keep the
> > portable tree as close to openbsd as possible, and if we need remove()
> > for SCO we should add a bsd-remove.c or something.
>
> Hmmm, well, unlink() is the "more standard" function, so I'd vote for
> using unlink() everywhere (even in the OpenBSD tree).
>
> OTOH, we don't need a bsd-remove.c - just add something like
>
> #ifndef HAVE_REMOVE
> # define remove(a) unlink(a)
> #endif
>
> to "defines.h" would be sufficient. Actually, this is exactly what my SCO
> (OpenServer 3.0) does in <stdio.h> - which means that programs using
> remove() have to include <stdio.h> for it to work.
Now I remember,
-----<stdio.h>------
#if __STDC__
#define remove(name) (__unlink(name))
#else
#define remove(name) (unlink(name))
#endif /* __STDC__ */
--------------------
This is what caused me the problems. I was using gcc and it
had trouble with __unlink()
Perhaps my gcc (2.7.2.1) is slightly broken.
>
> gert
>
>
--
Tim Rice Multitalents (707) 887-1469
tim at multitalents.net
More information about the openssh-unix-dev
mailing list