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