mirror of
https://github.com/tmux/tmux.git
synced 2025-03-23 05:38:56 +00:00
compat/* should not include tmux.h.
This commit is contained in:
parent
418ab1a553
commit
3e495b4001
18
compat.h
18
compat.h
@ -17,6 +17,12 @@
|
||||
#ifndef COMPAT_H
|
||||
#define COMPAT_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef __GNUC__
|
||||
#define __attribute__(a)
|
||||
#endif
|
||||
@ -62,6 +68,12 @@ typedef uint64_t u_int64_t;
|
||||
#define pledge(s, p) (0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_QUEUE_H
|
||||
#include <sys/queue.h>
|
||||
#else
|
||||
@ -108,12 +120,6 @@ typedef uint64_t u_int64_t;
|
||||
#include "compat/imsg.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#else
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#ifdef BROKEN_CMSG_FIRSTHDR
|
||||
#undef CMSG_FIRSTHDR
|
||||
#define CMSG_FIRSTHDR(mhdr) \
|
||||
|
@ -23,8 +23,6 @@
|
||||
#endif
|
||||
#include <string.h>
|
||||
|
||||
#include "tmux.h"
|
||||
|
||||
int
|
||||
asprintf(char **ret, const char *fmt, ...)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
void
|
||||
cfmakeraw(struct termios *tio)
|
||||
|
@ -45,7 +45,7 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
#ifndef OPEN_MAX
|
||||
# define OPEN_MAX 256
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
int
|
||||
daemon(int nochdir, int noclose)
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
char *
|
||||
fgetln(FILE *fp, size_t *len)
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
pid_t
|
||||
forkpty(int *master, unused char *name, struct termios *tio, struct winsize *ws)
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <stropts.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
pid_t
|
||||
forkpty(int *master, char *name, struct termios *tio, struct winsize *ws)
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <stropts.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
pid_t
|
||||
forkpty(int *master, char *name, struct termios *tio, struct winsize *ws)
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
/*
|
||||
* fparseln() specific operation flags.
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
/* OPENBSD ORIGINAL: lib/libc/stdlib/getopt.c */
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME)
|
||||
const char *
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
#include "imsg.h"
|
||||
|
||||
int ibuf_realloc(struct ibuf *, size_t);
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
#include "imsg.h"
|
||||
|
||||
int imsg_fd_overhead = 0;
|
||||
|
@ -18,8 +18,6 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "tmux.h"
|
||||
|
||||
#ifndef _IMSG_H_
|
||||
#define _IMSG_H_
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
/*
|
||||
* This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
int
|
||||
setenv(const char *name, const char *value, unused int overwrite)
|
||||
|
@ -16,9 +16,10 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
#if defined(HAVE_PRCTL) && defined(HAVE_PR_SET_NAME)
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
/*
|
||||
* Appends src to string dst of size siz (unlike strncat, siz is the
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
/*
|
||||
* Copy src to string dst of size siz. At most siz-1 characters
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
#define INVALID 1
|
||||
#define TOOSMALL 2
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
/*
|
||||
* decode driven by state machine
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include <utf8proc.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
int
|
||||
utf8proc_wcwidth(wchar_t wc)
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "tmux.h"
|
||||
#include "compat.h"
|
||||
|
||||
#define isoctal(c) (((u_char)(c)) >= '0' && ((u_char)(c)) <= '7')
|
||||
#define isvisible(c,flag) \
|
||||
|
Loading…
Reference in New Issue
Block a user