diff -urN libpst_0.4.1.orig/Makefile libpst_0.4.1/Makefile --- libpst_0.4.1.orig/Makefile 2004-12-14 23:22:39.649274808 -0500 +++ libpst_0.4.1/Makefile 2004-12-14 23:24:22.831588712 -0500 @@ -1,27 +1,41 @@ +CC = gcc +INSTALL = install +MYFLAGS = -Wall +PREFIX = /usr +BINDIR = $(PREFIX)/bin +INCLUDEDIR = $(PREFIX)/include +LIBDIR = $(PREFIX)/lib + all: readpst getidblock libpst.o: libpst.c libpst.h define.h - gcc -c -Wall -Werror libpst.c -g -o libpst.o + $(CC) -c libpst.c $(MYFLAGS) $(CFLAGS) -o libpst.o libstrfunc.o: libstrfunc.c libstrfunc.h - gcc -c -Wall -Werror libstrfunc.c -g -o libstrfunc.o + $(CC) -c libstrfunc.c $(MYFLAGS) $(CFLAGS) -o libstrfunc.o debug.o: debug.c - gcc -c debug.c -Wall -Werror -g -o debug.o + $(CC) -c debug.c $(MYFLAGS) $(CFLAGS) -o debug.o readpst: readpst.c define.h libpst.o timeconv.o libstrfunc.o common.h debug.o # ccmalloc gcc -Wall -Werror readpst.c -g -o readpst libpst.o timeconv.o libstrfunc.o debug.o # gcc -Wall -Werror readpst.c -g -o readpst libpst.o timeconv.o libstrfunc.o -lefence - gcc -Wall -Werror readpst.c -g -o readpst libpst.o timeconv.o libstrfunc.o debug.o + $(CC) $(MYFLAGS) $(CFLAGS) readpst.c -o readpst libpst.o timeconv.o libstrfunc.o debug.o $(LDFLAGS) timeconv.o: timeconv.c timeconv.h common.h - gcc -c -Wall -Werror timeconv.c -g -o timeconv.o + $(CC) -c timeconv.c $(MYFLAGS) $(CFLAGS) -o timeconv.o getidblock: getidblock.c define.h libpst.o common.h debug.o - gcc -Wall -Werror getidblock.c -g -o getidblock libpst.o debug.o timeconv.o + $(CC) $(MYFLAGS) $(CFLAGS) getidblock.c -o getidblock libpst.o debug.o timeconv.o $(LDFLAGS) clean: rm -f core readpst libpst.o timeconv.o libstrfunc.o debug.o getidblock *~ rebuild: clean all +install: + $(INSTALL) -d $(DESTDIR)/$(BINDIR) $(DESTDIR)/$(INCLUDEDIR) \ + $(DESTDIR)/$(LIBDIR) + $(INSTALL) readpst getidblock $(DESTDIR)/$(BINDIR) + $(INSTALL) -m0644 libpst.h $(DESTDIR)/$(INCLUDEDIR) + $(INSTALL) -m0644 libpst.o $(DESTDIR)/$(LIBDIR) diff -urN libpst_0.4.1.orig/readpst.c libpst_0.4.1/readpst.c --- libpst_0.4.1.orig/readpst.c 2004-12-14 23:22:39.655273896 -0500 +++ libpst_0.4.1/readpst.c 2004-12-14 23:24:06.430082120 -0500 @@ -718,6 +718,7 @@ //return that value char *dir, *out_name, *index; int x; + dir = out_name = index = NULL; if (kmail_chdir != NULL && chdir(kmail_chdir)) { x = errno; DIE(("mk_kmail_dir: Cannot change to directory %s: %s\n", dir, strerror(x)));