Changeset 0b1d2f2e094f32ac6912ecb9d3d2189fe811c7da
- Timestamp:
- 05/04/09 14:05:03
(4 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1241445903 +0000
- git-parent:
[e2900c8ac1c9b41eea65098644ea4c550c730f8b]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1241445903 +0000
- Message:
addresses a lot of warnings. gcc still complains about stuff in xpath stuff, doesn't look like our code though, refs #34
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9a3bb66 |
r0b1d2f2 |
|
| 309 | 309 | AC_CHECK_HEADERS(sys/file.h sys/types.h dirent.h sys/param.h fcntl.h errno.h limits.h \ |
|---|
| 310 | 310 | sys/resource.h pthread.h semaphore.h pwd.h stdio.h stdlib.h string.h \ |
|---|
| 311 | | ctype.h unistd.h time.h sys/stat.h sys/event.h libkern/OSAtomic.h \ |
|---|
| | 311 | ctype.h unistd.h time.h pty.h sys/stat.h sys/event.h libkern/OSAtomic.h \ |
|---|
| 312 | 312 | term.h termio.h termios.h curses.h sys/cdefs.h grp.h netinet/in_systm.h \ |
|---|
| 313 | 313 | sys/ioctl_compat.h sys/filio.h util.h sys/time.h sys/mman.h \ |
|---|
| rb821ef6 |
r0b1d2f2 |
|
| 217 | 217 | |
|---|
| 218 | 218 | /* switch to / */ |
|---|
| 219 | | chdir("/"); |
|---|
| | 219 | if(chdir("/") != 0) { |
|---|
| | 220 | noitL(noit_error, "Failed chdir(\"/\"): %s\n", strerror(errno)); |
|---|
| | 221 | return -1; |
|---|
| | 222 | } |
|---|
| 220 | 223 | |
|---|
| 221 | 224 | signal(SIGCHLD, external_sigchld); |
|---|
| r4c742f5 |
r0b1d2f2 |
|
| 150 | 150 | master_config = new_config; |
|---|
| 151 | 151 | xpath_ctxt = xmlXPathNewContext(master_config); |
|---|
| 152 | | if(path != master_config_file) realpath(path, master_config_file); |
|---|
| | 152 | if(path != master_config_file) |
|---|
| | 153 | if(realpath(path, master_config_file) != 0) |
|---|
| | 154 | noitL(noit_error, "realpath failed: %s\n", strerror(errno)); |
|---|
| 153 | 155 | noit_conf_mark_changed(); |
|---|
| 154 | 156 | return 0; |
|---|
| rc207a54 |
r0b1d2f2 |
|
| 6 | 6 | #include "noit_defines.h" |
|---|
| 7 | 7 | |
|---|
| | 8 | #include <assert.h> |
|---|
| 8 | 9 | #include <stdio.h> |
|---|
| 9 | 10 | #include <unistd.h> |
|---|
| … | … | |
| 421 | 422 | } |
|---|
| 422 | 423 | else { |
|---|
| 423 | | write(ncct->pty_slave, sbuf, len); |
|---|
| | 424 | int written; |
|---|
| | 425 | written = write(ncct->pty_slave, sbuf, len); |
|---|
| | 426 | if(written <= 0) goto socket_error; |
|---|
| | 427 | assert(written == len); |
|---|
| 424 | 428 | } |
|---|
| 425 | 429 | } |
|---|
| rc207a54 |
r0b1d2f2 |
|
| 193 | 193 | int i, j, count; |
|---|
| 194 | 194 | char *name, *range; |
|---|
| 195 | | char **nargv, **expanded; |
|---|
| | 195 | char **nargv, **expanded = NULL; |
|---|
| 196 | 196 | const char *err; |
|---|
| 197 | 197 | int problems = 0; |
|---|
| r3d709f8 |
r0b1d2f2 |
|
| 1672 | 1672 | void |
|---|
| 1673 | 1673 | ptyflush(noit_console_closure_t ncct) { |
|---|
| | 1674 | int written; |
|---|
| 1674 | 1675 | if(ncct->telnet->_pty_fill == 0) return; |
|---|
| 1675 | | write(ncct->pty_slave, ncct->telnet->_pty_buf, ncct->telnet->_pty_fill); |
|---|
| | 1676 | written = write(ncct->pty_slave, ncct->telnet->_pty_buf, |
|---|
| | 1677 | ncct->telnet->_pty_fill); |
|---|
| | 1678 | if(written != ncct->telnet->_pty_fill) { |
|---|
| | 1679 | /* We can't do anything useful here... just cope. */ |
|---|
| | 1680 | } |
|---|
| 1676 | 1681 | ncct->telnet->_pty_fill = 0; |
|---|
| 1677 | 1682 | } |
|---|
| rd074a94 |
r0b1d2f2 |
|
| 1 | 1 | #include "noit_defines.h" |
|---|
| 2 | 2 | |
|---|
| | 3 | #include <assert.h> |
|---|
| 3 | 4 | #include <stdio.h> |
|---|
| 4 | 5 | #include <stdlib.h> |
|---|
| … | … | |
| 41 | 42 | printf("Usage for %s:\n", progname); |
|---|
| 42 | 43 | #ifdef NOITD_USAGE |
|---|
| 43 | | write(STDOUT_FILENO, NOITD_USAGE, sizeof(NOITD_USAGE)-1); |
|---|
| | 44 | assert(write(STDOUT_FILENO, |
|---|
| | 45 | NOITD_USAGE, |
|---|
| | 46 | sizeof(NOITD_USAGE)-1) == sizeof(NOITD_USAGE)-1); |
|---|
| 44 | 47 | #else |
|---|
| 45 | 48 | printf("\nError in usage, build problem.\n"); |
|---|
| … | … | |
| 276 | 279 | setup_mmap(); |
|---|
| 277 | 280 | |
|---|
| 278 | | chdir("/"); |
|---|
| | 281 | if(chdir("/") != 0) { |
|---|
| | 282 | noitL(noit_stderr, "Failed chdir(\"/\"): %s\n", strerror(errno)); |
|---|
| | 283 | exit(-1); |
|---|
| | 284 | } |
|---|
| 279 | 285 | if(foreground) return child_main(); |
|---|
| 280 | 286 | |
|---|
| ra7ed2df |
r0b1d2f2 |
|
| 653 | 653 | nnode->dispatch = f; |
|---|
| 654 | 654 | nnode->next = onlookers; |
|---|
| 655 | | while(noit_atomic_casptr((void **)&onlookers, nnode, nnode->next) != nnode->next) |
|---|
| | 655 | while(noit_atomic_casptr((void **)&onlookers, nnode, nnode->next) != (vpsized_int)nnode->next) |
|---|
| 656 | 656 | nnode->next = onlookers; |
|---|
| 657 | 657 | } |
|---|
| r6453a67 |
r0b1d2f2 |
|
| 1 | 1 | #include "noit_defines.h" |
|---|
| 2 | 2 | |
|---|
| | 3 | #include <assert.h> |
|---|
| 3 | 4 | #include <stdio.h> |
|---|
| 4 | 5 | #include <stdlib.h> |
|---|
| … | … | |
| 33 | 34 | printf("Usage for %s:\n", progname); |
|---|
| 34 | 35 | #ifdef STRATCOND_USAGE |
|---|
| 35 | | write(STDOUT_FILENO, STRATCOND_USAGE, sizeof(STRATCOND_USAGE)-1); |
|---|
| | 36 | assert(write(STDOUT_FILENO, |
|---|
| | 37 | STRATCOND_USAGE, |
|---|
| | 38 | sizeof(STRATCOND_USAGE)-1) == sizeof(STRATCOND_USAGE)-1); |
|---|
| 36 | 39 | #else |
|---|
| 37 | 40 | printf("\nError in usage, build problem.\n"); |
|---|
| … | … | |
| 97 | 100 | parse_clargs(argc, argv); |
|---|
| 98 | 101 | |
|---|
| 99 | | chdir("/"); |
|---|
| | 102 | if(chdir("/") != 0) { |
|---|
| | 103 | fprintf(stderr, "cannot chdir(\"/\"): %s\n", strerror(errno)); |
|---|
| | 104 | exit(2); |
|---|
| | 105 | } |
|---|
| 100 | 106 | if(!foreground) { |
|---|
| 101 | 107 | close(STDIN_FILENO); |
|---|
| rdf5a719 |
r0b1d2f2 |
|
| 36 | 36 | |
|---|
| 37 | 37 | #if (SIZEOF_VOID_P == 4) |
|---|
| 38 | | #define noit_atomic_casptr(a,b,c) noit_atomic_cas32((a),(void *)(b),(void *)(c)) |
|---|
| | 38 | #define noit_atomic_casptr(a,b,c) noit_atomic_cas32((vpsized_int *)(a),(vpsized_int)(void *)(b),(vpsized_int)(void *)(c)) |
|---|
| 39 | 39 | #elif (SIZEOF_VOID_P == 8) |
|---|
| 40 | | #define noit_atomic_casptr(a,b,c) noit_atomic_cas64((a),(void *)(b),(void *)(c)) |
|---|
| | 40 | #define noit_atomic_casptr(a,b,c) noit_atomic_cas64((vpsized_int *)(a),(vpsized_int)(void *)(b),(vpsized_int)(void *)(c)) |
|---|
| 41 | 41 | #else |
|---|
| 42 | 42 | #error unsupported pointer width |
|---|