[PATCH/libiberty] Add missing <sys/types.h> in unlink-if-ordinary.c
Mark Kettenis
mark.kettenis@xs4all.nl
Mon Mar 28 23:47:00 GMT 2005
Date: Sun, 27 Mar 2005 21:35:04 -0500
From: DJ Delorie <dj@redhat.com>
> <sys/types.h> is not an ISO C header file. But it is in POSIX.1.
> And it is available on every Unix system. Because of that, it is
> available on every Unix workalike system.
At least since 7th Edition Unix.
Right, but the machines that wouldn't have it, probably would have K&R
compilers anyway. We haven't had a problem using it unprotected so
far, and there's even less reason to worry about it now.
Could on of you do me the favor of checking this in on the gcc side?
Looks like I don't have write permission there anymore. Attached is
an updated patch that also updates the copyright year.
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* unlink-if-ordinary.c: Include <sys/types.h>.
Index: unlink-if-ordinary.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/unlink-if-ordinary.c,v
retrieving revision 1.2
diff -u -p -r1.2 unlink-if-ordinary.c
--- unlink-if-ordinary.c 28 Mar 2005 01:28:01 -0000 1.2
+++ unlink-if-ordinary.c 28 Mar 2005 14:42:16 -0000
@@ -1,5 +1,5 @@
/* unlink-if-ordinary.c - remove link to a file unless it is special
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of the libiberty library. This library is free
software; you can redistribute it and/or modify it under the
@@ -39,6 +39,8 @@ was made to unlink the file because it i
#include "config.h"
#endif
+#include <sys/types.h>
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
More information about the Binutils
mailing list