mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 01:48:47 +00:00
Add compat/fparseln() for non-BSD systems
Linux and friends don't natively have fparseln() so add it to compat/ and ensure autotools can pick it up.
This commit is contained in:
parent
a131b82e95
commit
92997b781a
@ -213,6 +213,9 @@ endif
|
|||||||
if NO_FGETLN
|
if NO_FGETLN
|
||||||
nodist_tmux_SOURCES += compat/fgetln.c
|
nodist_tmux_SOURCES += compat/fgetln.c
|
||||||
endif
|
endif
|
||||||
|
if NO_FPARSELN
|
||||||
|
nodist_tmux_SOURCES += compat/fparseln.c
|
||||||
|
endif
|
||||||
if NO_GETOPT
|
if NO_GETOPT
|
||||||
nodist_tmux_SOURCES += compat/getopt.c
|
nodist_tmux_SOURCES += compat/getopt.c
|
||||||
endif
|
endif
|
||||||
|
1
cfg.c
1
cfg.c
@ -23,7 +23,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <util.h>
|
|
||||||
|
|
||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
|
4
compat.h
4
compat.h
@ -239,6 +239,10 @@ int vasprintf(char **, const char *, va_list);
|
|||||||
char *fgetln(FILE *, size_t *);
|
char *fgetln(FILE *, size_t *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_FPARSELN
|
||||||
|
char *fparseln(FILE *, size_t *, size_t *, const char *, int);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SETENV
|
#ifndef HAVE_SETENV
|
||||||
/* setenv.c */
|
/* setenv.c */
|
||||||
int setenv(const char *, const char *, int);
|
int setenv(const char *, const char *, int);
|
||||||
|
@ -295,6 +295,13 @@ if test "x$found_fgetln" = xyes; then
|
|||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(NO_FGETLN, [test "x$found_fgetln" = xno])
|
AM_CONDITIONAL(NO_FGETLN, [test "x$found_fgetln" = xno])
|
||||||
|
|
||||||
|
# Look for fparseln, compat/fparseln.c used if missing.
|
||||||
|
AC_CHECK_FUNC(fparseln, found_fparseln=yes, found_fparseln=no)
|
||||||
|
if test "x$found_fparseln" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_FPARSELN)
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(NO_FPARSELN, [test "x$found_fparseln" = xno])
|
||||||
|
|
||||||
# Look for strcasestr, compat/strcasestr.c used if missing.
|
# Look for strcasestr, compat/strcasestr.c used if missing.
|
||||||
AC_CHECK_FUNC(strcasestr, found_strcasestr=yes, found_strcasestr=no)
|
AC_CHECK_FUNC(strcasestr, found_strcasestr=yes, found_strcasestr=no)
|
||||||
if test "x$found_strcasestr" = xyes; then
|
if test "x$found_strcasestr" = xyes; then
|
||||||
|
Loading…
Reference in New Issue
Block a user