31cb98f4dc
Changes (as taken from 16461.82.215.41.237.1185016981.squirrel@webmail.xs4all.nl): 1) On FreeBSD there was a rather embarrassing bug when sendfile was used, which manifests itself in bogus 'premature end of file' messages in the error log. This should now be fixed. 2) There were some stupid mistakes in the way in which Content-Length, and Range headers were computed and/or parsed. This had to do with the fact that size_t is 32 bit on most 32-bit platforms, but file sizes can be much bigger. 3) Mathopd would refuse to open files larger than 2 GB on Solaris or Linux. This should now be fixed, provided you follow the instructions in the Makefile. 4) The SanitizePath feature (the one that substitutes // for /, etc. in request URIs) has been retrofitted into 1.5. 5) Some cosmetic changes were made to the Makefile in 1.6. These were merged also.
65 lines
1.9 KiB
Text
65 lines
1.9 KiB
Text
--- src/Makefile.orig Fri Jul 27 15:30:54 2007
|
|
+++ src/Makefile Fri Jul 27 15:35:04 2007
|
|
@@ -1,54 +1,9 @@
|
|
-BIN = mathopd
|
|
-CC = gcc
|
|
-CFLAGS = -O -Wall
|
|
-CPPFLAGS =
|
|
-LDFLAGS =
|
|
-LIBS = -lcrypt
|
|
-PREFIX = /usr/local
|
|
-SBINDIR = $(PREFIX)/sbin
|
|
+PROG= mathopd
|
|
+SRCS=
|
|
+SRCS= base64.c cgi.c config.c core.c dump.c imap.c log.c main.c \
|
|
+ redirect.c request.c util.c stub.c sendfile.c
|
|
+BINDIR?= ${PREFIX}/sbin
|
|
+NOMAN= yes
|
|
+LDADD= -lcrypt
|
|
|
|
-# On Solaris, uncomment the following
|
|
-# CPPFLAGS = -DHAVE_CRYPT_H
|
|
-# LIBS = -lsocket -lnsl -lresolv
|
|
-
|
|
-# On Linux, uncomment the following
|
|
-# CPPFLAGS = -DHAVE_CRYPT_H
|
|
-
|
|
-# For Linux or Solaris:
|
|
-# To add support for large files (>2GB), uncomment the following.
|
|
-# You do not need this for 64-bit executables.
|
|
-# CPPFLAGS += -D_FILE_OFFSET_BITS=64
|
|
-
|
|
-OBJS = base64.o cgi.o config.o core.o dump.o imap.o log.o main.o \
|
|
- redirect.o request.o util.o stub.o $(EXTRA_OBJS)
|
|
-DEPENDS = mathopd.h Makefile
|
|
-
|
|
-# Uncomment the following if your system does not support the poll() function
|
|
-# CPPFLAGS += -DPOLL_EMULATION
|
|
-# EXTRA_OBJS += poll-emul.o
|
|
-
|
|
-# Uncomment the following if your system does not have the socklen_t type
|
|
-# CPPFLAGS += -DNEED_SOCKLEN_T
|
|
-
|
|
-# Unomment the following if your system has a working vfork() function
|
|
-# CPPFLAGS += -DHAVE_VFORK
|
|
-
|
|
-# Currently, sendfile support is available in two flavours: Linux and FreeBSD
|
|
-# Uncomment one of the following two to enable sendfile() support
|
|
-# CPPFLAGS += -DLINUX_SENDFILE
|
|
-# CPPFLAGS += -DFREEBSD_SENDFILE
|
|
-# If you define any of the SENDFILE conditionals, make sure to uncomment
|
|
-# the next line as well.
|
|
-# EXTRA_OBJS += sendfile.o
|
|
-
|
|
-all: $(BIN)
|
|
-install: $(BIN)
|
|
- install -c $(BIN) $(DESTDIR)$(SBINDIR)
|
|
-$(BIN): $(OBJS)
|
|
- $(CC) $(LDFLAGS) -o $(BIN) $(OBJS) $(LIBS)
|
|
-$(OBJS): $(DEPENDS)
|
|
-.c.o:
|
|
- $(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
|
|
-clean:
|
|
- rm -f $(BIN) $(OBJS)
|
|
-.PHONY: install clean
|
|
+.include <bsd.prog.mk>
|