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.

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/stat.h
          +++ new/usr/src/uts/common/sys/stat.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  24   25   */
  25   26  
  26   27  /*      Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. */
  27   28  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T   */
  28   29  /*      All Rights Reserved     */
  29   30  
  30   31  #ifndef _SYS_STAT_H
  31   32  #define _SYS_STAT_H
  32   33  
  33   34  #include <sys/feature_tests.h>
↓ open down ↓ 429 lines elided ↑ open up ↑
 463  464   * the i386 ABI need to be aware of this too.
 464  465   */
 465  466  
 466  467  #define _R3_MKNOD_VER   1       /* SVR3.0 mknod */
 467  468  #define _MKNOD_VER      2       /* current version of mknod */
 468  469  #define _R3_STAT_VER    1       /* SVR3.0 stat */
 469  470  #define _STAT_VER       2       /* current version of stat */
 470  471  
 471  472  #endif  /* __i386 || (__i386_COMPAT && _KERNEL) */
 472  473  
 473      -#if defined(__EXTENSIONS__) || \
 474      -        (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 475      -        /* || defined(_XPG7) */
 476      -/* for use with futimens() and utimensat() */
 477      -#define UTIME_NOW       -1L
 478      -#define UTIME_OMIT      -2L
 479      -#endif  /* defined(__EXTENSIONS__) ... */
 480      -
 481  474  #if !defined(_KERNEL) || defined(_BOOT)
 482  475  
 483      -#if defined(__STDC__)
 484      -
 485  476  #if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
 486  477          defined(_XPG4_2) || defined(__EXTENSIONS__)
 487  478  extern int fchmod(int, mode_t);
 488  479  #endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
 489  480  
 490  481  extern int chmod(const char *, mode_t);
 491  482  extern int mkdir(const char *, mode_t);
 492  483  extern int mkfifo(const char *, mode_t);
 493  484  extern mode_t umask(mode_t);
 494  485  
↓ open down ↓ 2 lines elided ↑ open up ↑
 497  488              !defined(__PRAGMA_REDEFINE_EXTNAME))
 498  489  extern int fstat64(int, struct stat64 *);
 499  490  extern int stat64(const char *_RESTRICT_KYWD, struct stat64 *_RESTRICT_KYWD);
 500  491  extern int lstat64(const char *_RESTRICT_KYWD, struct stat64 *_RESTRICT_KYWD);
 501  492  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
 502  493          defined(_ATFILE_SOURCE)
 503  494  extern int fstatat64(int, const char *, struct stat64 *, int);
 504  495  #endif /* defined (_ATFILE_SOURCE) */
 505  496  #endif
 506  497  
 507      -#if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \
 508      -        (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 509      -        /* || defined(_XPG7) */
      498 +#if defined(_XPG7) || defined(_ATFILE_SOURCE)
 510  499  extern int mkdirat(int, const char *, mode_t);
 511  500  extern int mkfifoat(int, const char *, mode_t);
 512  501  extern int mknodat(int, const char *, mode_t, dev_t);
 513  502  extern int fchmodat(int, const char *, mode_t, int);
      503 +#endif
      504 +
      505 +#if defined(_XPG7) || !defined(_STRICT_SYMBOLS)
      506 +#define UTIME_NOW       -1L
      507 +#define UTIME_OMIT      -2L
 514  508  extern int futimens(int, const struct timespec[2]);
 515  509  extern int utimensat(int, const char *, const struct timespec[2], int);
 516      -#endif  /* defined(__EXTENSIONS__) ... */
 517      -
 518      -#else /* !__STDC__ */
 519      -
 520      -#if !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2) || \
 521      -        defined(_XPG4_2) || defined(__EXTENSIONS__)
 522      -extern int fchmod();
 523      -#endif /* !defined(__XOPEN_OR_POSIX) || (_POSIX_C_SOURCE > 2)... */
 524      -
 525      -extern int chmod();
 526      -extern int mkdir();
 527      -extern int mkfifo();
 528      -extern mode_t umask();
 529      -
 530      -/* transitional large file interfaces */
 531      -#if     defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
 532      -            !defined(__PRAGMA_REDEFINE_EXTNAME))
 533      -extern int fstat64();
 534      -extern int stat64();
 535      -extern int lstat64();
 536      -#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) || \
 537      -        defined(_ATFILE_SOURCE)
 538      -extern int fstatat64();
 539      -#endif /* defined (_ATFILE_SOURCE) */
 540  510  #endif
 541  511  
 542      -#if defined(__EXTENSIONS__) || defined(_ATFILE_SOURCE) || \
 543      -        (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
 544      -        /* || defined(_XPG7) */
 545      -extern int mkdirat();
 546      -extern int mkfifoat();
 547      -extern int mknodat();
 548      -extern int fchmodat();
 549      -extern int futimens();
 550      -extern int utimensat();
 551      -#endif  /* defined(__EXTENSIONS__) ... */
 552      -
 553      -#endif /* defined(__STDC__) */
 554      -
 555  512  #include <sys/stat_impl.h>
 556  513  
 557  514  #endif /* !defined(_KERNEL) */
 558  515  
 559  516  #ifdef  __cplusplus
 560  517  }
 561  518  #endif
 562  519  
 563  520  #endif  /* _SYS_STAT_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX