-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
Index: include/libvirt/libvirt.h.in
===================================================================
RCS file: /data/cvs/libvirt/include/libvirt/libvirt.h.in,v
retrieving revision 1.48
diff -u -r1.48 libvirt.h.in
--- include/libvirt/libvirt.h.in        15 May 2008 06:12:32 -0000      1.48
+++ include/libvirt/libvirt.h.in        22 May 2008 16:56:58 -0000
@@ -21,6 +21,14 @@
 extern "C" {
 #endif
 
+#ifndef VIR_DEPRECATED
+#ifdef __GNUC__
+#define VIR_DEPRECATED __attribute__((deprecated))
+#else
+#define VIR_DEPRECATED /* nothing */
+#endif
+#endif /* VIR_DEPRECATED */
+
 /**
  * virConnect:
  *
Index: include/libvirt/virterror.h
===================================================================
RCS file: /data/cvs/libvirt/include/libvirt/virterror.h,v
retrieving revision 1.37
diff -u -r1.37 virterror.h
--- include/libvirt/virterror.h 10 Apr 2008 16:54:54 -0000      1.37
+++ include/libvirt/virterror.h 22 May 2008 16:56:58 -0000
@@ -76,14 +76,15 @@
     int                domain; /* What part of the library raised this error */
     char       *message;/* human-readable informative error message */
     virErrorLevel level;/* how consequent is the error */
-    virConnectPtr conn;        /* connection if available, see note above */
-    virDomainPtr dom;  /* domain if available, see note above */
+    virConnectPtr conn VIR_DEPRECATED; /* connection if available,
+                                          see note above */
+    virDomainPtr dom VIR_DEPRECATED; /* domain if available, see note above */
     char       *str1;  /* extra string information */
     char       *str2;  /* extra string information */
     char       *str3;  /* extra string information */
     int                int1;   /* extra number information */
     int                int2;   /* extra number information */
-    virNetworkPtr net; /* network if available, see note above */
+    virNetworkPtr net VIR_DEPRECATED; /* network if available, see note above 
*/
 };
 
 /**
Index: src/internal.h
===================================================================
RCS file: /data/cvs/libvirt/src/internal.h,v
retrieving revision 1.73
diff -u -r1.73 internal.h
--- src/internal.h      13 May 2008 06:30:58 -0000      1.73
+++ src/internal.h      22 May 2008 17:01:23 -0000
@@ -24,6 +24,12 @@
 #define pthread_mutex_unlock(lk) /*empty*/
 #endif
 
+/* The library itself is allowed to use deprecated functions /
+ * variables, so effectively undefine the deprecated attribute
+ * which would otherwise be defined in libvirt.h.
+ */
+#define VIR_DEPRECATED /*empty*/
+
 #include "gettext.h"
 
 #include "hash.h"
--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to