[dia] mimgw: Fix the Linux build
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] mimgw: Fix the Linux build
- Date: Sun, 5 Sep 2010 09:25:02 +0000 (UTC)
commit 2f049f119c808ad574e4a23b2266af099810c700
Author: Hans Breuer <hans breuer org>
Date: Sun Sep 5 11:27:06 2010 +0200
mimgw: Fix the Linux build
- there is no subdir in dia_get_locale_directory()
- paginate_gdiprint.* is OS_WIN32 only
lib/dia_dirs.c | 36 ++++++++++++++++++------------------
plug-ins/wmf/Makefile.am | 3 ++-
2 files changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/lib/dia_dirs.c b/lib/dia_dirs.c
index 514ddc8..a111acb 100644
--- a/lib/dia_dirs.c
+++ b/lib/dia_dirs.c
@@ -37,14 +37,14 @@ static gchar *
replace_prefix (const gchar *runtime_prefix,
const gchar *configure_time_path)
{
- if (runtime_prefix &&
- strncmp (configure_time_path, PREFIX "/",
- strlen (PREFIX) + 1) == 0) {
- return g_strconcat (runtime_prefix,
- configure_time_path + strlen (PREFIX) + 1,
- NULL);
- } else
- return g_strdup (configure_time_path);
+ if (runtime_prefix &&
+ strncmp (configure_time_path, PREFIX "/",
+ strlen (PREFIX) + 1) == 0) {
+ return g_strconcat (runtime_prefix,
+ configure_time_path + strlen (PREFIX) + 1,
+ NULL);
+ } else
+ return g_strdup (configure_time_path);
}
#endif
@@ -75,7 +75,7 @@ dia_get_data_directory(const gchar* subdir)
if (strrchr(sLoc, G_DIR_SEPARATOR))
strrchr(sLoc, G_DIR_SEPARATOR)[1] = 0;
}
-#if defined(PREFIX) && defined(DATADIR)
+# if defined(PREFIX) && defined(DATADIR)
tmpPath = replace_prefix(sLoc, DATADIR);
if (strlen (subdir) == 0)
returnPath = g_strdup(tmpPath);
@@ -83,9 +83,9 @@ dia_get_data_directory(const gchar* subdir)
returnPath = g_build_path(G_DIR_SEPARATOR_S, tmpPath, subdir, NULL);
g_free(tmpPath);
return returnPath;
-#else
+# else
return g_strconcat (sLoc , subdir, NULL);
-#endif
+# endif
#else
if (strlen (subdir) == 0)
@@ -122,14 +122,14 @@ dia_get_lib_directory(const gchar* subdir)
if (strrchr(sLoc, G_DIR_SEPARATOR))
strrchr(sLoc, G_DIR_SEPARATOR)[1] = 0;
}
-#if defined(PREFIX) && defined(LIBDIR)
+# if defined(PREFIX) && defined(LIBDIR)
tmpPath = replace_prefix(sLoc, LIBDIR);
returnPath = g_build_path(G_DIR_SEPARATOR_S, tmpPath, subdir, NULL);
g_free(tmpPath);
return returnPath;
-#else
+# else
return g_strconcat (sLoc , subdir, NULL);
-#endif
+# endif
#else
@@ -141,7 +141,7 @@ gchar*
dia_get_locale_directory(void)
{
#ifdef G_OS_WIN32
-#if defined(PREFIX) && defined(LOCALEDIR)
+# if defined(PREFIX) && defined(LOCALEDIR)
/*
* Calulate from executable path
*/
@@ -158,13 +158,13 @@ dia_get_locale_directory(void)
strrchr(sLoc, G_DIR_SEPARATOR)[1] = 0;
}
return replace_prefix(sLoc, LOCALEDIR);
-#else
+# else
return dia_get_lib_directory ("locale");
-#endif
+# endif
#else
- return g_strconcat (LIBDIR, G_DIR_SEPARATOR_S, subdir, NULL);
+ return g_strconcat (LOCALEDIR, G_DIR_SEPARATOR_S, "", NULL);
#endif
}
diff --git a/plug-ins/wmf/Makefile.am b/plug-ins/wmf/Makefile.am
index 71b48da..b57f875 100644
--- a/plug-ins/wmf/Makefile.am
+++ b/plug-ins/wmf/Makefile.am
@@ -1,7 +1,7 @@
plugin_sources = wmf.cpp
if !WITH_LIBEMF
-plugin_sources += wmf_gdi.cpp wmf_gdi.h paginate_gdiprint.cpp paginate_gdiprint.h
+plugin_sources += wmf_gdi.cpp wmf_gdi.h
endif
# Can't do without C++
@@ -14,6 +14,7 @@ libwmf_filter_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED
libwmf_filter_la_LIBADD = $(LIBEMF_LIBS) $(top_builddir)/lib/libdia.la
if OS_WIN32
libwmf_filter_la_LIBADD += -lcomdlg32
+plugin_sources += paginate_gdiprint.cpp paginate_gdiprint.h
endif
INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir)/lib \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]