Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/time.h
          +++ new/usr/src/uts/common/sys/time.h
↓ open down ↓ 1 lines elided ↑ open up ↑
   2    2  /*        All Rights Reserved   */
   3    3  
   4    4  
   5    5  /*
   6    6   * Copyright (c) 1982, 1986, 1993 Regents of the University of California.
   7    7   * All rights reserved.  The Berkeley software License Agreement
   8    8   * specifies the terms and conditions for redistribution.
   9    9   */
  10   10  
  11   11  /*
       12 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       13 + *
  12   14   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  13   15   * Use is subject to license terms.
  14   16   */
  15   17  
  16   18  #ifndef _SYS_TIME_H
  17   19  #define _SYS_TIME_H
  18   20  
  19   21  #include <sys/feature_tests.h>
  20   22  
  21   23  /*
↓ open down ↓ 343 lines elided ↑ open up ↑
 365  367  extern clock_t          ddi_get_lbolt(void);
 366  368  extern int64_t          ddi_get_lbolt64(void);
 367  369  
 368  370  #if defined(_SYSCALL32)
 369  371  extern  void            hrt2ts32(hrtime_t, timestruc32_t *);
 370  372  #endif
 371  373  
 372  374  #endif /* _KERNEL */
 373  375  
 374  376  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 375      -#if defined(__STDC__)
 376  377  int adjtime(struct timeval *, struct timeval *);
 377      -#else
 378      -int adjtime();
 379      -#endif
 380  378  #endif /* !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) ... */
 381  379  
 382  380  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || \
 383  381          defined(_ATFILE_SOURCE) || defined(__EXTENSIONS__)
 384      -#if defined(__STDC__)
 385  382  int futimesat(int, const char *, const struct timeval *);
 386      -#else
 387      -int futimesat();
 388      -#endif /* defined(__STDC__) */
 389  383  #endif /* defined(__ATFILE_SOURCE) */
 390  384  
 391  385  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 392  386          defined(__EXTENSIONS__)
 393  387  
 394      -#if defined(__STDC__)
 395      -
 396  388  int getitimer(int, struct itimerval *);
 397  389  int utimes(const char *, const struct timeval *);
 398  390  #if defined(_XPG4_2)
 399  391  int setitimer(int, const struct itimerval *_RESTRICT_KYWD,
 400  392          struct itimerval *_RESTRICT_KYWD);
 401  393  #else
 402  394  int setitimer(int, struct itimerval *_RESTRICT_KYWD,
 403  395          struct itimerval *_RESTRICT_KYWD);
 404  396  #endif /* defined(_XPG2_2) */
 405  397  
 406      -#else /* __STDC__ */
 407      -
 408      -int gettimer();
 409      -int settimer();
 410      -int utimes();
 411      -#endif /* __STDC__ */
 412  398  #endif /* !defined(_KERNEL) ... defined(_XPG4_2) */
 413  399  
 414  400  /*
 415  401   * gettimeofday() and settimeofday() were included in SVr4 due to their
 416  402   * common use in BSD based applications.  They were to be included exactly
 417  403   * as in BSD, with two parameters.  However, AT&T/USL noted that the second
 418  404   * parameter was unused and deleted it, thereby making a routine included
 419  405   * for compatibility, incompatible.
 420  406   *
 421  407   * XSH4.2 (spec 1170) defines gettimeofday and settimeofday to have two
 422  408   * parameters.
 423  409   *
 424  410   * This has caused general disagreement in the application community as to
 425  411   * the syntax of these routines.  Solaris defaults to the XSH4.2 definition.
 426  412   * The flag _SVID_GETTOD may be used to force the SVID version.
 427  413   */
 428  414  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
 429  415  
 430      -#if defined(__STDC__)
 431  416  #if defined(_SVID_GETTOD)
 432  417  int settimeofday(struct timeval *);
 433  418  #else
 434  419  int settimeofday(struct timeval *, void *);
 435  420  #endif
 436  421  hrtime_t        gethrtime(void);
 437  422  hrtime_t        gethrvtime(void);
 438      -#else /* __STDC__ */
 439      -int settimeofday();
 440      -hrtime_t        gethrtime();
 441      -hrtime_t        gethrvtime();
 442      -#endif /* __STDC__ */
 443  423  
 444  424  #endif /* !(defined _KERNEL) && !defined(__XOPEN_OR_POSIX) ... */
 445  425  
 446  426  #if !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
 447  427          defined(__EXTENSIONS__)
 448  428  
 449      -#if defined(__STDC__)
 450  429  #if defined(_SVID_GETTOD)
 451  430  int gettimeofday(struct timeval *);
 452  431  #else
 453  432  int gettimeofday(struct timeval *_RESTRICT_KYWD, void *_RESTRICT_KYWD);
 454  433  #endif
 455      -#else /* __STDC__ */
 456      -int gettimeofday();
 457      -#endif /* __STDC__ */
 458  434  
 459  435  #endif /* !defined(_KERNEL) && !defined(__XOPEN_OR_POSIX) ... */
 460  436  
 461  437  /*
 462  438   * The inclusion of <time.h> is historical and was added for
 463  439   * backward compatibility in delta 1.2 when a number of definitions
 464  440   * were moved out of <sys/time.h>.  More recently, the timespec and
 465  441   * itimerspec structure definitions, along with the _CLOCK_*, CLOCK_*,
 466  442   * _TIMER_*, and TIMER_* symbols were moved to <sys/time_impl.h>,
 467  443   * which is now included by <time.h>.  This change was due to POSIX
↓ open down ↓ 28 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX