Ported to Darwin-PPC, Freebsd-i386, Linux-Alpha/PPC/Sparc and Solaris/Sparc

Compiles cleanly on all of these (using some makefile magic on some platforms)


git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@28 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
Mark Janssen 2002-04-20 23:07:39 +00:00
parent 1518b7e0ca
commit 63a03252b0
5 changed files with 88 additions and 4 deletions

View file

@ -7,10 +7,6 @@ CFLAGS = -Wall -DHAVE_GETOPT_LONG
LDFLAGS =
INSTALLPATH = /usr/local/bin
# Solaris needs this (According to Martin Senft <martin@illicon.de>)
# CFLAGS = -I/usr/include -Wall
# LDFLAGS = -lsocket -lnsl
PROGNAME = proxytunnel
OBJ = proxytunnel.o \
base64.o \

28
Makefile.darwin Executable file
View file

@ -0,0 +1,28 @@
# Makefile for proxytunnel
#
# Please uncomment the appropriate settings
# Customized for MacOS-X (Darwin)
CC = cc
CFLAGS = -Wall -DDARWIN
LDFLAGS =
INSTALLPATH = /usr/local/bin
PROGNAME = proxytunnel
OBJ = proxytunnel.o \
base64.o \
io.o \
http.o \
basicauth.o \
messages.o \
cmdline.o
proxytunnel: $(OBJ)
$(CC) -o $(PROGNAME) $(LDFLAGS) $(OBJ)
clean:
@rm -f $(PROGNAME) $(OBJ)
install:
mkdir -p $(INSTALLPATH)
install -g root -m755 -o root $(PROGNAME) $(INSTALLPATH)/$(PROGNAME)

27
Makefile.no-gnu-getopts Executable file
View file

@ -0,0 +1,27 @@
# Makefile for proxytunnel
#
# Please uncomment the appropriate settings
CC = gcc
CFLAGS = -Wall
LDFLAGS =
INSTALLPATH = /usr/local/bin
PROGNAME = proxytunnel
OBJ = proxytunnel.o \
base64.o \
io.o \
http.o \
basicauth.o \
messages.o \
cmdline.o
proxytunnel: $(OBJ)
$(CC) -o $(PROGNAME) $(LDFLAGS) $(OBJ)
clean:
@rm -f $(PROGNAME) $(OBJ)
install:
mkdir -p $(INSTALLPATH)
install -g root -m755 -o root $(PROGNAME) $(INSTALLPATH)/$(PROGNAME)

27
Makefile.solaris Executable file
View file

@ -0,0 +1,27 @@
# Makefile for proxytunnel
#
# Please uncomment the appropriate settings
CC = gcc
CFLAGS = -Wall
LDFLAGS = -lsocket -lnsl
INSTALLPATH = /usr/local/bin
PROGNAME = proxytunnel
OBJ = proxytunnel.o \
base64.o \
io.o \
http.o \
basicauth.o \
messages.o \
cmdline.o
proxytunnel: $(OBJ)
$(CC) -o $(PROGNAME) $(LDFLAGS) $(OBJ)
clean:
@rm -f $(PROGNAME) $(OBJ)
install:
mkdir -p $(INSTALLPATH)
install -g root -m755 -o root $(PROGNAME) $(INSTALLPATH)/$(PROGNAME)

View file

@ -38,6 +38,12 @@
#include "basicauth.h"
#include "proxytunnel.h"
/* Define DARWIN if compiling on MacOS-X (Darwin), to work around some
* inconsistencies. (Darwin doesn't know socklen_t)
#ifdef DARWIN
#define socklen_t int
#endif
/* Globals */
int read_fd=0; /* The file descriptor to read from */
int write_fd=1; /* The file destriptor to write to */