summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-03-29 22:56:16 +0000
committerLennart Poettering <lennart@poettering.net>2004-03-29 22:56:16 +0000
commit9b2ad3c23def89c7d4195d641a433878d9329660 (patch)
treef9efc108b1f80d25140a9e57d732551ca1f8c2de /src
parent9115735709c570347236bccbe34ddc8fe6e6e8dc (diff)
autoconf stuff
git-svn-id: file:///home/lennart/svn/public/fusedav/trunk@5 e35a362c-bbd6-0310-a59f-a4efcb1729c4
Diffstat (limited to 'src')
-rw-r--r--src/Makefile13
-rw-r--r--src/Makefile.am28
-rw-r--r--src/filecache.c2
-rw-r--r--src/session.c3
4 files changed, 30 insertions, 16 deletions
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index e0dca3b..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-CC=gcc
-CFLAGS=-g -Wall -pipe -O0 -I/usr/include/neon -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -ansi
-LIBS=/usr/lib/libfuse.a -lpthread -lneon
-
-all: fusedav
-
-fusedav: fusedav.o statcache.o filecache.o session.o openssl-thread.o
- $(CC) -o $@ $^ $(LIBS)
-
-clean:
- rm -f *.o fusedav
-
-.PHONY: clean all
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..0221fc5
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,28 @@
+# $Id$
+
+# This file is part of fusedav.
+#
+# fusedav is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# fusedav is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with fusedav; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+
+bin_PROGRAMS=fusedav
+
+fusedav_SOURCES=fusedav.c fusedav.h \
+ statcache.c statcache.h \
+ filecache.c filecache.h \
+ session.c session.h \
+ openssl-thread.c openssl-thread.h
+
+fusedav_CFLAGS = $(AM_CFLAGS) -D_GNU_SOURCE $
+fusedav_LDADD = -lpthread $(NEON_LIBS) $(FUSE_LIBS)
diff --git a/src/filecache.c b/src/filecache.c
index 429385d..d4d3a26 100644
--- a/src/filecache.c
+++ b/src/filecache.c
@@ -137,7 +137,7 @@ void* file_cache_open(const char *path, int flags) {
struct file_info *fi;
char tempfile[PATH_MAX];
char *length = NULL;
- ne_request *req;
+ ne_request *req = NULL;
ne_session *session;
if ((fi = file_cache_get(path))) {
diff --git a/src/session.c b/src/session.c
index e4780e9..4f1009b 100644
--- a/src/session.c
+++ b/src/session.c
@@ -33,8 +33,7 @@ static pthread_mutex_t credential_mutex = PTHREAD_MUTEX_INITIALIZER;
static char* ask_user(char *p, int hidden) {
char q[256], *r;
struct termios t;
- int c, l;
-
+ int c = 0, l;
if (hidden) {
if (!isatty(fileno(stdin)))