mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
off_t may be long long; more corrections for non Linux; configure.ac
This commit is contained in:
parent
6361eec4e9
commit
2dfd7ffcfb
8 changed files with 18 additions and 10 deletions
4
CHANGES
4
CHANGES
|
@ -249,6 +249,10 @@ corrections:
|
||||||
|
|
||||||
Dual type addresses terminated when they were idle for EOF timeout time
|
Dual type addresses terminated when they were idle for EOF timeout time
|
||||||
|
|
||||||
|
off_t may be long long
|
||||||
|
more corrections for non Linux
|
||||||
|
configure.ac
|
||||||
|
|
||||||
porting:
|
porting:
|
||||||
Red Hat issue 1020203: configure checks fail with some compilers.
|
Red Hat issue 1020203: configure checks fail with some compilers.
|
||||||
Use case: clang
|
Use case: clang
|
||||||
|
|
|
@ -162,7 +162,7 @@ socat.tar.bz2: socat.tar
|
||||||
VERSION = `sed 's/"//g' VERSION`
|
VERSION = `sed 's/"//g' VERSION`
|
||||||
TARDIR = socat-$(VERSION)
|
TARDIR = socat-$(VERSION)
|
||||||
socat.tar: configure.in configure Makefile.in config.h.in install-sh VERSION $(CFILES) $(HFILES) $(DOCFILES) $(SHFILES) $(OSFILES) $(TESTFILES) \
|
socat.tar: configure.in configure Makefile.in config.h.in install-sh VERSION $(CFILES) $(HFILES) $(DOCFILES) $(SHFILES) $(OSFILES) $(TESTFILES) \
|
||||||
confiugre.ac
|
configure.ac
|
||||||
if [ ! -d $(TARDIR) ]; then mkdir $(TARDIR); fi
|
if [ ! -d $(TARDIR) ]; then mkdir $(TARDIR); fi
|
||||||
tar cf - $+ |(cd $(TARDIR); tar xf -)
|
tar cf - $+ |(cd $(TARDIR); tar xf -)
|
||||||
tar cvf socat.tar $(TARDIR)
|
tar cvf socat.tar $(TARDIR)
|
||||||
|
|
4
compat.h
4
compat.h
|
@ -288,6 +288,8 @@ typedef int sig_atomic_t;
|
||||||
# define F_off "%""d"
|
# define F_off "%""d"
|
||||||
# elif HAVE_BASIC_OFF_T==5
|
# elif HAVE_BASIC_OFF_T==5
|
||||||
# define F_off "%ld"
|
# define F_off "%ld"
|
||||||
|
# elif HAVE_BASIC_OFF_T==7
|
||||||
|
# define F_off "%Ld"
|
||||||
# else
|
# else
|
||||||
#error "HAVE_BASIC_OFF_T is out of range:" HAVE_BASIC_OFF_T
|
#error "HAVE_BASIC_OFF_T is out of range:" HAVE_BASIC_OFF_T
|
||||||
# endif
|
# endif
|
||||||
|
@ -344,7 +346,7 @@ typedef int sig_atomic_t;
|
||||||
# elif HAVE_BASIC_DEV_T==8
|
# elif HAVE_BASIC_DEV_T==8
|
||||||
#define F_dev "%Lu"
|
#define F_dev "%Lu"
|
||||||
# else
|
# else
|
||||||
#error "HAVE_TYPEOF_ST_DEV is out of range:" HAVE_TYPEOF_ST_DEV
|
#error "HAVE_BASIC_DEV_T is out of range:" HAVE_BASIC_DEV_T
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
configure.ac
|
configure.in
|
10
test.sh
10
test.sh
|
@ -6827,7 +6827,7 @@ tdiff="$td/test$N.diff"
|
||||||
# if they are scanned incorrectly, socat will see an "unknown option"
|
# if they are scanned incorrectly, socat will see an "unknown option"
|
||||||
dain='(,)[,]{,}","([),])hugo'
|
dain='(,)[,]{,}","([),])hugo'
|
||||||
daout='(,)[,]{,},([),])hugo'
|
daout='(,)[,]{,},([),])hugo'
|
||||||
"$TRACE $SOCAT" $opts -u "exec:echo $dain" - >"$tf" 2>"$te"
|
$TRACE $SOCAT $opts -u "exec:echo $dain" - >"$tf" 2>"$te"
|
||||||
rc=$?
|
rc=$?
|
||||||
echo "$daout" |diff "$tf" - >"$tdiff"
|
echo "$daout" |diff "$tf" - >"$tdiff"
|
||||||
if [ "$rc" -ne 0 ]; then
|
if [ "$rc" -ne 0 ]; then
|
||||||
|
@ -10077,7 +10077,7 @@ if [ "$tcp" != ',' ]; then
|
||||||
tca="$tca:$tcp"
|
tca="$tca:$tcp"
|
||||||
fi
|
fi
|
||||||
#CMD0="$TRACE $SOCAT $opts -u $KEYW-LISTEN:$tsa1 system:\"export -p\""
|
#CMD0="$TRACE $SOCAT $opts -u $KEYW-LISTEN:$tsa1 system:\"export -p\""
|
||||||
CMD0="$TRACE $SOCAT $opts -u -lpsocat $KEYW-LISTEN:$tsa1 system:\"echo SOCAT_SOCKADDR=\\\$TRACE $SOCAT_SOCKADDR; echo SOCAT_PEERADDR=\\\$TRACE $SOCAT_PEERADDR; echo SOCAT_SOCKPORT=\\\$TRACE $SOCAT_SOCKPORT; echo SOCAT_PEERPORT=\\\$TRACE $SOCAT_PEERPORT; sleep 1\""
|
CMD0="$TRACE $SOCAT $opts -u -lpsocat $KEYW-LISTEN:$tsa1 system:\"echo SOCAT_SOCKADDR=\\\$SOCAT_SOCKADDR; echo SOCAT_PEERADDR=\\\$SOCAT_PEERADDR; echo SOCAT_SOCKPORT=\\\$SOCAT_SOCKPORT; echo SOCAT_PEERPORT=\\\$SOCAT_PEERPORT; sleep 1\""
|
||||||
CMD1="$TRACE $SOCAT $opts -u - $KEYW-CONNECT:$tsa,bind=$tca"
|
CMD1="$TRACE $SOCAT $opts -u - $KEYW-CONNECT:$tsa,bind=$tca"
|
||||||
printf "test $F_n $TEST... " $N
|
printf "test $F_n $TEST... " $N
|
||||||
eval "$CMD0 2>\"${te}0\" >\"$tf\" &"
|
eval "$CMD0 2>\"${te}0\" >\"$tf\" &"
|
||||||
|
@ -10177,7 +10177,7 @@ case "X$IPPORT" in
|
||||||
tsa="$tra"
|
tsa="$tra"
|
||||||
esac
|
esac
|
||||||
#CMD0="$TRACE $SOCAT $opts -u $KEYW-RECVFROM:$tra,reuseaddr,$SCM_RECV system:\"export -p\""
|
#CMD0="$TRACE $SOCAT $opts -u $KEYW-RECVFROM:$tra,reuseaddr,$SCM_RECV system:\"export -p\""
|
||||||
CMD0="$TRACE $SOCAT $opts -u -lpsocat $KEYW-RECVFROM:$tra,reuseaddr,$SCM_RECV system:\"echo \\\$TRACE $SOCAT_$SCM_ENVNAME\""
|
CMD0="$TRACE $SOCAT $opts -u -lpsocat $KEYW-RECVFROM:$tra,reuseaddr,$SCM_RECV system:\"echo \\\$SOCAT_$SCM_ENVNAME\""
|
||||||
CMD1="$TRACE $SOCAT $opts -u - $KEYW-SENDTO:$tsa,$SCM_ENABLE"
|
CMD1="$TRACE $SOCAT $opts -u - $KEYW-SENDTO:$tsa,$SCM_ENABLE"
|
||||||
printf "test $F_n $TEST... " $N
|
printf "test $F_n $TEST... " $N
|
||||||
# is this option supported?
|
# is this option supported?
|
||||||
|
@ -10203,7 +10203,7 @@ if [ "$rc1" -ne 0 ]; then
|
||||||
cat "${te}1"
|
cat "${te}1"
|
||||||
numCANT=$((numCANT+1))
|
numCANT=$((numCANT+1))
|
||||||
#elif ! egrep "^export SOCAT_$SCM_ENVNAME=[\"']?$SCM_VALUE[\"']?\$" ${tf} >/dev/null; then
|
#elif ! egrep "^export SOCAT_$SCM_ENVNAME=[\"']?$SCM_VALUE[\"']?\$" ${tf} >/dev/null; then
|
||||||
#elif ! eval echo "$TRACE $SOCAT_\$SCM_VALUE" |diff - "${tf}" >/dev/null; then
|
#elif ! eval echo "$SOCAT_\$SCM_VALUE" |diff - "${tf}" >/dev/null; then
|
||||||
elif ! expr "$(cat "$tf")" : "$(eval echo "\$SCM_VALUE")" >/dev/null; then
|
elif ! expr "$(cat "$tf")" : "$(eval echo "\$SCM_VALUE")" >/dev/null; then
|
||||||
$PRINTF "$FAILED\n"
|
$PRINTF "$FAILED\n"
|
||||||
echo "$CMD0 &"
|
echo "$CMD0 &"
|
||||||
|
@ -11289,7 +11289,7 @@ NAME=${EXEC}1BI_CAT_OD_HALFCLOSE_$COMMNAME
|
||||||
case "$TESTS" in
|
case "$TESTS" in
|
||||||
*%$N%*|*%functions%*|*%chain%*|*%$exec%*|*%${exec}1%*|*%$NAME%*)
|
*%$N%*|*%functions%*|*%chain%*|*%$exec%*|*%${exec}1%*|*%$NAME%*)
|
||||||
TEST="$NAME: ${exec}1 in birectional chain, both directions ($commname)"
|
TEST="$NAME: ${exec}1 in birectional chain, both directions ($commname)"
|
||||||
testod "$N" "$TEST" "STDIO" "${EXEC}1:$TRACE $SOCAT -u - -%${EXEC}1:$OD_C|PIPE" "$opts -c$c" "$val_t"
|
testod "$N" "$TEST" "STDIO" "${EXEC}1:$SOCAT -u - -%${EXEC}1:$OD_C|PIPE" "$opts -c$c" "$val_t"
|
||||||
esac
|
esac
|
||||||
N=$((N+1))
|
N=$((N+1))
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -237,7 +237,7 @@ int _xioopen_listen(struct single *xfd, int xioflags, struct sockaddr *us, sockl
|
||||||
Notice1("listening on %s", sockaddr_info(us, uslen, lisname, sizeof(lisname)));
|
Notice1("listening on %s", sockaddr_info(us, uslen, lisname, sizeof(lisname)));
|
||||||
ps = Accept(xfd->rfd, (struct sockaddr *)&sa, &salen);
|
ps = Accept(xfd->rfd, (struct sockaddr *)&sa, &salen);
|
||||||
if (ps >= 0) {
|
if (ps >= 0) {
|
||||||
/*0 Info4("accept(%d, %p, {"F_socklen"}) -> %d", xfd->fd1, &sa, salen, ps);*/
|
/*0 Info4("accept(%d, %p, {"F_socklen"}) -> %d", xfd->rfd, &sa, salen, ps);*/
|
||||||
break; /* success, break out of loop */
|
break; /* success, break out of loop */
|
||||||
}
|
}
|
||||||
if (errno == EINTR) {
|
if (errno == EINTR) {
|
||||||
|
|
2
xio.h
2
xio.h
|
@ -576,6 +576,8 @@ union integral {
|
||||||
# define u_off u_int
|
# define u_off u_int
|
||||||
#elif HAVE_BASIC_OFF_T==5
|
#elif HAVE_BASIC_OFF_T==5
|
||||||
# define u_off u_long
|
# define u_off u_long
|
||||||
|
#elif HAVE_BASIC_OFF_T==7
|
||||||
|
# define u_off u_longlong
|
||||||
#else
|
#else
|
||||||
# error "unexpected size of off_t, please report this as bug"
|
# error "unexpected size of off_t, please report this as bug"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -171,7 +171,7 @@ int xioshutdown(xiofile_t *sock, int how) {
|
||||||
fd, strerror(errno));
|
fd, strerror(errno));
|
||||||
}
|
}
|
||||||
sock->stream.eof = 2;
|
sock->stream.eof = 2;
|
||||||
sock->stream.fd1 = -1;
|
sock->stream.rfd = -1;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif /* _WITH_SOCKET */
|
#endif /* _WITH_SOCKET */
|
||||||
|
|
Loading…
Reference in a new issue