1/* This file is automatically generated.  DO NOT EDIT! */
2/* Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp  */
3/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4
5/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
6/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
7   This file is part of the GNU C Library.
8
9   The GNU C Library is free software; you can redistribute it and/or
10   modify it under the terms of the GNU Lesser General Public
11   License as published by the Free Software Foundation; either
12   version 2.1 of the License, or (at your option) any later version.
13
14   The GNU C Library is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17   Lesser General Public License for more details.
18
19   You should have received a copy of the GNU Lesser General Public
20   License along with the GNU C Library; if not, see
21   <https://www.gnu.org/licenses/>.  */
22
23#ifndef _GLOB_H
24#define _GLOB_H 1
25
26#ifndef __GLOB_GNULIB
27# include <sys/cdefs.h>
28#endif
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34#define __need_size_t
35#include <stddef.h>
36
37/* Bits set in the FLAGS argument to 'glob'.  */
38#define GLOB_ERR        (1 << 0)/* Return on read errors.  */
39#define GLOB_MARK       (1 << 1)/* Append a slash to each name.  */
40#define GLOB_NOSORT     (1 << 2)/* Don't sort the names.  */
41#define GLOB_DOOFFS     (1 << 3)/* Insert PGLOB->gl_offs NULLs.  */
42#define GLOB_NOCHECK    (1 << 4)/* If nothing matches, return the pattern.  */
43#define GLOB_APPEND     (1 << 5)/* Append to results of a previous call.  */
44#define GLOB_NOESCAPE   (1 << 6)/* Backslashes don't quote metacharacters.  */
45#define GLOB_PERIOD     (1 << 7)/* Leading '.' can be matched by metachars.  */
46
47#if !defined __USE_POSIX2 || 1
48# define GLOB_MAGCHAR    (1 << 8)/* Set in gl_flags if any metachars seen.  */
49# define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions.  */
50# define GLOB_BRACE      (1 << 10)/* Expand "{a,b}" to "a" "b".  */
51# define GLOB_NOMAGIC    (1 << 11)/* If no magic chars, return the pattern.  */
52# define GLOB_TILDE      (1 << 12)/* Expand ~user and ~ to home directories. */
53# define GLOB_ONLYDIR    (1 << 13)/* Match only directories.  */
54# define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error
55                                      if the user name is not available.  */
56# define __GLOB_FLAGS   (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS  \
57                         |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND     \
58                         |GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE     \
59                         |GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK)
60#else
61# define __GLOB_FLAGS   (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS  \
62                         |GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND     \
63                         |GLOB_PERIOD)
64#endif
65
66/* Error returns from 'glob'.  */
67#define GLOB_NOSPACE    1       /* Ran out of memory.  */
68#define GLOB_ABORTED    2       /* Read error.  */
69#define GLOB_NOMATCH    3       /* No matches found.  */
70#define GLOB_NOSYS      4       /* Not implemented.  */
71#if 1
72/* Previous versions of this file defined GLOB_ABEND instead of
73   GLOB_ABORTED.  Provide a compatibility definition here.  */
74# define GLOB_ABEND GLOB_ABORTED
75#endif
76
77/* Structure describing a globbing run.  */
78#if 1
79struct stat;
80#endif
81typedef struct
82  {
83    size_t gl_pathc;          /* Count of paths matched by the pattern.  */
84    char **gl_pathv;            /* List of matched pathnames.  */
85    size_t gl_offs;           /* Slots to reserve in 'gl_pathv'.  */
86    int gl_flags;               /* Set to FLAGS, maybe | GLOB_MAGCHAR.  */
87
88    /* If the GLOB_ALTDIRFUNC flag is set, the following functions
89       are used instead of the normal file access functions.  */
90    void (*gl_closedir) (void *);
91#if 1
92    struct dirent *(*gl_readdir) (void *);
93#else
94    void *(*gl_readdir) (void *);
95#endif
96    void *(*gl_opendir) (const char *);
97#if 1
98    int (*gl_lstat) (const char *restrict, struct stat *restrict);
99    int (*gl_stat) (const char *restrict, struct stat *restrict);
100#else
101    int (*gl_lstat) (const char *restrict, void *restrict);
102    int (*gl_stat) (const char *restrict, void *restrict);
103#endif
104  } glob_t;
105
106#if 0
107# if 1
108struct stat64;
109# endif
110typedef struct
111  {
112    size_t gl_pathc;
113    char **gl_pathv;
114    size_t gl_offs;
115    int gl_flags;
116
117    /* If the GLOB_ALTDIRFUNC flag is set, the following functions
118       are used instead of the normal file access functions.  */
119    void (*gl_closedir) (void *);
120# if 1
121    struct dirent64 *(*gl_readdir) (void *);
122# else
123    void *(*gl_readdir) (void *);
124# endif
125    void *(*gl_opendir) (const char *);
126# if 1
127    int (*gl_lstat) (const char *restrict, struct stat64 *restrict);
128    int (*gl_stat) (const char *restrict, struct stat64 *restrict);
129# else
130    int (*gl_lstat) (const char *restrict, void *restrict);
131    int (*gl_stat) (const char *restrict, void *restrict);
132# endif
133  } glob64_t;
134#endif
135
136/* Do glob searching for PATTERN, placing results in PGLOB.
137   The bits defined above may be set in FLAGS.
138   If a directory cannot be opened or read and ERRFUNC is not nil,
139   it is called with the pathname that caused the error, and the
140   'errno' value from the failing call; if it returns non-zero
141   'glob' returns GLOB_ABEND; if it returns zero, the error is ignored.
142   If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
143   Otherwise, 'glob' returns zero.  */
144#if !defined __USE_FILE_OFFSET64 || defined __GLOB_GNULIB
145extern int glob (const char *restrict __pattern, int __flags,
146                 int (*__errfunc) (const char *, int),
147                 glob_t *restrict __pglob) ;
148
149/* Free storage allocated in PGLOB by a previous 'glob' call.  */
150extern void globfree (glob_t *__pglob) ;
151#else
152# ifdef __USE_TIME_BITS64
153extern int __REDIRECT_NTHNL (glob, (const char *restrict __pattern,
154                                   int __flags,
155                                   int (*__errfunc) (const char *, int),
156                                   glob_t *restrict __pglob),
157                            __glob64_time64);
158
159extern void __REDIRECT_NTH (globfree, (glob_t *__pglob),
160                           __globfree64_time64);
161# else
162extern int __REDIRECT_NTHNL (glob, (const char *restrict __pattern,
163                                    int __flags,
164                                    int (*__errfunc) (const char *, int),
165                                    glob_t *restrict __pglob), glob64);
166
167extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64);
168# endif
169#endif
170
171#if 0
172# ifdef __USE_TIME_BITS64
173extern int __REDIRECT_NTHNL (glob64, (const char *restrict __pattern,
174                                     int __flags,
175                                     int (*__errfunc) (const char *, int),
176                                     glob64_t *restrict __pglob),
177                            __glob64_time64);
178
179extern void __REDIRECT_NTH (globfree64, (glob64_t *__pglob),
180                           __globfree64_time64);
181# else
182extern int glob64 (const char *restrict __pattern, int __flags,
183                   int (*__errfunc) (const char *, int),
184                   glob64_t *restrict __pglob) ;
185
186extern void globfree64 (glob64_t *__pglob) ;
187# endif
188#endif
189
190
191#if 1
192/* Return nonzero if PATTERN contains any metacharacters.
193   Metacharacters can be quoted with backslashes if QUOTE is nonzero.
194
195   This function is not part of the interface specified by POSIX.2
196   but several programs want to use it.  */
197extern int glob_pattern_p (const char *__pattern, int __quote) ;
198#endif
199
200#ifdef __cplusplus
201}
202#endif
203
204#endif /* glob.h  */
205