svn commit: r247476 - head/sys/sys

Davide Italiano davide at FreeBSD.org
Thu Feb 28 17:10:31 UTC 2013


Author: davide
Date: Thu Feb 28 17:10:30 2013
New Revision: 247476
URL: http://svnweb.freebsd.org/changeset/base/247476

Log:
  Move the definition of sbintime_t type from <sys/time.h> to <sys/types.h>.
  With this change we prevent gross namespace pollution.
  
  Reported by:	bde
  Suggested by:	attilio

Modified:
  head/sys/sys/time.h
  head/sys/sys/types.h

Modified: head/sys/sys/time.h
==============================================================================
--- head/sys/sys/time.h	Thu Feb 28 16:56:08 2013	(r247475)
+++ head/sys/sys/time.h	Thu Feb 28 17:10:30 2013	(r247476)
@@ -109,7 +109,6 @@ bintime_mul(struct bintime *bt, u_int x)
 	    ((a)->frac cmp (b)->frac) :					\
 	    ((a)->sec cmp (b)->sec))
 
-typedef int64_t sbintime_t;
 #define	SBT_1S	((sbintime_t)1 << 32)
 #define	SBT_1M	(SBT_1S * 60)
 #define	SBT_1MS	(SBT_1S / 1000)

Modified: head/sys/sys/types.h
==============================================================================
--- head/sys/sys/types.h	Thu Feb 28 16:56:08 2013	(r247475)
+++ head/sys/sys/types.h	Thu Feb 28 17:10:30 2013	(r247476)
@@ -188,6 +188,8 @@ typedef	__rlim_t	rlim_t;		/* resource li
 #define	_RLIM_T_DECLARED
 #endif
 
+typedef	__int64_t	sbintime_t;
+
 typedef	__segsz_t	segsz_t;	/* segment size (in pages) */
 
 #ifndef _SIZE_T_DECLARED


More information about the svn-src-head mailing list