Author: ed
Date: Sun Feb 14 12:00:42 2010
New Revision: 203862
URL: http://svn.freebsd.org/changeset/base/203862

Log:
  Make <sys/timeb.h> work without including <sys/types.h>.
  
  According to the last POSIX specification that contained <sys/timeb.h>,
  this header should also typedef time_t properly. Also add a proper
  comment to the final #endif.

Modified:
  head/sys/sys/timeb.h

Modified: head/sys/sys/timeb.h
==============================================================================
--- head/sys/sys/timeb.h        Sun Feb 14 12:00:23 2010        (r203861)
+++ head/sys/sys/timeb.h        Sun Feb 14 12:00:42 2010        (r203862)
@@ -38,6 +38,13 @@
 #ifndef _SYS_TIMEB_H_
 #define _SYS_TIMEB_H_
 
+#include <sys/_types.h>
+
+#ifndef _TIME_T_DECLARED
+typedef        __time_t        time_t;
+#define        _TIME_T_DECLARED
+#endif
+
 /* The ftime(2) system call structure -- deprecated. */
 struct timeb {
        time_t  time;                   /* seconds since the Epoch */
@@ -54,4 +61,4 @@ int ftime(struct timeb *);
 __END_DECLS
 #endif /* _KERNEL */
 
-#endif
+#endif /* !_SYS_TIMEB_H_ */
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to