diff options
author | dscho <dscho> | 2003-02-09 18:58:06 +0000 |
---|---|---|
committer | dscho <dscho> | 2003-02-09 18:58:06 +0000 |
commit | 0552ea2e6eb0bbf786559a1f8b803e8ae0600d53 (patch) | |
tree | 828de320a34f8922cc4367a8ac1a9781a5e79eed | |
parent | 722577d8bac9562bec5a0e632e7d7ccab2470a05 (diff) | |
download | libvncserver-0552ea2e6eb0bbf786559a1f8b803e8ae0600d53.zip libvncserver-0552ea2e6eb0bbf786559a1f8b803e8ae0600d53.tar.gz |
support for OS X is better now
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | examples/Makefile.am | 1 | ||||
-rw-r--r-- | examples/mac.c | 2 | ||||
-rw-r--r-- | vncterm/Makefile.am | 2 | ||||
-rw-r--r-- | vncterm/VNCommand.c | 19 |
5 files changed, 16 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index b34506d..3be2cc2 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,7 @@ AC_C_INLINE AC_C_BIGENDIAN AC_TYPE_SIZE_T AC_HEADER_TIME +AC_HEADER_SYS_WAIT AC_TYPE_SOCKLEN_T AC_CREATE_STDINT_H(include/rfbint.h) diff --git a/examples/Makefile.am b/examples/Makefile.am index 5a76ecf..6875c21 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -4,6 +4,7 @@ endif if OSX MAC=mac +mac_LDFLAGS=-framework ApplicationServices -framework Carbon -framework IOKit endif noinst_HEADERS=radon.h diff --git a/examples/mac.c b/examples/mac.c index eec4bcc..195e58f 100644 --- a/examples/mac.c +++ b/examples/mac.c @@ -27,8 +27,6 @@ * */ -#define LOCAL_CONTROL - #ifdef LOCAL_CONTROL #include "1instance.c" #endif diff --git a/vncterm/Makefile.am b/vncterm/Makefile.am index cad88a2..d049f6b 100644 --- a/vncterm/Makefile.am +++ b/vncterm/Makefile.am @@ -1,6 +1,6 @@ CONSOLE_SRCS=VNConsole.c -noinst_HEADERS=VNConsole.h +noinst_HEADERS=VNConsole.h vga.h LDADD=-L.. -lvncserver INCLUDES=-I. -I../include diff --git a/vncterm/VNCommand.c b/vncterm/VNCommand.c index 1e86fe6..694f401 100644 --- a/vncterm/VNCommand.c +++ b/vncterm/VNCommand.c @@ -1,11 +1,18 @@ -#include <stdio.h> -#include <stdlib.h> +#include "VNConsole.h" +#include "vga.h" +#ifdef HAVE_FCNTL_H #include <fcntl.h> +#endif +#ifdef HAVE_SYS_TIME_H #include <sys/time.h> +#endif +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif +#ifdef HAVE_SYS_WAIT_H +#include <sys/wait.h> +#endif #include <errno.h> -#include "VNConsole.h" -#include "vga.h" int main(int argc, char **argv) @@ -45,7 +52,7 @@ int main(int argc, char **argv) char buffer[1024]; fd_set fs,fs1/*,ifs,ifs1*/; struct timeval tv,tv1; - int i,c=1,num_fds,max_fd=out[0]; + int i,c=1,num_fds,max_fd=out[0],status; FILE *input_pipe; vncConsolePtr console=vcGetConsole(&serverArgc,argv,80,25,&vgaFont,FALSE); if(interactive) @@ -61,7 +68,7 @@ int main(int argc, char **argv) input_pipe=fdopen(in[1],"w"); setbuf(input_pipe,NULL); - while(c || getpgid(pid)>=0) { + while(c || waitpid(pid,&status,WNOHANG)==0) { /* event loop */ vcProcessEvents(console); |