Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Core
Tor
Commits
81d69f4c
Commit
81d69f4c
authored
Jan 03, 2011
by
Nick Mathewson
🎨
Browse files
Detect signed size_t and report an error at configure time.
parent
e365aee9
Changes
2
Hide whitespace changes
Inline
Side-by-side
changes/bug2337
0 → 100644
View file @
81d69f4c
o Minor bugfixes
- Detect broken platforms with a signed size_t, and refuse to
build there. Found and analyzed by doorss and rransom.
configure.in
View file @
81d69f4c
...
...
@@ -548,6 +548,23 @@ if test "$tor_cv_time_t_signed" != no; then
[Define to 1 iff time_t is signed])
fi
AC_CACHE_CHECK([whether size_t is signed], tor_cv_size_t_signed, [
AC_RUN_IFELSE(AC_LANG_SOURCE([
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
int main(int c, char**v) { if (((size_t)-1)<0) return 1; else return 0; }]),
tor_cv_size_t_signed=no, tor_cv_size_t_signed=yes, tor_cv_size_t_signed=cross)
])
if test "$tor_cv_size_t_signed" = cross; then
AC_MSG_NOTICE([Cross compiling: assuming that size_t is not signed.])
fi
if test "$tor_cv_size_t_signed" = yes; then
AC_MSG_ERROR([You have a signed size_t; that's grossly nonconformant.])
fi
AC_CHECK_SIZEOF(socklen_t, , [AC_INCLUDES_DEFAULT()
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
...
...
Write
Preview
Supports
Markdown
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