ldexpl; Update regarding AIX.
[gnulib.git] / lib / glob.in.h
1 /* glob.h -- Find a path matching a pattern.
2
3    Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
4
5    Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2, or (at your option)
10    any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software Foundation,
19    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
20
21 #ifndef _GL_GLOB_H
22 #define _GL_GLOB_H
23
24 #if @HAVE_SYS_CDEFS_H@
25 # include <sys/cdefs.h>
26 #endif
27
28 #include <stddef.h>
29
30 /* On some systems, such as AIX 5.1, <sys/stat.h> does a "#define stat stat64".
31    Make sure this definition is seen before glob-libc.h defines types that
32    rely on 'struct stat'.  */
33 #include <sys/stat.h>
34
35 #ifndef __BEGIN_DECLS
36 # ifdef __cplusplus
37 #  define __BEGIN_DECLS  extern "C" {
38 #  define __END_DECLS    }
39 # else
40 #  define __BEGIN_DECLS
41 #  define __END_DECLS
42 # endif
43 #endif
44 #ifndef __THROW
45 # define __THROW
46 #endif
47
48 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
49
50 /* The definition of _GL_ARG_NONNULL is copied here.  */
51
52 /* The definition of _GL_WARN_ON_USE is copied here.  */
53
54 #ifndef __size_t
55 # define __size_t       size_t
56 #endif
57 #ifndef __USE_GNU
58 # define __USE_GNU    1
59 #endif
60
61
62 #define glob rpl_glob
63 #define globfree rpl_globfree
64 #define glob_pattern_p rpl_glob_pattern_p
65
66 #define __GLOB_GNULIB 1
67
68 /* Now the standard GNU C Library header should work.  */
69 #include "glob-libc.h"
70
71 __BEGIN_DECLS
72 typedef int (*_gl_glob_errfunc_fn) (const char *, int);
73 __END_DECLS
74
75 #if defined __cplusplus && defined GNULIB_NAMESPACE
76 # undef glob
77 # undef globfree
78 # undef glob_pattern_p
79 _GL_CXXALIAS_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags,
80                               _gl_glob_errfunc_fn __errfunc,
81                               glob_t *_Restrict_ __pglob));
82 _GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
83 _GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
84 # if 0  /* The C function name is rpl_glob, not glob.  */
85 _GL_CXXALIASWARN (glob);
86 _GL_CXXALIASWARN (globfree);
87 _GL_CXXALIASWARN (glob_pattern_p);
88 # endif
89 #endif
90
91 #endif /* _GL_GLOB_H */