Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
tg
Commits
50bec2d1
Commit
50bec2d1
authored
Jan 30, 2014
by
Vysheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added cygwin fixes
parent
e12d05b0
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
183 additions
and
19 deletions
+183
-19
config.h
config.h
+48
-3
config.h.in
config.h.in
+48
-3
configure
configure
+77
-9
configure.ac
configure.ac
+3
-2
interface.h
interface.h
+0
-1
main.c
main.c
+6
-0
net.c
net.c
+1
-1
No files found.
config.h
View file @
50bec2d1
...
...
@@ -4,6 +4,15 @@
/* enable libconfig */
#define ENABLE_LIBCONFIG 1
/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the `endpwent' function. */
#define HAVE_ENDPWENT 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
...
...
@@ -19,9 +28,6 @@
/* Define to 1 if you have the `edit' library (-ledit). */
/* #undef HAVE_LIBEDIT */
/* Define to 1 if you have the `execinfo' library (-lexecinfo). */
/* #undef HAVE_LIBEXECINFO */
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
...
...
@@ -34,6 +40,9 @@
/* Define to 1 if you have the <lua.h> header file. */
#define HAVE_LUA_H 1
/* Define to 1 if you have the <mach/mach.h> header file. */
/* #undef HAVE_MACH_MACH_H */
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#define HAVE_MALLOC 1
...
...
@@ -41,12 +50,24 @@
/* Define to 1 if you have the <malloc.h> header file. */
#define HAVE_MALLOC_H 1
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `memset' function. */
#define HAVE_MEMSET 1
/* Define to 1 if you have the `mkdir' function. */
#define HAVE_MKDIR 1
/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H 1
/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H 1
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#define HAVE_REALLOC 1
...
...
@@ -54,6 +75,9 @@
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the `socket' function. */
#define HAVE_SOCKET 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
...
...
@@ -72,6 +96,9 @@
/* Define to 1 if you have the `strndup' function. */
#define HAVE_STRNDUP 1
/* Define to 1 if you have the <sys/file.h> header file. */
#define HAVE_SYS_FILE_H 1
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
...
...
@@ -81,6 +108,12 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <termios.h> header file. */
#define HAVE_TERMIOS_H 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
...
...
@@ -114,6 +147,15 @@
/* use lua */
#define USE_LUA 1
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* #undef inline */
#endif
/* Define to rpl_malloc if the replacement function should be used. */
/* #undef malloc */
...
...
@@ -122,3 +164,6 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef uid_t */
config.h.in
View file @
50bec2d1
...
...
@@ -3,6 +3,15 @@
/* enable libconfig */
#undef ENABLE_LIBCONFIG
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
/* Define to 1 if you have the `endpwent' function. */
#undef HAVE_ENDPWENT
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
...
...
@@ -18,9 +27,6 @@
/* Define to 1 if you have the `edit' library (-ledit). */
#undef HAVE_LIBEDIT
/* Define to 1 if you have the `execinfo' library (-lexecinfo). */
#undef HAVE_LIBEXECINFO
/* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM
...
...
@@ -33,6 +39,9 @@
/* Define to 1 if you have the <lua.h> header file. */
#undef HAVE_LUA_H
/* Define to 1 if you have the <mach/mach.h> header file. */
#undef HAVE_MACH_MACH_H
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
to 0 otherwise. */
#undef HAVE_MALLOC
...
...
@@ -40,12 +49,24 @@
/* Define to 1 if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
/* Define to 1 if you have the `mkdir' function. */
#undef HAVE_MKDIR
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define to 1 if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */
#undef HAVE_REALLOC
...
...
@@ -53,6 +74,9 @@
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
...
...
@@ -71,6 +95,9 @@
/* Define to 1 if you have the `strndup' function. */
#undef HAVE_STRNDUP
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
...
...
@@ -80,6 +107,12 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H
/* Define to 1 if you have the `uname' function. */
#undef HAVE_UNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
...
...
@@ -113,6 +146,15 @@
/* use lua */
#undef USE_LUA
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
/* Define to rpl_malloc if the replacement function should be used. */
#undef malloc
...
...
@@ -121,3 +163,6 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
configure
View file @
50bec2d1
...
...
@@ -3306,15 +3306,11 @@ fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_lib_execinfo_backtrace
"
>
&5
$as_echo
"
$ac_cv_lib_execinfo_backtrace
"
>
&6
;
}
if
test
"x
$ac_cv_lib_execinfo_backtrace
"
=
xyes
;
then
:
cat
>>
confdefs.h
<<
_ACEOF
#define HAVE_LIBEXECINFO 1
_ACEOF
LIBS
=
"-lexecinfo
$LIBS
"
EXTRA_LIBS
=
"
${
EXTRA_LIBS
}
-lexecinfo"
;
else
CFLAGS
=
"
${
CFLAGS
}
-DNO_BACKTRACE"
;
fi
EXTRA_LIBS
=
"
${
EXTRA_LIBS
}
-lexecinfo"
;
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for rl_save_prompt in -lreadline"
>
&5
...
...
@@ -5305,7 +5301,7 @@ fi
# Checks for header files.
for
ac_header
in
fcntl.h malloc.h
stdlib.h string.h sys/socket.h unistd
.h
for
ac_header
in
fcntl.h malloc.h
netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios
.h
do
:
as_ac_Header
=
`
$as_echo
"ac_cv_header_
$ac_header
"
|
$as_tr_sh
`
ac_fn_c_check_header_mongrel
"
$LINENO
"
"
$ac_header
"
"
$as_ac_Header
"
"
$ac_includes_default
"
...
...
@@ -5331,6 +5327,78 @@ _ACEOF
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for uid_t in sys/types.h"
>
&5
$as_echo_n
"checking for uid_t in sys/types.h... "
>
&6
;
}
if
${
ac_cv_type_uid_t
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
_ACEOF
if
(
eval
"
$ac_cpp
conftest.
$ac_ext
"
)
2>&5 |
$EGREP
"uid_t"
>
/dev/null 2>&1
;
then
:
ac_cv_type_uid_t
=
yes
else
ac_cv_type_uid_t
=
no
fi
rm
-f
conftest
*
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_type_uid_t
"
>
&5
$as_echo
"
$ac_cv_type_uid_t
"
>
&6
;
}
if
test
$ac_cv_type_uid_t
=
no
;
then
$as_echo
"#define uid_t int"
>>
confdefs.h
$as_echo
"#define gid_t int"
>>
confdefs.h
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking for inline"
>
&5
$as_echo_n
"checking for inline... "
>
&6
;
}
if
${
ac_cv_c_inline
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
ac_cv_c_inline
=
no
for
ac_kw
in
inline __inline__ __inline
;
do
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
static
$ac_kw
foo_t static_foo () {return 0; }
$ac_kw
foo_t foo () {return 0; }
#endif
_ACEOF
if
ac_fn_c_try_compile
"
$LINENO
"
;
then
:
ac_cv_c_inline
=
$ac_kw
fi
rm
-f
core conftest.err conftest.
$ac_objext
conftest.
$ac_ext
test
"
$ac_cv_c_inline
"
!=
no
&&
break
done
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_c_inline
"
>
&5
$as_echo
"
$ac_cv_c_inline
"
>
&6
;
}
case
$ac_cv_c_inline
in
inline
|
yes
)
;;
*
)
case
$ac_cv_c_inline
in
no
)
ac_val
=
;;
*
)
ac_val
=
$ac_cv_c_inline
;;
esac
cat
>>
confdefs.h
<<
_ACEOF
#ifndef __cplusplus
#define inline
$ac_val
#endif
_ACEOF
;;
esac
# Checks for library functions.
for
ac_header
in
stdlib.h
...
...
@@ -5467,7 +5535,7 @@ $as_echo "#define realloc rpl_realloc" >>confdefs.h
fi
for
ac_func
in
memset
select
strdup strndup
for
ac_func
in
alarm endpwent memset memmove
mkdir
select
socket strdup strndup
uname
do
:
as_ac_var
=
`
$as_echo
"ac_cv_func_
$ac_func
"
|
$as_tr_sh
`
ac_fn_c_check_func
"
$LINENO
"
"
$ac_func
"
"
$as_ac_var
"
...
...
configure.ac
View file @
50bec2d1
...
...
@@ -24,8 +24,9 @@ AC_CHECK_FUNC([backtrace],
)
if test "x$BT" = "x" ; then
AC_CHECK_LIB([execinfo], [backtrace])
[ EXTRA_LIBS="${EXTRA_LIBS} -lexecinfo" ; ]
AC_CHECK_LIB([execinfo], [backtrace],
[ EXTRA_LIBS="${EXTRA_LIBS} -lexecinfo" ; ],
[ CFLAGS="${CFLAGS} -DNO_BACKTRACE" ; ])
fi
AC_CHECK_LIB([readline], [rl_save_prompt],
...
...
interface.h
View file @
50bec2d1
...
...
@@ -39,7 +39,6 @@ char **complete_text (char *text, int start, int end);
void
interpreter
(
char
*
line
);
void
rprintf
(
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
void
iprintf
(
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
void
logprintf
(
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
void
hexdump
(
int
*
in_ptr
,
int
*
in_end
);
...
...
main.c
View file @
50bec2d1
...
...
@@ -418,11 +418,17 @@ void args_parse (int argc, char **argv) {
}
}
#ifndef NO_BACKTRACE
void
print_backtrace
(
void
)
{
void
*
buffer
[
255
];
const
int
calls
=
backtrace
(
buffer
,
sizeof
(
buffer
)
/
sizeof
(
void
*
));
backtrace_symbols_fd
(
buffer
,
calls
,
1
);
}
#else
void
print_backtrace
(
void
)
{
printf
(
"No libexec. Backtrace disabled
\n
"
);
}
#endif
void
sig_handler
(
int
signum
)
{
set_terminal_attributes
();
...
...
net.c
View file @
50bec2d1
...
...
@@ -45,7 +45,7 @@
#include "tree.h"
#include "interface.h"
#if
defined(__MACH__) || defined(__FreeBSD__)
#if
ndef POLLRDHUP
#define POLLRDHUP 0
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment