add an option to use sig{set,long}jmp and default it to on for linux systems

This commit is contained in:
Mike Frysinger 2009-03-06 02:41:40 +00:00
parent e670149ab9
commit 417a3d26a0
2 changed files with 9 additions and 0 deletions

View File

@ -284,6 +284,7 @@ There's a BIG swamp lurking where network code of any sort lives.
#undef HAVE_SYSINFO #undef HAVE_SYSINFO
#undef HAVE_SELECT_H #undef HAVE_SELECT_H
#undef HAVE_TTYENT_H #undef HAVE_TTYENT_H
#define HAVE_SIGSETJMP
#define HAVE_SOCKLEN_T #define HAVE_SOCKLEN_T
#endif /* linux */ #endif /* linux */

View File

@ -102,6 +102,14 @@
#define socklen_t int #define socklen_t int
#endif #endif
#ifdef HAVE_SIGSETJMP
#define jmp_buf sigjmp_buf
#undef setjmp
#define setjmp(buf) sigsetjmp(buf,1)
#undef longjmp
#define longjmp siglongjmp
#endif
struct host_poop { struct host_poop {
char name[MAXHOSTNAMELEN]; /* dns name */ char name[MAXHOSTNAMELEN]; /* dns name */
char addrs[8][24]; /* ascii-format IP addresses */ char addrs[8][24]; /* ascii-format IP addresses */