summaryrefslogtreecommitdiffstats
path: root/dev
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2011-09-03 02:10:48 +0200
committerGravatar Martin Szulecki2012-03-18 20:40:54 +0100
commitdcb85727c3649c254c985d840aa2efb36f727872 (patch)
tree0f6f551b70bd845f57d5a044915e617a1bd40ac6 /dev
parent6a83ef58a1032e3b336587e2f3a19659ae325c25 (diff)
downloadlibimobiledevice-dcb85727c3649c254c985d840aa2efb36f727872.tar.gz
libimobiledevice-dcb85727c3649c254c985d840aa2efb36f727872.tar.bz2
Completely remove glib dependency.
Diffstat (limited to 'dev')
-rw-r--r--dev/Makefile.am14
-rw-r--r--dev/ideviceclient.c9
2 files changed, 14 insertions, 9 deletions
diff --git a/dev/Makefile.am b/dev/Makefile.am
index 72c00a3..c1d2b45 100644
--- a/dev/Makefile.am
+++ b/dev/Makefile.am
@@ -1,10 +1,14 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CFLAGS = $(GLOBAL_CFLAGS) $(libglib2_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(libgthread2_CFLAGS) $(LFS_CFLAGS)
-AM_LDFLAGS = $(libglib2_LIBS) $(libgnutls_LIBS) $(libtasn1_LIBS) $(libgthread2_LIBS)
+AM_CFLAGS = $(GLOBAL_CFLAGS) $(libgnutls_CFLAGS) $(libtasn1_CFLAGS) $(LFS_CFLAGS)
+AM_LDFLAGS = $(libgnutls_LIBS) $(libtasn1_LIBS) $(libpthread_LIBS)
if ENABLE_DEVTOOLS
-noinst_PROGRAMS = ideviceclient lckd-client afccheck filerelaytest housearresttest
+noinst_PROGRAMS = ideviceclient afccheck filerelaytest housearresttest
+
+if HAVE_GLIB2
+noinst_PROGRAMS += lckd-client
+endif
ideviceclient_SOURCES = ideviceclient.c
ideviceclient_CFLAGS = $(AM_CFLAGS)
@@ -12,8 +16,8 @@ ideviceclient_LDFLAGS = $(AM_LDFLAGS)
ideviceclient_LDADD = ../src/libimobiledevice.la
lckd_client_SOURCES = lckdclient.c
-lckd_client_CFLAGS = $(AM_CFLAGS)
-lckd_client_LDFLAGS = -lreadline $(AM_LDFLAGS)
+lckd_client_CFLAGS = $(AM_CFLAGS) $(libglib2_CFLAGS)
+lckd_client_LDFLAGS = -lreadline $(AM_LDFLAGS) $(libglib2_LIBS)
lckd_client_LDADD = ../src/libimobiledevice.la
afccheck_SOURCES = afccheck.c
diff --git a/dev/ideviceclient.c b/dev/ideviceclient.c
index d952594..0400fed 100644
--- a/dev/ideviceclient.c
+++ b/dev/ideviceclient.c
@@ -23,7 +23,6 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <glib.h>
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
@@ -138,18 +137,20 @@ int main(int argc, char *argv[])
printf("Directory time.\n");
for (i = 0; dirs[i]; i++) {
printf("/%s\n", dirs[i]);
+ free(dirs[i]);
}
-
- g_strfreev(dirs);
+ if (dirs)
+ free(dirs);
dirs = NULL;
afc_get_device_info(afc, &dirs);
if (dirs) {
for (i = 0; dirs[i]; i += 2) {
printf("%s: %s\n", dirs[i], dirs[i + 1]);
+ free(dirs[i]);
}
+ free(dirs);
}
- g_strfreev(dirs);
uint64_t my_file = 0;
char **info = NULL;