Changeset 1d69a01311e58ce6ddb007d690b4e9aa4ac08c8c
- Timestamp:
- 02/08/08 15:52:45
(5 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1202485965 +0000
- git-parent:
[234b2c6fe5e8099b7e55ae9a395d81c0dca51ec0]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1202485965 +0000
- Message:
And make it all work on OpenBSD (ld -E ? sigh...)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r91d6330 |
r1d69a01 |
|
| 30 | 30 | MODULEEXT=so |
|---|
| 31 | 31 | ;; |
|---|
| | 32 | *-*-openbsd*) |
|---|
| | 33 | PICFLAGS="-fpic" |
|---|
| | 34 | LDFLAGS="$LDFLAGS -Wl,-E" |
|---|
| | 35 | MODULELD="$CC -shared" |
|---|
| | 36 | MODULEEXT=so |
|---|
| | 37 | ;; |
|---|
| 32 | 38 | *) |
|---|
| 33 | 39 | PICFLAGS="-fpic" |
|---|
| … | … | |
| 52 | 58 | AC_CHECK_LIB(pthread, pthread_create, , ) |
|---|
| 53 | 59 | AC_CHECK_LIB(uuid, uuid_generate, , ) |
|---|
| | 60 | AC_CHECK_LIB(util, openpty, , ) |
|---|
| 54 | 61 | AC_CHECK_LIB(termcap, tputs, , ) |
|---|
| 55 | 62 | AC_CHECK_LIB(curses, clear, , ) |
|---|
| … | … | |
| 72 | 79 | |
|---|
| 73 | 80 | AC_MSG_CHECKING([libserf libs]) |
|---|
| 74 | | SERFLIBS="`apu-1-config --link-ld --libs` `apr-1-config --link-ld --libs`" |
|---|
| | 81 | SERFLIBS="`apu-1-config --link-ld --ldflags --libs` `apr-1-config --link-ld --ldflags --libs`" |
|---|
| 75 | 82 | AC_SUBST(SERFLIBS) |
|---|
| 76 | 83 | AC_MSG_RESULT([$SERFLIBS]) |
|---|
| … | … | |
| 107 | 114 | sys/resource.h pthread.h semaphore.h pwd.h stdio.h stdlib.h string.h \ |
|---|
| 108 | 115 | ctype.h unistd.h time.h sys/stat.h sys/event.h libkern/OSAtomic.h \ |
|---|
| 109 | | term.h termio.h termios.h curses.h sys/cdefs.h pwd.h) |
|---|
| | 116 | term.h termio.h termios.h curses.h sys/cdefs.h pwd.h netinet/in_systm.h \ |
|---|
| | 117 | util.h) |
|---|
| 110 | 118 | |
|---|
| 111 | 119 | AC_CACHE_CHECK([for kqueue support], ac_cv_have_kqueue, [ |
|---|
| re3c8f10 |
r1d69a01 |
|
| | 1 | #define _EVENTER_C_ |
|---|
| 1 | 2 | #include "eventer/eventer.h" |
|---|
| 2 | 3 | #include "eventer/eventer_impl.h" |
|---|
| re3c8f10 |
r1d69a01 |
|
| 72 | 72 | |
|---|
| 73 | 73 | /* This is the "chosen one" */ |
|---|
| 74 | | extern eventer_impl_t __eventer; |
|---|
| | 74 | #ifndef _EVENTER_C |
|---|
| | 75 | extern |
|---|
| | 76 | #endif |
|---|
| | 77 | eventer_impl_t __eventer; |
|---|
| 75 | 78 | |
|---|
| 76 | 79 | API_EXPORT(int) eventer_choose(const char *name); |
|---|
| ra2e53dc |
r1d69a01 |
|
| 12 | 12 | #include <fcntl.h> |
|---|
| 13 | 13 | #include <sys/ioctl.h> |
|---|
| | 14 | #ifdef HAVE_NETINET_IN_SYSTM_H |
|---|
| | 15 | #include <netinet/in_systm.h> |
|---|
| | 16 | #endif |
|---|
| 14 | 17 | #include <netinet/in.h> |
|---|
| 15 | 18 | #include <netinet/ip.h> |
|---|
| ra2e53dc |
r1d69a01 |
|
| 118 | 118 | } |
|---|
| 119 | 119 | if(!noit_conf_get_stringbuf(sec[i], "name", name, sizeof(name))) { |
|---|
| 120 | | strcpy(name, module); |
|---|
| | 120 | strlcpy(name, module, sizeof(name)); |
|---|
| 121 | 121 | } |
|---|
| 122 | 122 | if(!noit_conf_get_int(sec[i], "ancestor-or-self::node()/period", &period)) { |
|---|
| rf329034 |
r1d69a01 |
|
| 47 | 47 | #undef HAVE_TERMIO_H |
|---|
| 48 | 48 | #undef HAVE_TERMIOS_H |
|---|
| | 49 | #undef HAVE_UTIL_H |
|---|
| 49 | 50 | #undef HAVE_CURSES_H |
|---|
| 50 | 51 | #undef HAVE_DIRENT_H |
|---|
| … | … | |
| 59 | 60 | #undef HAVE_SYS_CDEFS_H |
|---|
| 60 | 61 | #undef HAVE_LIBKERN_OSATOMIC_H |
|---|
| | 62 | #undef HAVE_NETINET_IN_SYSTM_H |
|---|
| 61 | 63 | #undef HAVE_INT64_T |
|---|
| 62 | 64 | #undef HAVE_INTXX_T |
|---|
| r3f67984 |
r1d69a01 |
|
| 10 | 10 | #include <errno.h> |
|---|
| 11 | 11 | #include <sys/ioctl.h> |
|---|
| | 12 | #ifdef HAVE_TERMIOS_H |
|---|
| | 13 | #include <termios.h> |
|---|
| | 14 | #endif |
|---|
| | 15 | #ifdef HAVE_UTIL_H |
|---|
| 12 | 16 | #include <util.h> |
|---|
| | 17 | #endif |
|---|
| 13 | 18 | #include <arpa/telnet.h> |
|---|
| 14 | 19 | |
|---|
| r3f67984 |
r1d69a01 |
|
| 11 | 11 | #include "noitedit/histedit.h" |
|---|
| 12 | 12 | #include "noit_console_telnet.h" |
|---|
| | 13 | #include <stdarg.h> |
|---|
| 13 | 14 | |
|---|
| 14 | 15 | typedef struct __noit_console_closure { |
|---|
| r46304a4 |
r1d69a01 |
|
| 234 | 234 | if (getit) |
|---|
| 235 | 235 | init_termbuf(ncct); |
|---|
| 236 | | (void) sprintf((char *)slcbuf, "%c%c%c%c", |
|---|
| | 236 | (void) snprintf((char *)slcbuf, 5, "%c%c%c%c", |
|---|
| 237 | 237 | IAC, SB, TELOPT_LINEMODE, LM_SLC); |
|---|
| 238 | 238 | slcptr = slcbuf + 4; |
|---|
| … | … | |
| 273 | 273 | return(slcptr - slcbuf - 4); |
|---|
| 274 | 274 | } else { |
|---|
| 275 | | (void) sprintf((char *)slcptr, "%c%c", IAC, SE); |
|---|
| | 275 | (void) snprintf((char *)slcptr, 3, "%c%c", IAC, SE); |
|---|
| 276 | 276 | slcptr += 2; |
|---|
| 277 | 277 | len = slcptr - slcbuf; |
|---|
| r37cf7d8 |
r1d69a01 |
|
| 1 | | /* Generated by re2c 0.12.3 on Tue Feb 5 23:39:54 2008 */ |
|---|
| | 1 | /* Generated by re2c 0.12.0 on Fri Feb 8 14:52:45 2008 */ |
|---|
| 2 | 2 | #line 1 "noit_tokenizer.re" |
|---|
| 3 | 3 | #include <stdlib.h> |
|---|
| r234b2c6 |
r1d69a01 |
|
| 409 | 409 | if (el->el_term.t_loc + 3 < TC_BUFSIZE) { |
|---|
| 410 | 410 | /* XXX strcpy is safe */ |
|---|
| 411 | | (void) strcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], |
|---|
| 412 | | cap); |
|---|
| | 411 | (void) strlcpy(*str = &el->el_term.t_buf[el->el_term.t_loc], |
|---|
| | 412 | cap, TC_BUFSIZE - el->el_term.t_loc); |
|---|
| 413 | 413 | el->el_term.t_loc += clen + 1; /* one for \0 */ |
|---|
| 414 | 414 | return; |
|---|