Enable deprecation warnings on all C programs.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 17 May 2011 14:04:56 +0000 (15:04 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 17 May 2011 16:05:12 +0000 (17:05 +0100)
cat/Makefile.am
df/Makefile.am
edit/Makefile.am
examples/Makefile.am
fish/Makefile.am
fuse/Makefile.am
generator/generator_fish.ml
inspector/Makefile.am
rescue/Makefile.am
src/Makefile.am
test-tool/Makefile.am

index a049a61..bf1d57c 100644 (file)
@@ -42,6 +42,7 @@ virt_cat_SOURCES = \
        virt-cat.c
 
 virt_cat_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
@@ -59,6 +60,7 @@ virt_filesystems_SOURCES = \
        virt-filesystems.c
 
 virt_filesystems_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
@@ -76,6 +78,7 @@ virt_ls_SOURCES = \
        virt-ls.c
 
 virt_ls_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
index 69c6140..1711798 100644 (file)
@@ -43,6 +43,7 @@ virt_df_SOURCES = \
        output.c
 
 virt_df_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
index 5195b51..62b5376 100644 (file)
@@ -38,6 +38,7 @@ virt_edit_SOURCES = \
        virt-edit.c
 
 virt_edit_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
index 00a5267..952d602 100644 (file)
@@ -28,6 +28,7 @@ endif
 
 create_disk_SOURCES = create_disk.c
 create_disk_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        $(WARN_CFLAGS) $(WERROR_CFLAGS)
 create_disk_LDADD = \
@@ -35,6 +36,7 @@ create_disk_LDADD = \
 
 inspect_vm_SOURCES = inspect_vm.c
 inspect_vm_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        $(WARN_CFLAGS) $(WERROR_CFLAGS)
 inspect_vm_LDADD = \
@@ -42,6 +44,7 @@ inspect_vm_LDADD = \
 
 virt_dhcp_address_SOURCES = virt-dhcp-address.c
 virt_dhcp_address_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        $(WARN_CFLAGS) $(WERROR_CFLAGS) \
        $(HIVEX_CFLAGS)
index 87f937c..69540dd 100644 (file)
@@ -115,6 +115,7 @@ cmds_gperf.c: cmds_gperf.gperf
        mv $@-t $@
 
 guestfish_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish -I$(top_builddir)/fish \
        -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
index c860f24..b7558ee 100644 (file)
@@ -43,6 +43,7 @@ guestmount_SOURCES = \
        guestmount.h
 
 guestmount_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
index 532639d..cdf9171 100644 (file)
@@ -48,6 +48,9 @@ let generate_fish_cmds () =
 
   pr "#include <config.h>\n";
   pr "\n";
+  pr "/* It is safe to call deprecated functions from this file. */\n";
+  pr "#undef GUESTFS_WARN_DEPRECATED\n";
+  pr "\n";
   pr "#include <stdio.h>\n";
   pr "#include <stdlib.h>\n";
   pr "#include <string.h>\n";
index 8024f98..5c48724 100644 (file)
@@ -59,6 +59,7 @@ virt_inspector_SOURCES = \
        virt-inspector.c
 
 virt_inspector_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
index 0032a23..d3783ae 100644 (file)
@@ -37,6 +37,7 @@ virt_rescue_SOURCES = \
        virt-rescue.c
 
 virt_rescue_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        -I$(top_srcdir)/fish \
        -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
index 32ac7df..c2e0c6e 100644 (file)
@@ -151,6 +151,7 @@ libguestfs_la_LIBADD += liberrnostring.la libprotocol.la
 
 libguestfs_la_CFLAGS = \
   -DGUESTFS_DEFAULT_PATH='"$(libdir)/guestfs"' \
+  -DGUESTFS_WARN_DEPRECATED=1 \
   $(HIVEX_CFLAGS) $(AUGEAS_CFLAGS) $(PCRE_CFLAGS) \
   $(LIBVIRT_CFLAGS) $(LIBXML2_CFLAGS) \
   $(WARN_CFLAGS) $(WERROR_CFLAGS)
index 1ed0820..9fa4033 100644 (file)
@@ -26,6 +26,7 @@ man_MANS = libguestfs-test-tool.1
 
 libguestfs_test_tool_SOURCES = test-tool.c
 libguestfs_test_tool_CFLAGS = \
+       -DGUESTFS_WARN_DEPRECATED=1 \
        -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
        -I$(top_srcdir)/src -I$(top_builddir)/src \
        $(WARN_CFLAGS) $(WERROR_CFLAGS)