1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* Substitute for and wrapper around <utime.h>.
3    Copyright (C) 2017-2021 Free Software Foundation, Inc.
4 
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3, or (at your option)
8    any later version.
9 
10    This program 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 General Public License for more details.
14 
15    You should have received a copy of the GNU General Public License
16    along with this program; if not, see <https://www.gnu.org/licenses/>.  */
17 
18 #ifndef _GL_UTIME_H
19 
20 #if __GNUC__ >= 3
21 #pragma GCC system_header
22 #endif
23 
24 
25 /* The include_next requires a split double-inclusion guard.  */
26 #if 1
27 # include_next <utime.h>
28 #endif
29 
30 #ifndef _GL_UTIME_H
31 #define _GL_UTIME_H
32 
33 #if !1
34 # include <sys/utime.h>
35 #endif
36 
37 #if 1
38 /* Get struct timespec.  */
39 # include <time.h>
40 #endif
41 
42 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
43 /* C++ compatible function declaration macros.
44    Copyright (C) 2010-2021 Free Software Foundation, Inc.
45 
46    This program is free software: you can redistribute it and/or modify it
47    under the terms of the GNU General Public License as published
48    by the Free Software Foundation; either version 3 of the License, or
49    (at your option) any later version.
50 
51    This program is distributed in the hope that it will be useful,
52    but WITHOUT ANY WARRANTY; without even the implied warranty of
53    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
54    General Public License for more details.
55 
56    You should have received a copy of the GNU General Public License
57    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
58 
59 #ifndef _GL_CXXDEFS_H
60 #define _GL_CXXDEFS_H
61 
62 /* Begin/end the GNULIB_NAMESPACE namespace.  */
63 #if defined __cplusplus && defined GNULIB_NAMESPACE
64 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
65 # define _GL_END_NAMESPACE }
66 #else
67 # define _GL_BEGIN_NAMESPACE
68 # define _GL_END_NAMESPACE
69 #endif
70 
71 /* The three most frequent use cases of these macros are:
72 
73    * For providing a substitute for a function that is missing on some
74      platforms, but is declared and works fine on the platforms on which
75      it exists:
76 
77        #if @GNULIB_FOO@
78        # if !@HAVE_FOO@
79        _GL_FUNCDECL_SYS (foo, ...);
80        # endif
81        _GL_CXXALIAS_SYS (foo, ...);
82        _GL_CXXALIASWARN (foo);
83        #elif defined GNULIB_POSIXCHECK
84        ...
85        #endif
86 
87    * For providing a replacement for a function that exists on all platforms,
88      but is broken/insufficient and needs to be replaced on some platforms:
89 
90        #if @GNULIB_FOO@
91        # if @REPLACE_FOO@
92        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
93        #   undef foo
94        #   define foo rpl_foo
95        #  endif
96        _GL_FUNCDECL_RPL (foo, ...);
97        _GL_CXXALIAS_RPL (foo, ...);
98        # else
99        _GL_CXXALIAS_SYS (foo, ...);
100        # endif
101        _GL_CXXALIASWARN (foo);
102        #elif defined GNULIB_POSIXCHECK
103        ...
104        #endif
105 
106    * For providing a replacement for a function that exists on some platforms
107      but is broken/insufficient and needs to be replaced on some of them and
108      is additionally either missing or undeclared on some other platforms:
109 
110        #if @GNULIB_FOO@
111        # if @REPLACE_FOO@
112        #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
113        #   undef foo
114        #   define foo rpl_foo
115        #  endif
116        _GL_FUNCDECL_RPL (foo, ...);
117        _GL_CXXALIAS_RPL (foo, ...);
118        # else
119        #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
120        _GL_FUNCDECL_SYS (foo, ...);
121        #  endif
122        _GL_CXXALIAS_SYS (foo, ...);
123        # endif
124        _GL_CXXALIASWARN (foo);
125        #elif defined GNULIB_POSIXCHECK
126        ...
127        #endif
128 */
129 
130 /* _GL_EXTERN_C declaration;
131    performs the declaration with C linkage.  */
132 #if defined __cplusplus
133 # define _GL_EXTERN_C extern "C"
134 #else
135 # define _GL_EXTERN_C extern
136 #endif
137 
138 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
139    declares a replacement function, named rpl_func, with the given prototype,
140    consisting of return type, parameters, and attributes.
141    Example:
142      _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
143                                   _GL_ARG_NONNULL ((1)));
144  */
145 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
146   _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
147 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
148   _GL_EXTERN_C rettype rpl_func parameters_and_attributes
149 
150 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
151    declares the system function, named func, with the given prototype,
152    consisting of return type, parameters, and attributes.
153    Example:
154      _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
155                                   _GL_ARG_NONNULL ((1)));
156  */
157 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
158   _GL_EXTERN_C rettype func parameters_and_attributes
159 
160 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
161    declares a C++ alias called GNULIB_NAMESPACE::func
162    that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
163    Example:
164      _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
165 
166    Wrapping rpl_func in an object with an inline conversion operator
167    avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
168    actually used in the program.  */
169 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
170   _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
171 #if defined __cplusplus && defined GNULIB_NAMESPACE
172 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
173     namespace GNULIB_NAMESPACE                                \
174     {                                                         \
175       static const struct _gl_ ## func ## _wrapper            \
176       {                                                       \
177         typedef rettype (*type) parameters;                   \
178                                                               \
179         inline operator type () const                         \
180         {                                                     \
181           return ::rpl_func;                                  \
182         }                                                     \
183       } func = {};                                            \
184     }                                                         \
185     _GL_EXTERN_C int _gl_cxxalias_dummy
186 #else
187 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
188     _GL_EXTERN_C int _gl_cxxalias_dummy
189 #endif
190 
191 /* _GL_CXXALIAS_MDA (func, rettype, parameters);
192    is to be used when func is a Microsoft deprecated alias, on native Windows.
193    It declares a C++ alias called GNULIB_NAMESPACE::func
194    that redirects to _func, if GNULIB_NAMESPACE is defined.
195    Example:
196      _GL_CXXALIAS_MDA (open, int, (const char *filename, int flags, ...));
197  */
198 #define _GL_CXXALIAS_MDA(func,rettype,parameters) \
199   _GL_CXXALIAS_RPL_1 (func, _##func, rettype, parameters)
200 
201 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
202    is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
203    except that the C function rpl_func may have a slightly different
204    declaration.  A cast is used to silence the "invalid conversion" error
205    that would otherwise occur.  */
206 #if defined __cplusplus && defined GNULIB_NAMESPACE
207 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
208     namespace GNULIB_NAMESPACE                                     \
209     {                                                              \
210       static const struct _gl_ ## func ## _wrapper                 \
211       {                                                            \
212         typedef rettype (*type) parameters;                        \
213                                                                    \
214         inline operator type () const                              \
215         {                                                          \
216           return reinterpret_cast<type>(::rpl_func);               \
217         }                                                          \
218       } func = {};                                                 \
219     }                                                              \
220     _GL_EXTERN_C int _gl_cxxalias_dummy
221 #else
222 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
223     _GL_EXTERN_C int _gl_cxxalias_dummy
224 #endif
225 
226 /* _GL_CXXALIAS_MDA_CAST (func, rettype, parameters);
227    is like  _GL_CXXALIAS_MDA (func, rettype, parameters);
228    except that the C function func may have a slightly different declaration.
229    A cast is used to silence the "invalid conversion" error that would
230    otherwise occur.  */
231 #define _GL_CXXALIAS_MDA_CAST(func,rettype,parameters) \
232   _GL_CXXALIAS_RPL_CAST_1 (func, _##func, rettype, parameters)
233 
234 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
235    declares a C++ alias called GNULIB_NAMESPACE::func
236    that redirects to the system provided function func, if GNULIB_NAMESPACE
237    is defined.
238    Example:
239      _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
240 
241    Wrapping func in an object with an inline conversion operator
242    avoids a reference to func unless GNULIB_NAMESPACE::func is
243    actually used in the program.  */
244 #if defined __cplusplus && defined GNULIB_NAMESPACE
245 # define _GL_CXXALIAS_SYS(func,rettype,parameters)            \
246     namespace GNULIB_NAMESPACE                                \
247     {                                                         \
248       static const struct _gl_ ## func ## _wrapper            \
249       {                                                       \
250         typedef rettype (*type) parameters;                   \
251                                                               \
252         inline operator type () const                         \
253         {                                                     \
254           return ::func;                                      \
255         }                                                     \
256       } func = {};                                            \
257     }                                                         \
258     _GL_EXTERN_C int _gl_cxxalias_dummy
259 #else
260 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
261     _GL_EXTERN_C int _gl_cxxalias_dummy
262 #endif
263 
264 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
265    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
266    except that the C function func may have a slightly different declaration.
267    A cast is used to silence the "invalid conversion" error that would
268    otherwise occur.  */
269 #if defined __cplusplus && defined GNULIB_NAMESPACE
270 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
271     namespace GNULIB_NAMESPACE                          \
272     {                                                   \
273       static const struct _gl_ ## func ## _wrapper      \
274       {                                                 \
275         typedef rettype (*type) parameters;             \
276                                                         \
277         inline operator type () const                   \
278         {                                               \
279           return reinterpret_cast<type>(::func);        \
280         }                                               \
281       } func = {};                                      \
282     }                                                   \
283     _GL_EXTERN_C int _gl_cxxalias_dummy
284 #else
285 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
286     _GL_EXTERN_C int _gl_cxxalias_dummy
287 #endif
288 
289 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
290    is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
291    except that the C function is picked among a set of overloaded functions,
292    namely the one with rettype2 and parameters2.  Two consecutive casts
293    are used to silence the "cannot find a match" and "invalid conversion"
294    errors that would otherwise occur.  */
295 #if defined __cplusplus && defined GNULIB_NAMESPACE
296   /* The outer cast must be a reinterpret_cast.
297      The inner cast: When the function is defined as a set of overloaded
298      functions, it works as a static_cast<>, choosing the designated variant.
299      When the function is defined as a single variant, it works as a
300      reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
301 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
302     namespace GNULIB_NAMESPACE                                                \
303     {                                                                         \
304       static const struct _gl_ ## func ## _wrapper                            \
305       {                                                                       \
306         typedef rettype (*type) parameters;                                   \
307                                                                               \
308         inline operator type () const                                         \
309         {                                                                     \
310           return reinterpret_cast<type>((rettype2 (*) parameters2)(::func));  \
311         }                                                                     \
312       } func = {};                                                            \
313     }                                                                         \
314     _GL_EXTERN_C int _gl_cxxalias_dummy
315 #else
316 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
317     _GL_EXTERN_C int _gl_cxxalias_dummy
318 #endif
319 
320 /* _GL_CXXALIASWARN (func);
321    causes a warning to be emitted when ::func is used but not when
322    GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
323    variants.  */
324 #if defined __cplusplus && defined GNULIB_NAMESPACE
325 # define _GL_CXXALIASWARN(func) \
326    _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
327 # define _GL_CXXALIASWARN_1(func,namespace) \
328    _GL_CXXALIASWARN_2 (func, namespace)
329 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
330    we enable the warning only when not optimizing.  */
331 # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
332 #  define _GL_CXXALIASWARN_2(func,namespace) \
333     _GL_WARN_ON_USE (func, \
334                      "The symbol ::" #func " refers to the system function. " \
335                      "Use " #namespace "::" #func " instead.")
336 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
337 #  define _GL_CXXALIASWARN_2(func,namespace) \
338      extern __typeof__ (func) func
339 # else
340 #  define _GL_CXXALIASWARN_2(func,namespace) \
341      _GL_EXTERN_C int _gl_cxxalias_dummy
342 # endif
343 #else
344 # define _GL_CXXALIASWARN(func) \
345     _GL_EXTERN_C int _gl_cxxalias_dummy
346 #endif
347 
348 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
349    causes a warning to be emitted when the given overloaded variant of ::func
350    is used but not when GNULIB_NAMESPACE::func is used.  */
351 #if defined __cplusplus && defined GNULIB_NAMESPACE
352 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
353    _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
354                         GNULIB_NAMESPACE)
355 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
356    _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
357 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
358    we enable the warning only when not optimizing.  */
359 # if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
360 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
361     _GL_WARN_ON_USE_CXX (func, rettype, rettype, parameters_and_attributes, \
362                          "The symbol ::" #func " refers to the system function. " \
363                          "Use " #namespace "::" #func " instead.")
364 # else
365 #  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
366      _GL_EXTERN_C int _gl_cxxalias_dummy
367 # endif
368 #else
369 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
370     _GL_EXTERN_C int _gl_cxxalias_dummy
371 #endif
372 
373 #endif /* _GL_CXXDEFS_H */
374 
375 /* The definition of _GL_ARG_NONNULL is copied here.  */
376 /* A C macro for declaring that specific arguments must not be NULL.
377    Copyright (C) 2009-2021 Free Software Foundation, Inc.
378 
379    This program is free software: you can redistribute it and/or modify it
380    under the terms of the GNU General Public License as published
381    by the Free Software Foundation; either version 3 of the License, or
382    (at your option) any later version.
383 
384    This program is distributed in the hope that it will be useful,
385    but WITHOUT ANY WARRANTY; without even the implied warranty of
386    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
387    General Public License for more details.
388 
389    You should have received a copy of the GNU General Public License
390    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
391 
392 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
393    that the values passed as arguments n, ..., m must be non-NULL pointers.
394    n = 1 stands for the first argument, n = 2 for the second argument etc.  */
395 #ifndef _GL_ARG_NONNULL
396 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || defined __clang__
397 #  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
398 # else
399 #  define _GL_ARG_NONNULL(params)
400 # endif
401 #endif
402 
403 /* The definition of _GL_WARN_ON_USE is copied here.  */
404 /* A C macro for emitting warnings if a function is used.
405    Copyright (C) 2010-2021 Free Software Foundation, Inc.
406 
407    This program is free software: you can redistribute it and/or modify it
408    under the terms of the GNU General Public License as published
409    by the Free Software Foundation; either version 3 of the License, or
410    (at your option) any later version.
411 
412    This program is distributed in the hope that it will be useful,
413    but WITHOUT ANY WARRANTY; without even the implied warranty of
414    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
415    General Public License for more details.
416 
417    You should have received a copy of the GNU General Public License
418    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
419 
420 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
421    for FUNCTION which will then trigger a compiler warning containing
422    the text of "literal string" anywhere that function is called, if
423    supported by the compiler.  If the compiler does not support this
424    feature, the macro expands to an unused extern declaration.
425 
426    _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
427    attribute used in _GL_WARN_ON_USE.  If the compiler does not support
428    this feature, it expands to empty.
429 
430    These macros are useful for marking a function as a potential
431    portability trap, with the intent that "literal string" include
432    instructions on the replacement function that should be used
433    instead.
434    _GL_WARN_ON_USE is for functions with 'extern' linkage.
435    _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
436    linkage.
437 
438    However, one of the reasons that a function is a portability trap is
439    if it has the wrong signature.  Declaring FUNCTION with a different
440    signature in C is a compilation error, so this macro must use the
441    same type as any existing declaration so that programs that avoid
442    the problematic FUNCTION do not fail to compile merely because they
443    included a header that poisoned the function.  But this implies that
444    _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
445    have a declaration.  Use of this macro implies that there must not
446    be any other macro hiding the declaration of FUNCTION; but
447    undefining FUNCTION first is part of the poisoning process anyway
448    (although for symbols that are provided only via a macro, the result
449    is a compilation error rather than a warning containing
450    "literal string").  Also note that in C++, it is only safe to use if
451    FUNCTION has no overloads.
452 
453    For an example, it is possible to poison 'getline' by:
454    - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
455      [getline]) in configure.ac, which potentially defines
456      HAVE_RAW_DECL_GETLINE
457    - adding this code to a header that wraps the system <stdio.h>:
458      #undef getline
459      #if HAVE_RAW_DECL_GETLINE
460      _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
461        "not universally present; use the gnulib module getline");
462      #endif
463 
464    It is not possible to directly poison global variables.  But it is
465    possible to write a wrapper accessor function, and poison that
466    (less common usage, like &environ, will cause a compilation error
467    rather than issue the nice warning, but the end result of informing
468    the developer about their portability problem is still achieved):
469      #if HAVE_RAW_DECL_ENVIRON
470      static char ***
471      rpl_environ (void) { return &environ; }
472      _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
473      # undef environ
474      # define environ (*rpl_environ ())
475      #endif
476    or better (avoiding contradictory use of 'static' and 'extern'):
477      #if HAVE_RAW_DECL_ENVIRON
478      static char ***
479      _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
480      rpl_environ (void) { return &environ; }
481      # undef environ
482      # define environ (*rpl_environ ())
483      #endif
484    */
485 #ifndef _GL_WARN_ON_USE
486 
487 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
488 /* A compiler attribute is available in gcc versions 4.3.0 and later.  */
489 #  define _GL_WARN_ON_USE(function, message) \
490 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
491 #  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
492   __attribute__ ((__warning__ (message)))
493 # elif __clang_major__ >= 4
494 /* Another compiler attribute is available in clang.  */
495 #  define _GL_WARN_ON_USE(function, message) \
496 extern __typeof__ (function) function \
497   __attribute__ ((__diagnose_if__ (1, message, "warning")))
498 #  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
499   __attribute__ ((__diagnose_if__ (1, message, "warning")))
500 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
501 /* Verify the existence of the function.  */
502 #  define _GL_WARN_ON_USE(function, message) \
503 extern __typeof__ (function) function
504 #  define _GL_WARN_ON_USE_ATTRIBUTE(message)
505 # else /* Unsupported.  */
506 #  define _GL_WARN_ON_USE(function, message) \
507 _GL_WARN_EXTERN_C int _gl_warn_on_use
508 #  define _GL_WARN_ON_USE_ATTRIBUTE(message)
509 # endif
510 #endif
511 
512 /* _GL_WARN_ON_USE_CXX (function, rettype_gcc, rettype_clang, parameters_and_attributes, "message")
513    is like _GL_WARN_ON_USE (function, "message"), except that in C++ mode the
514    function is declared with the given prototype, consisting of return type,
515    parameters, and attributes.
516    This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
517    not work in this case.  */
518 #ifndef _GL_WARN_ON_USE_CXX
519 # if !defined __cplusplus
520 #  define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
521      _GL_WARN_ON_USE (function, msg)
522 # else
523 #  if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
524 /* A compiler attribute is available in gcc versions 4.3.0 and later.  */
525 #   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
526 extern rettype_gcc function parameters_and_attributes \
527   __attribute__ ((__warning__ (msg)))
528 #  elif __clang_major__ >= 4
529 /* Another compiler attribute is available in clang.  */
530 #   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
531 extern rettype_clang function parameters_and_attributes \
532   __attribute__ ((__diagnose_if__ (1, msg, "warning")))
533 #  elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
534 /* Verify the existence of the function.  */
535 #   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
536 extern rettype_gcc function parameters_and_attributes
537 #  else /* Unsupported.  */
538 #   define _GL_WARN_ON_USE_CXX(function,rettype_gcc,rettype_clang,parameters_and_attributes,msg) \
539 _GL_WARN_EXTERN_C int _gl_warn_on_use
540 #  endif
541 # endif
542 #endif
543 
544 /* _GL_WARN_EXTERN_C declaration;
545    performs the declaration with C linkage.  */
546 #ifndef _GL_WARN_EXTERN_C
547 # if defined __cplusplus
548 #  define _GL_WARN_EXTERN_C extern "C"
549 # else
550 #  define _GL_WARN_EXTERN_C extern
551 # endif
552 #endif
553 
554 
555 #if defined _WIN32 && ! defined __CYGWIN__
556 
557 /* Define 'struct utimbuf' as an alias of 'struct _utimbuf'
558    (or possibly, if present, 'struct __utimbuf64').  */
559 # define utimbuf _utimbuf
560 
561 #endif
562 
563 
564 #if 1
565 # if 0
566 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
567 #   define utime rpl_utime
568 #  endif
569 _GL_FUNCDECL_RPL (utime, int, (const char *filename, const struct utimbuf *ts)
570                               _GL_ARG_NONNULL ((1)));
571 _GL_CXXALIAS_RPL (utime, int, (const char *filename, const struct utimbuf *ts));
572 # elif defined _WIN32 && !defined __CYGWIN__
573 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
574 #   undef utime
575 #   define utime _utime
576 #  endif
577 _GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts));
578 # else
579 #  if !1
580 _GL_FUNCDECL_SYS (utime, int, (const char *filename, const struct utimbuf *ts)
581                               _GL_ARG_NONNULL ((1)));
582 #  endif
583 _GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts));
584 # endif
585 # if __GLIBC__ >= 2
586 _GL_CXXALIASWARN (utime);
587 # endif
588 #elif defined GNULIB_POSIXCHECK
589 # undef utime
590 # if HAVE_RAW_DECL_UTIME
591 _GL_WARN_ON_USE (utime,
592                  "utime is unportable - "
593                  "use gnulib module canonicalize-lgpl for portability");
594 # endif
595 #elif 1
596 /* On native Windows, map 'utime' to '_utime', so that -loldnames is not
597    required.  In C++ with GNULIB_NAMESPACE, avoid differences between
598    platforms by defining GNULIB_NAMESPACE::utime always.  */
599 # if defined _WIN32 && !defined __CYGWIN__
600 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
601 #   undef utime
602 #   define utime _utime
603 #  endif
604 _GL_CXXALIAS_MDA (utime, int, (const char *filename, const struct utimbuf *ts));
605 # else
606 _GL_CXXALIAS_SYS (utime, int, (const char *filename, const struct utimbuf *ts));
607 # endif
608 # if __GLIBC__ >= 2
609 _GL_CXXALIASWARN (utime);
610 # endif
611 #endif
612 
613 #if 1
614 extern int _gl_utimens_windows (const char *filename, struct timespec ts[2]);
615 #endif
616 
617 
618 #endif /* _GL_UTIME_H */
619 #endif /* _GL_UTIME_H */
620