~ubuntu-branches/ubuntu/precise/wget/precise-proposed

« back to all changes in this revision

Viewing changes to lib/sys_stat.in.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2011-10-19 00:00:09 UTC
  • mfrom: (2.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20111019000009-8p33w3wz4b1rdri0
Tags: 1.13-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
  - Depend on libssl-dev 0.9.8k-7ubuntu4 (LP: #503339)
* Dropped changes, superseded in Debian:
  - Keep build dependencies in main:
    + debian/control: remove info2man build-dep
    + debian/patches/series: disable wget-infopod_generated_manpage
  - Mark wget Multi-Arch: foreign, so packages that aren't of the same arch
    can depend on it.
* Pass --with-ssl=openssl; we don't want to use gnutls, there's no udeb for
  it.
* Add a second build pass for the udeb, so we can build without libidn.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- buffer-read-only: t -*- vi: set ro: */
 
2
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
 
3
/* Provide a more complete sys/stat header file.
 
4
   Copyright (C) 2005-2011 Free Software Foundation, Inc.
 
5
 
 
6
   This program is free software; you can redistribute it and/or modify
 
7
   it under the terms of the GNU General Public License as published by
 
8
   the Free Software Foundation; either version 3, or (at your option)
 
9
   any later version.
 
10
 
 
11
   This program is distributed in the hope that it will be useful,
 
12
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
   GNU General Public License for more details.
 
15
 
 
16
   You should have received a copy of the GNU General Public License
 
17
   along with this program; if not, write to the Free Software Foundation,
 
18
   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
19
 
 
20
/* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
 
21
 
 
22
/* This file is supposed to be used on platforms where <sys/stat.h> is
 
23
   incomplete.  It is intended to provide definitions and prototypes
 
24
   needed by an application.  Start with what the system provides.  */
 
25
 
 
26
#if __GNUC__ >= 3
 
27
@PRAGMA_SYSTEM_HEADER@
 
28
#endif
 
29
@PRAGMA_COLUMNS@
 
30
 
 
31
#if defined __need_system_sys_stat_h
 
32
/* Special invocation convention.  */
 
33
 
 
34
#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
 
35
 
 
36
#else
 
37
/* Normal invocation convention.  */
 
38
 
 
39
#ifndef _@GUARD_PREFIX@_SYS_STAT_H
 
40
 
 
41
/* Get nlink_t.  */
 
42
#include <sys/types.h>
 
43
 
 
44
/* Get struct timespec.  */
 
45
#include <time.h>
 
46
 
 
47
/* The include_next requires a split double-inclusion guard.  */
 
48
#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
 
49
 
 
50
#ifndef _@GUARD_PREFIX@_SYS_STAT_H
 
51
#define _@GUARD_PREFIX@_SYS_STAT_H
 
52
 
 
53
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
54
 
 
55
/* The definition of _GL_ARG_NONNULL is copied here.  */
 
56
 
 
57
/* The definition of _GL_WARN_ON_USE is copied here.  */
 
58
 
 
59
/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
 
60
   headers that may declare mkdir().  */
 
61
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
62
# include <io.h>     /* mingw32, mingw64 */
 
63
# include <direct.h> /* mingw64 */
 
64
#endif
 
65
 
 
66
#ifndef S_IFMT
 
67
# define S_IFMT 0170000
 
68
#endif
 
69
 
 
70
#if STAT_MACROS_BROKEN
 
71
# undef S_ISBLK
 
72
# undef S_ISCHR
 
73
# undef S_ISDIR
 
74
# undef S_ISFIFO
 
75
# undef S_ISLNK
 
76
# undef S_ISNAM
 
77
# undef S_ISMPB
 
78
# undef S_ISMPC
 
79
# undef S_ISNWK
 
80
# undef S_ISREG
 
81
# undef S_ISSOCK
 
82
#endif
 
83
 
 
84
#ifndef S_ISBLK
 
85
# ifdef S_IFBLK
 
86
#  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
 
87
# else
 
88
#  define S_ISBLK(m) 0
 
89
# endif
 
90
#endif
 
91
 
 
92
#ifndef S_ISCHR
 
93
# ifdef S_IFCHR
 
94
#  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
 
95
# else
 
96
#  define S_ISCHR(m) 0
 
97
# endif
 
98
#endif
 
99
 
 
100
#ifndef S_ISDIR
 
101
# ifdef S_IFDIR
 
102
#  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
 
103
# else
 
104
#  define S_ISDIR(m) 0
 
105
# endif
 
106
#endif
 
107
 
 
108
#ifndef S_ISDOOR /* Solaris 2.5 and up */
 
109
# define S_ISDOOR(m) 0
 
110
#endif
 
111
 
 
112
#ifndef S_ISFIFO
 
113
# ifdef S_IFIFO
 
114
#  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
 
115
# else
 
116
#  define S_ISFIFO(m) 0
 
117
# endif
 
118
#endif
 
119
 
 
120
#ifndef S_ISLNK
 
121
# ifdef S_IFLNK
 
122
#  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
 
123
# else
 
124
#  define S_ISLNK(m) 0
 
125
# endif
 
126
#endif
 
127
 
 
128
#ifndef S_ISMPB /* V7 */
 
129
# ifdef S_IFMPB
 
130
#  define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
 
131
#  define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
 
132
# else
 
133
#  define S_ISMPB(m) 0
 
134
#  define S_ISMPC(m) 0
 
135
# endif
 
136
#endif
 
137
 
 
138
#ifndef S_ISNAM /* Xenix */
 
139
# ifdef S_IFNAM
 
140
#  define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
 
141
# else
 
142
#  define S_ISNAM(m) 0
 
143
# endif
 
144
#endif
 
145
 
 
146
#ifndef S_ISNWK /* HP/UX */
 
147
# ifdef S_IFNWK
 
148
#  define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
 
149
# else
 
150
#  define S_ISNWK(m) 0
 
151
# endif
 
152
#endif
 
153
 
 
154
#ifndef S_ISPORT /* Solaris 10 and up */
 
155
# define S_ISPORT(m) 0
 
156
#endif
 
157
 
 
158
#ifndef S_ISREG
 
159
# ifdef S_IFREG
 
160
#  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
 
161
# else
 
162
#  define S_ISREG(m) 0
 
163
# endif
 
164
#endif
 
165
 
 
166
#ifndef S_ISSOCK
 
167
# ifdef S_IFSOCK
 
168
#  define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
 
169
# else
 
170
#  define S_ISSOCK(m) 0
 
171
# endif
 
172
#endif
 
173
 
 
174
 
 
175
#ifndef S_TYPEISMQ
 
176
# define S_TYPEISMQ(p) 0
 
177
#endif
 
178
 
 
179
#ifndef S_TYPEISTMO
 
180
# define S_TYPEISTMO(p) 0
 
181
#endif
 
182
 
 
183
 
 
184
#ifndef S_TYPEISSEM
 
185
# ifdef S_INSEM
 
186
#  define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
 
187
# else
 
188
#  define S_TYPEISSEM(p) 0
 
189
# endif
 
190
#endif
 
191
 
 
192
#ifndef S_TYPEISSHM
 
193
# ifdef S_INSHD
 
194
#  define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
 
195
# else
 
196
#  define S_TYPEISSHM(p) 0
 
197
# endif
 
198
#endif
 
199
 
 
200
/* high performance ("contiguous data") */
 
201
#ifndef S_ISCTG
 
202
# define S_ISCTG(p) 0
 
203
#endif
 
204
 
 
205
/* Cray DMF (data migration facility): off line, with data  */
 
206
#ifndef S_ISOFD
 
207
# define S_ISOFD(p) 0
 
208
#endif
 
209
 
 
210
/* Cray DMF (data migration facility): off line, with no data  */
 
211
#ifndef S_ISOFL
 
212
# define S_ISOFL(p) 0
 
213
#endif
 
214
 
 
215
/* 4.4BSD whiteout */
 
216
#ifndef S_ISWHT
 
217
# define S_ISWHT(m) 0
 
218
#endif
 
219
 
 
220
/* If any of the following are undefined,
 
221
   define them to their de facto standard values.  */
 
222
#if !S_ISUID
 
223
# define S_ISUID 04000
 
224
#endif
 
225
#if !S_ISGID
 
226
# define S_ISGID 02000
 
227
#endif
 
228
 
 
229
/* S_ISVTX is a common extension to POSIX.  */
 
230
#ifndef S_ISVTX
 
231
# define S_ISVTX 01000
 
232
#endif
 
233
 
 
234
#if !S_IRUSR && S_IREAD
 
235
# define S_IRUSR S_IREAD
 
236
#endif
 
237
#if !S_IRUSR
 
238
# define S_IRUSR 00400
 
239
#endif
 
240
#if !S_IRGRP
 
241
# define S_IRGRP (S_IRUSR >> 3)
 
242
#endif
 
243
#if !S_IROTH
 
244
# define S_IROTH (S_IRUSR >> 6)
 
245
#endif
 
246
 
 
247
#if !S_IWUSR && S_IWRITE
 
248
# define S_IWUSR S_IWRITE
 
249
#endif
 
250
#if !S_IWUSR
 
251
# define S_IWUSR 00200
 
252
#endif
 
253
#if !S_IWGRP
 
254
# define S_IWGRP (S_IWUSR >> 3)
 
255
#endif
 
256
#if !S_IWOTH
 
257
# define S_IWOTH (S_IWUSR >> 6)
 
258
#endif
 
259
 
 
260
#if !S_IXUSR && S_IEXEC
 
261
# define S_IXUSR S_IEXEC
 
262
#endif
 
263
#if !S_IXUSR
 
264
# define S_IXUSR 00100
 
265
#endif
 
266
#if !S_IXGRP
 
267
# define S_IXGRP (S_IXUSR >> 3)
 
268
#endif
 
269
#if !S_IXOTH
 
270
# define S_IXOTH (S_IXUSR >> 6)
 
271
#endif
 
272
 
 
273
#if !S_IRWXU
 
274
# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
 
275
#endif
 
276
#if !S_IRWXG
 
277
# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
 
278
#endif
 
279
#if !S_IRWXO
 
280
# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
 
281
#endif
 
282
 
 
283
/* S_IXUGO is a common extension to POSIX.  */
 
284
#if !S_IXUGO
 
285
# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
 
286
#endif
 
287
 
 
288
#ifndef S_IRWXUGO
 
289
# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
 
290
#endif
 
291
 
 
292
/* Macros for futimens and utimensat.  */
 
293
#ifndef UTIME_NOW
 
294
# define UTIME_NOW (-1)
 
295
# define UTIME_OMIT (-2)
 
296
#endif
 
297
 
 
298
 
 
299
#if @GNULIB_FCHMODAT@
 
300
# if !@HAVE_FCHMODAT@
 
301
_GL_FUNCDECL_SYS (fchmodat, int,
 
302
                  (int fd, char const *file, mode_t mode, int flag)
 
303
                  _GL_ARG_NONNULL ((2)));
 
304
# endif
 
305
_GL_CXXALIAS_SYS (fchmodat, int,
 
306
                  (int fd, char const *file, mode_t mode, int flag));
 
307
_GL_CXXALIASWARN (fchmodat);
 
308
#elif defined GNULIB_POSIXCHECK
 
309
# undef fchmodat
 
310
# if HAVE_RAW_DECL_FCHMODAT
 
311
_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
 
312
                 "use gnulib module openat for portability");
 
313
# endif
 
314
#endif
 
315
 
 
316
 
 
317
#if @REPLACE_FSTAT@
 
318
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
319
#  define fstat rpl_fstat
 
320
# endif
 
321
_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
 
322
_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
 
323
#else
 
324
_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
 
325
#endif
 
326
_GL_CXXALIASWARN (fstat);
 
327
 
 
328
 
 
329
#if @GNULIB_FSTATAT@
 
330
# if @REPLACE_FSTATAT@
 
331
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
332
#   undef fstatat
 
333
#   define fstatat rpl_fstatat
 
334
#  endif
 
335
_GL_FUNCDECL_RPL (fstatat, int,
 
336
                  (int fd, char const *name, struct stat *st, int flags)
 
337
                  _GL_ARG_NONNULL ((2, 3)));
 
338
_GL_CXXALIAS_RPL (fstatat, int,
 
339
                  (int fd, char const *name, struct stat *st, int flags));
 
340
# else
 
341
#  if !@HAVE_FSTATAT@
 
342
_GL_FUNCDECL_SYS (fstatat, int,
 
343
                  (int fd, char const *name, struct stat *st, int flags)
 
344
                  _GL_ARG_NONNULL ((2, 3)));
 
345
#  endif
 
346
_GL_CXXALIAS_SYS (fstatat, int,
 
347
                  (int fd, char const *name, struct stat *st, int flags));
 
348
# endif
 
349
_GL_CXXALIASWARN (fstatat);
 
350
#elif defined GNULIB_POSIXCHECK
 
351
# undef fstatat
 
352
# if HAVE_RAW_DECL_FSTATAT
 
353
_GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
 
354
                 "use gnulib module openat for portability");
 
355
# endif
 
356
#endif
 
357
 
 
358
 
 
359
#if @GNULIB_FUTIMENS@
 
360
/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
 
361
   implementation relies on futimesat, which on Solaris 10 makes an invocation
 
362
   to futimens that is meant to invoke the libc's futimens(), not gnulib's
 
363
   futimens().  */
 
364
# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun)
 
365
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
366
#   undef futimens
 
367
#   define futimens rpl_futimens
 
368
#  endif
 
369
_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
 
370
_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
 
371
# else
 
372
#  if !@HAVE_FUTIMENS@
 
373
_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
 
374
#  endif
 
375
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
 
376
# endif
 
377
# if @HAVE_FUTIMENS@
 
378
_GL_CXXALIASWARN (futimens);
 
379
# endif
 
380
#elif defined GNULIB_POSIXCHECK
 
381
# undef futimens
 
382
# if HAVE_RAW_DECL_FUTIMENS
 
383
_GL_WARN_ON_USE (futimens, "futimens is not portable - "
 
384
                 "use gnulib module futimens for portability");
 
385
# endif
 
386
#endif
 
387
 
 
388
 
 
389
#if @GNULIB_LCHMOD@
 
390
/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
 
391
   denotes a symbolic link.  */
 
392
# if !@HAVE_LCHMOD@
 
393
/* The lchmod replacement follows symbolic links.  Callers should take
 
394
   this into account; lchmod should be applied only to arguments that
 
395
   are known to not be symbolic links.  On hosts that lack lchmod,
 
396
   this can lead to race conditions between the check and the
 
397
   invocation of lchmod, but we know of no workarounds that are
 
398
   reliable in general.  You might try requesting support for lchmod
 
399
   from your operating system supplier.  */
 
400
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
401
#   define lchmod chmod
 
402
#  endif
 
403
/* Need to cast, because on mingw, the second parameter of chmod is
 
404
                                                int mode.  */
 
405
_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
 
406
                         (const char *filename, mode_t mode));
 
407
# else
 
408
#  if 0 /* assume already declared */
 
409
_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
 
410
                               _GL_ARG_NONNULL ((1)));
 
411
#  endif
 
412
_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
 
413
# endif
 
414
# if @HAVE_LCHMOD@
 
415
_GL_CXXALIASWARN (lchmod);
 
416
# endif
 
417
#elif defined GNULIB_POSIXCHECK
 
418
# undef lchmod
 
419
# if HAVE_RAW_DECL_LCHMOD
 
420
_GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
 
421
                 "use gnulib module lchmod for portability");
 
422
# endif
 
423
#endif
 
424
 
 
425
 
 
426
#if @GNULIB_LSTAT@
 
427
# if ! @HAVE_LSTAT@
 
428
/* mingw does not support symlinks, therefore it does not have lstat.  But
 
429
   without links, stat does just fine.  */
 
430
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
431
#   define lstat stat
 
432
#  endif
 
433
_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
 
434
# elif @REPLACE_LSTAT@
 
435
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
436
#   undef lstat
 
437
#   define lstat rpl_lstat
 
438
#  endif
 
439
_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
 
440
                              _GL_ARG_NONNULL ((1, 2)));
 
441
_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
 
442
# else
 
443
_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
 
444
# endif
 
445
# if @HAVE_LSTAT@
 
446
_GL_CXXALIASWARN (lstat);
 
447
# endif
 
448
#elif defined GNULIB_POSIXCHECK
 
449
# undef lstat
 
450
# if HAVE_RAW_DECL_LSTAT
 
451
_GL_WARN_ON_USE (lstat, "lstat is unportable - "
 
452
                 "use gnulib module lstat for portability");
 
453
# endif
 
454
#endif
 
455
 
 
456
 
 
457
#if @REPLACE_MKDIR@
 
458
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
459
#  undef mkdir
 
460
#  define mkdir rpl_mkdir
 
461
# endif
 
462
_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
 
463
                              _GL_ARG_NONNULL ((1)));
 
464
_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
 
465
#else
 
466
/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
 
467
   Additionally, it declares _mkdir (and depending on compile flags, an
 
468
   alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
 
469
   which are included above.  */
 
470
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
 
471
 
 
472
#  if !GNULIB_defined_rpl_mkdir
 
473
static inline int
 
474
rpl_mkdir (char const *name, mode_t mode)
 
475
{
 
476
  return _mkdir (name);
 
477
}
 
478
#   define GNULIB_defined_rpl_mkdir 1
 
479
#  endif
 
480
 
 
481
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
482
#   define mkdir rpl_mkdir
 
483
#  endif
 
484
_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
 
485
# else
 
486
_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
 
487
# endif
 
488
#endif
 
489
_GL_CXXALIASWARN (mkdir);
 
490
 
 
491
 
 
492
#if @GNULIB_MKDIRAT@
 
493
# if !@HAVE_MKDIRAT@
 
494
_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
 
495
                                _GL_ARG_NONNULL ((2)));
 
496
# endif
 
497
_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
 
498
_GL_CXXALIASWARN (mkdirat);
 
499
#elif defined GNULIB_POSIXCHECK
 
500
# undef mkdirat
 
501
# if HAVE_RAW_DECL_MKDIRAT
 
502
_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
 
503
                 "use gnulib module openat for portability");
 
504
# endif
 
505
#endif
 
506
 
 
507
 
 
508
#if @GNULIB_MKFIFO@
 
509
# if @REPLACE_MKFIFO@
 
510
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
511
#   undef mkfifo
 
512
#   define mkfifo rpl_mkfifo
 
513
#  endif
 
514
_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
 
515
                               _GL_ARG_NONNULL ((1)));
 
516
_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
 
517
# else
 
518
#  if !@HAVE_MKFIFO@
 
519
_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
 
520
                               _GL_ARG_NONNULL ((1)));
 
521
#  endif
 
522
_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
 
523
# endif
 
524
_GL_CXXALIASWARN (mkfifo);
 
525
#elif defined GNULIB_POSIXCHECK
 
526
# undef mkfifo
 
527
# if HAVE_RAW_DECL_MKFIFO
 
528
_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
 
529
                 "use gnulib module mkfifo for portability");
 
530
# endif
 
531
#endif
 
532
 
 
533
 
 
534
#if @GNULIB_MKFIFOAT@
 
535
# if !@HAVE_MKFIFOAT@
 
536
_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
 
537
                                 _GL_ARG_NONNULL ((2)));
 
538
# endif
 
539
_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
 
540
_GL_CXXALIASWARN (mkfifoat);
 
541
#elif defined GNULIB_POSIXCHECK
 
542
# undef mkfifoat
 
543
# if HAVE_RAW_DECL_MKFIFOAT
 
544
_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
 
545
                 "use gnulib module mkfifoat for portability");
 
546
# endif
 
547
#endif
 
548
 
 
549
 
 
550
#if @GNULIB_MKNOD@
 
551
# if @REPLACE_MKNOD@
 
552
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
553
#   undef mknod
 
554
#   define mknod rpl_mknod
 
555
#  endif
 
556
_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
 
557
                              _GL_ARG_NONNULL ((1)));
 
558
_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
 
559
# else
 
560
#  if !@HAVE_MKNOD@
 
561
_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
 
562
                              _GL_ARG_NONNULL ((1)));
 
563
#  endif
 
564
/* Need to cast, because on OSF/1 5.1, the third parameter is '...'.  */
 
565
_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev));
 
566
# endif
 
567
_GL_CXXALIASWARN (mknod);
 
568
#elif defined GNULIB_POSIXCHECK
 
569
# undef mknod
 
570
# if HAVE_RAW_DECL_MKNOD
 
571
_GL_WARN_ON_USE (mknod, "mknod is not portable - "
 
572
                 "use gnulib module mknod for portability");
 
573
# endif
 
574
#endif
 
575
 
 
576
 
 
577
#if @GNULIB_MKNODAT@
 
578
# if !@HAVE_MKNODAT@
 
579
_GL_FUNCDECL_SYS (mknodat, int,
 
580
                  (int fd, char const *file, mode_t mode, dev_t dev)
 
581
                  _GL_ARG_NONNULL ((2)));
 
582
# endif
 
583
_GL_CXXALIAS_SYS (mknodat, int,
 
584
                  (int fd, char const *file, mode_t mode, dev_t dev));
 
585
_GL_CXXALIASWARN (mknodat);
 
586
#elif defined GNULIB_POSIXCHECK
 
587
# undef mknodat
 
588
# if HAVE_RAW_DECL_MKNODAT
 
589
_GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
 
590
                 "use gnulib module mkfifoat for portability");
 
591
# endif
 
592
#endif
 
593
 
 
594
 
 
595
#if @GNULIB_STAT@
 
596
# if @REPLACE_STAT@
 
597
/* We can't use the object-like #define stat rpl_stat, because of
 
598
   struct stat.  This means that rpl_stat will not be used if the user
 
599
   does (stat)(a,b).  Oh well.  */
 
600
#  undef stat
 
601
#  ifdef _LARGE_FILES
 
602
    /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
 
603
       so we have to replace stat64() instead of stat(). */
 
604
#   define stat stat64
 
605
#   undef stat64
 
606
#   define stat64(name, st) rpl_stat (name, st)
 
607
#  else /* !_LARGE_FILES */
 
608
#   define stat(name, st) rpl_stat (name, st)
 
609
#  endif /* !_LARGE_FILES */
 
610
_GL_EXTERN_C int stat (const char *name, struct stat *buf)
 
611
                      _GL_ARG_NONNULL ((1, 2));
 
612
# endif
 
613
#elif defined GNULIB_POSIXCHECK
 
614
# undef stat
 
615
# if HAVE_RAW_DECL_STAT
 
616
_GL_WARN_ON_USE (stat, "stat is unportable - "
 
617
                 "use gnulib module stat for portability");
 
618
# endif
 
619
#endif
 
620
 
 
621
 
 
622
#if @GNULIB_UTIMENSAT@
 
623
/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
 
624
   implementation relies on futimesat, which on Solaris 10 makes an invocation
 
625
   to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
 
626
   utimensat().  */
 
627
# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun)
 
628
#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 
629
#   undef utimensat
 
630
#   define utimensat rpl_utimensat
 
631
#  endif
 
632
_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
 
633
                                   struct timespec const times[2], int flag)
 
634
                                  _GL_ARG_NONNULL ((2)));
 
635
_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
 
636
                                   struct timespec const times[2], int flag));
 
637
# else
 
638
#  if !@HAVE_UTIMENSAT@
 
639
_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
 
640
                                   struct timespec const times[2], int flag)
 
641
                                  _GL_ARG_NONNULL ((2)));
 
642
#  endif
 
643
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
 
644
                                   struct timespec const times[2], int flag));
 
645
# endif
 
646
# if @HAVE_UTIMENSAT@
 
647
_GL_CXXALIASWARN (utimensat);
 
648
# endif
 
649
#elif defined GNULIB_POSIXCHECK
 
650
# undef utimensat
 
651
# if HAVE_RAW_DECL_UTIMENSAT
 
652
_GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
 
653
                 "use gnulib module utimensat for portability");
 
654
# endif
 
655
#endif
 
656
 
 
657
 
 
658
#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
 
659
#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
 
660
#endif