unistr, unigbrk: Use const-improved function macros for 30 functions.
[gnulib.git] / lib / mntent.in.h
blob62f2bf32a210097546e9ad2ebb513748501ddfe9
1 /* Provide a more complete mntent.h.
3 Copyright (C) 2024-2025 Free Software Foundation, Inc.
5 This file is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as
7 published by the Free Software Foundation; either version 2.1 of the
8 License, or (at your option) any later version.
10 This file is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 #if __GNUC__ >= 3
19 @PRAGMA_SYSTEM_HEADER@
20 #endif
21 @PRAGMA_COLUMNS@
23 #ifndef _@GUARD_PREFIX@_MNTENT_H
25 /* The include_next requires a split double-inclusion guard. */
26 #@INCLUDE_NEXT@ @NEXT_MNTENT_H@
28 #ifndef _@GUARD_PREFIX@_MNTENT_H
29 #define _@GUARD_PREFIX@_MNTENT_H
31 /* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
32 #if !_GL_CONFIG_H_INCLUDED
33 #error "Please include config.h first."
34 #endif
36 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
38 /* The definition of _GL_ARG_NONNULL is copied here. */
40 /* The definition of _GL_WARN_ON_USE is copied here. */
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
47 #if @GNULIB_HASMNTOPT@ && @HAVE_SETMNTENT@
48 /* Searches ME->mnt_opts for an option matching OPTION.
49 Returns the address of the substring, or null if none found. */
50 # if @REPLACE_HASMNTOPT@
51 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
52 # undef hasmntopt
53 # define hasmntopt rpl_hasmntopt
54 # endif
55 _GL_FUNCDECL_RPL (hasmntopt, char *,
56 (const struct mntent *me, const char *option),
57 _GL_ARG_NONNULL ((1, 2)));
58 _GL_CXXALIAS_RPL (hasmntopt, char *,
59 (const struct mntent *me, const char *option));
60 # else
61 # if !@HAVE_HASMNTOPT@
62 _GL_FUNCDECL_SYS (hasmntopt, char *,
63 (const struct mntent *me, const char *option),
64 _GL_ARG_NONNULL ((1, 2)));
65 # endif
66 _GL_CXXALIAS_SYS (hasmntopt, char *,
67 (const struct mntent *me, const char *option));
68 # endif
69 # if __GLIBC__ >= 2
70 _GL_CXXALIASWARN (hasmntopt);
71 # endif
72 #elif defined GNULIB_POSIXCHECK
73 # undef hasmntopt
74 # if HAVE_RAW_DECL_HASMNTOPT
75 _GL_WARN_ON_USE (hasmntopt, "hasmntopt is unportable - "
76 "use gnulib module hasmntopt for portability");
77 # endif
78 #endif
81 #ifdef __cplusplus
83 #endif
85 #endif /* _@GUARD_PREFIX@_MNTENT_H */
86 #endif /* _@GUARD_PREFIX@_MNTENT_H */