timespecadd, fgetln headers.

This commit is contained in:
Nicholas Marriott 2008-06-22 22:20:07 +00:00
parent a52be0e194
commit 09a6b8d9c8
2 changed files with 18 additions and 1 deletions

View File

@ -32,6 +32,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/types.h>
#include <errno.h>
#include <stdio.h>
#include "tmux.h"
char *

14
tmux.h
View File

@ -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