]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed more tests which failed with shared libraries.
authorMartin Mares <mj@ucw.cz>
Thu, 30 Oct 2008 23:13:04 +0000 (00:13 +0100)
committerMartin Mares <mj@ucw.cz>
Thu, 30 Oct 2008 23:13:04 +0000 (00:13 +0100)
ucw/fb-direct.c
ucw/fb-mmap.c
ucw/url.c

index 15a4568ad90f6c925ffe57f3412208ab10c3f7b2..1e2dfd89c53f3f0c6d9806192c8ac614f52b3004 100644 (file)
 #include <unistd.h>
 #include <stdio.h>
 
-uns fbdir_cheat;
-
-static struct cf_section fbdir_cf = {
-  CF_ITEMS {
-    CF_UNS("Cheat", &fbdir_cheat),
-    CF_END
-  }
-};
-
 #define FBDIR_ALIGN 512
 
 enum fbdir_mode {                              // Current operating mode
@@ -68,11 +59,22 @@ struct fb_direct {
 };
 #define FB_DIRECT(f) ((struct fb_direct *)(f)->is_fastbuf)
 
+#ifndef TEST
+uns fbdir_cheat;
+
+static struct cf_section fbdir_cf = {
+  CF_ITEMS {
+    CF_UNS("Cheat", &fbdir_cheat),
+    CF_END
+  }
+};
+
 static void CONSTRUCTOR
 fbdir_global_init(void)
 {
   cf_declare_section("FBDirect", &fbdir_cf, 0);
 }
+#endif
 
 static void
 fbdir_read_sync(struct fb_direct *F)
index 5c6d314266f5427e15a09e9f0171c13b41fdadc2..747b4286d7757fa037bccbab72a0110d6f3963f8 100644 (file)
@@ -22,6 +22,7 @@
 static uns mmap_window_size = 16*CPU_PAGE_SIZE;
 static uns mmap_extend_size = 4*CPU_PAGE_SIZE;
 
+#ifndef TEST
 static struct cf_section fbmm_config = {
   CF_ITEMS {
     CF_UNS("WindowSize", &mmap_window_size),
@@ -34,6 +35,7 @@ static void CONSTRUCTOR fbmm_init_config(void)
 {
   cf_declare_section("FBMMap", &fbmm_config, 0);
 }
+#endif
 
 struct fb_mmap {
   struct fastbuf fb;
index c05bae66dfa5d302ecce8977cea96879268e804b..50ed2f7ecd03d840728472d153053b47ab6cdf91 100644 (file)
--- a/ucw/url.c
+++ b/ucw/url.c
@@ -30,6 +30,7 @@ static uns url_min_repeat_count = 0x7fffffff;
 static uns url_max_repeat_length = 0;
 static uns url_max_occurences = ~0U;
 
+#ifndef TEST
 static struct cf_section url_config = {
   CF_ITEMS {
     CF_UNS("IgnoreSpaces", &url_ignore_spaces),
@@ -46,6 +47,7 @@ static void CONSTRUCTOR url_init_config(void)
 {
   cf_declare_section("URL", &url_config, 0);
 }
+#endif
 
 /* Escaping and de-escaping */