summaryrefslogtreecommitdiffstats
path: root/tools/gnulib/patches/120-unmangle-darwin-fts-h.patch
blob: 70f54136df12a7e6ebd5f457e6c65a08a02e110f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -50,7 +50,7 @@
 static char sccsid[] = "@(#)fts.c       8.6 (Berkeley) 8/14/94";
 #endif
 
-#include "fts_.h"
+#include "fts.h"
 
 #if HAVE_SYS_PARAM_H || defined _LIBC
 # include <sys/param.h>
--- a/lib/fts.in.h
+++ b/lib/fts.in.h
@@ -48,6 +48,11 @@
 
 #ifndef _FTS_H
 # define _FTS_H 1
+# ifdef __APPLE__
+#  ifndef _FTS_H_
+#   define _FTS_H_ 1
+#  endif
+# endif
 
 /* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_NODISCARD.  */
 # if !_LIBC && !_GL_CONFIG_H_INCLUDED
--- a/modules/fts
+++ b/modules/fts
@@ -48,21 +48,21 @@ dnl NetBSD versions have bugs and/or unn
 gl_CONDITIONAL([GL_COND_OBJ_FTS], [true])
 
 Makefile.am:
-BUILT_SOURCES += fts_.h
+BUILT_SOURCES += fts.h
 if GL_COND_OBJ_FTS
 lib_SOURCES += fts.c
 endif
 
-fts_.h: fts.in.h
+fts.h: fts.in.h
 @NMD@	$(AM_V_GEN)$(MKDIR_P) '%reldir%'
 	$(gl_V_at)$(SED_HEADER_STDOUT) \
 	      -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
 	      $(srcdir)/fts.in.h > $@-t
 	$(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += fts_.h fts_.h-t
+MOSTLYCLEANFILES += fts.h fts.h-t
 
 Include:
-"fts_.h"
+"fts.h"
 
 License:
 GPL