You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@hyperreal.org on 1999/02/26 19:59:00 UTC
cvs commit: apache-apr/apr/test Makefile.beos testfile.c
rbb 99/02/26 10:58:59
Modified: apr/test testfile.c
Added: apr/test Makefile.beos
Log:
New code for BeOS testing of apr. Mostly minor changes that are a good idea
for any OS. Except for #includes, these changes will all go away once the
rest of the abstraction is finished. Also a new Makefile for the BeOS. This
is temporary until I figure out autoconf well enough to have the Makefiles
generated for us.
Submitted by: David Reid
Revision Changes Path
1.4 +9 -2 apache-apr/apr/test/testfile.c
Index: testfile.c
===================================================================
RCS file: /home/cvs/apache-apr/apr/test/testfile.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- testfile.c 1999/02/25 19:48:57 1.3
+++ testfile.c 1999/02/26 18:58:59 1.4
@@ -58,8 +58,11 @@
#include "apr_general.h"
#include "errno.h"
#include <stdio.h>
+#ifdef BEOS
+#include <unistd.h>
+#endif
-void main()
+int main()
{
apr_file_t *thefile = NULL;
apr_status_t status = 0;
@@ -109,8 +112,11 @@
}
fprintf(stdout, "Moving to start of file.......");
-
+#ifdef BEOS
+ if (lseek(thefile->filedes, 0, SEEK_SET) != 0) {
+#else
if (lseek(thefile->filedes, SEEK_SET, 0) != 0) {
+#endif
perror("couldn't seek to beginning of file.");
exit(-1);
}
@@ -143,4 +149,5 @@
else {
fprintf(stdout, "OK\n");
}
+ return 1;
}
1.1 apache-apr/apr/test/Makefile.beos
Index: Makefile.beos
===================================================================
##
## Apache Makefile, automatically generated by Configure script.
## Hand-edited changes will be lost if the Configure script is re-run.
## Sources: - ../Makefile.config (via Configuration.apaci)
## - ./Makefile.tmpl
##
##
## Inherited Makefile options from Configure script
## (Begin of automatically generated section)
##
SRCDIR=..
EXTRA_CFLAGS=-g -Wall
EXTRA_LDFLAGS=
EXTRA_LIBS= -L../file_io -lfile
EXTRA_INCLUDES=
EXTRA_DEPS=
OSDIR=
INCDIR=../../include
INCLUDES0=-I $(INCDIR)
SHELL=/bin/sh
CC=gcc
CPP=gcc -E
TARGET=
OPTIM=
CFLAGS_SHLIB=-nostart
LD_SHLIB=ld
LDFLAGS_SHLIB=-Bshareable
LDFLAGS_SHLIB_EXPORT=-nostart
CFLAGS1= -DBEOS -DUSE_HSREGEX
INCLUDES1=
LIBS_SHLIB=
LDFLAGS1=
MFLAGS_STATIC=--no-print-directory
REGLIB=regex/libregex.a
RANLIB=ranlib
LIBS1=
##
## (End of automatically generated section)
##
CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
LIBS=$(EXTRA_LIBS) $(LIBS1)
INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
OBJS= testfile.o \
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(LIBS) $<
testfile:
$(CC) testfile.c $(INCLUDES) $(CFLAGS) $(LIBS) $<
clean:
rm -f *.o $(LIB)
distclean: clean
-rm -f Makefile
# We really don't expect end users to use this rule. It works only with
# gcc, and rebuilds Makefile.tmpl. You have to re-run Configure after
# using it.
depend:
cp Makefile.tmpl Makefile.tmpl.bak \
&& sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
&& gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
&& sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
> Makefile.tmpl \
&& rm Makefile.new
#Dependencies
$(OBJS): Makefile
# DO NOT REMOVE
alloc.o: open.c