aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-22 22:20:07 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-22 22:20:07 +0000
commit09a6b8d9c89566eccdc27103c85750f99d6fea52 (patch)
treeee57887ad01db655f6965d56615bc83db592da5d /tmux.h
parenta52be0e194f10e21e8f094a908e3afe9abfce8ae (diff)
downloadrtmux-09a6b8d9c89566eccdc27103c85750f99d6fea52.tar.gz
rtmux-09a6b8d9c89566eccdc27103c85750f99d6fea52.tar.bz2
rtmux-09a6b8d9c89566eccdc27103c85750f99d6fea52.zip
timespecadd, fgetln headers.
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/tmux.h b/tmux.h
index 47daf108..c175b15f 100644
--- a/tmux.h
+++ b/tmux.h
@@ -1,4 +1,4 @@
-/* $Id: tmux.h,v 1.163 2008-06-22 21:52:41 nicm Exp $ */
+/* $Id: tmux.h,v 1.164 2008-06-22 22:20:07 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -75,6 +75,18 @@ extern const char *__progname;
((tsp)->tv_sec cmp (usp)->tv_sec))
#endif
+#ifndef timespecadd
+#define timespecadd(tsp, usp, vsp) \
+ do { \
+ (vsp)->tv_sec = (tsp)->tv_sec + (usp)->tv_sec; \
+ (vsp)->tv_nsec = (tsp)->tv_nsec + (usp)->tv_nsec; \
+ if ((vsp)->tv_nsec >= 1000000000L) { \
+ (vsp)->tv_sec++; \
+ (vsp)->tv_nsec -= 1000000000L; \
+ } \
+ } while (0)
+#endif
+
#ifndef TTY_NAME_MAX
#define TTY_NAME_MAX 32
#endif