changeset 10052:cfa44ca8e7ba

Avoid compile failure on systems without ELOOP (like mingw). * lib/chdir-safer.c (ELOOP): Define if not already defined. Reported by Bruno Haible.
author Jim Meyering <meyering@redhat.com>
date Sat, 10 May 2008 14:50:12 +0200
parents fd29ccb01214
children 48bfcbd671a9
files ChangeLog lib/chdir-safer.c
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-10  Jim Meyering  <meyering@redhat.com>
+
+	Avoid compile failure on systems without ELOOP (like mingw).
+	* lib/chdir-safer.c (ELOOP): Define if not already defined.
+	Reported by Bruno Haible.
+
 2008-05-10  Bruno Haible  <bruno@clisp.org>
 
 	* lib/unilbrk/ulc-common.c: Include c-strcaseeq.h instead of streq.h.
--- a/lib/chdir-safer.c
+++ b/lib/chdir-safer.c
@@ -1,6 +1,6 @@
 /* much like chdir(2), but safer
 
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,6 +29,10 @@
 #include <sys/stat.h>
 #include "same-inode.h"
 
+#ifndef ELOOP
+# define ELOOP 0
+#endif
+
 /* Like chdir, but fail if DIR is a symbolic link to a directory (or
    similar funny business), or if DIR is not readable.  This avoids a
    minor race condition between when a directory is created or statted