Print this page
Ensured various XPG7 stuff are declared properly in sys/stat.h (and cleanup)
New documentation for wcslen, wcsnlen, wcscasecmp (and friends), wcsdup.
Various other tweaks and markup improvements.
*** 19,28 ****
--- 19,29 ----
* CDDL HEADER END
*/
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2014 Garrett D'Amore <garrett@damore.org>
*/
/* Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
/* Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T */
/* All Rights Reserved */
*** 468,489 ****
#define _R3_STAT_VER 1 /* SVR3.0 stat */
#define _STAT_VER 2 /* current version of stat */
#endif /* __i386 || (__i386_COMPAT && _KERNEL) */
- #if defined(__EXTENSIONS__) || \
- (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
- /* || defined(_XPG7) */
- /* for use with futimens() and utimensat() */
- #define UTIME_NOW -1L
- #define UTIME_OMIT -2L
- #endif /* defined(__EXTENSIONS__) ... */
-
#if !defined(_KERNEL) || defined(_BOOT)
- #if defined(__STDC__)
-
#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
defined(_XPG4_2) || defined(__EXTENSIONS__)
extern int fchmod(int, mode_t);
#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
--- 469,480 ----
*** 502,559 ****
defined(_ATFILE_SOURCE)
extern int fstatat64(int, const char *, struct stat64 *, int);
#endif /* defined (_ATFILE_SOURCE) */
#endif
! #if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \
! (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
! /* || defined(_XPG7) */
extern int mkdirat(int, const char *, mode_t);
extern int mkfifoat(int, const char *, mode_t);
extern int mknodat(int, const char *, mode_t, dev_t);
extern int fchmodat(int, const char *, mode_t, int);
extern int futimens(int, const struct timespec[2]);
extern int utimensat(int, const char *, const struct timespec[2], int);
- #endif /* defined(__EXTENSIONS__) ... */
-
- #else /* !__STDC__ */
-
- #if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
- defined(_XPG4_2) || defined(__EXTENSIONS__)
- extern int fchmod();
- #endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
-
- extern int chmod();
- extern int mkdir();
- extern int mkfifo();
- extern mode_t umask();
-
- /* transitional large file interfaces */
- #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
- !defined(__PRAGMA_REDEFINE_EXTNAME))
- extern int fstat64();
- extern int stat64();
- extern int lstat64();
- #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
- defined(_ATFILE_SOURCE)
- extern int fstatat64();
- #endif /* defined (_ATFILE_SOURCE) */
#endif
- #if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \
- (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
- /* || defined(_XPG7) */
- extern int mkdirat();
- extern int mkfifoat();
- extern int mknodat();
- extern int fchmodat();
- extern int futimens();
- extern int utimensat();
- #endif /* defined(__EXTENSIONS__) ... */
-
- #endif /* defined(__STDC__) */
-
#include <sys/stat_impl.h>
#endif /* !defined(_KERNEL) */
#ifdef __cplusplus
--- 493,516 ----
defined(_ATFILE_SOURCE)
extern int fstatat64(int, const char *, struct stat64 *, int);
#endif /* defined (_ATFILE_SOURCE) */
#endif
! #if defined(_XPG7) || defined(_ATFILE_SOURCE)
extern int mkdirat(int, const char *, mode_t);
extern int mkfifoat(int, const char *, mode_t);
extern int mknodat(int, const char *, mode_t, dev_t);
extern int fchmodat(int, const char *, mode_t, int);
+ #endif
+
+ #if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
+ #define UTIME_NOW -1L
+ #define UTIME_OMIT -2L
extern int futimens(int, const struct timespec[2]);
extern int utimensat(int, const char *, const struct timespec[2], int);
#endif
#include <sys/stat_impl.h>
#endif /* !defined(_KERNEL) */
#ifdef __cplusplus