diff --git a/ChangeLog b/ChangeLog index 814f905cead6266c4d174e65c4616855e68c44bc..df45adf7afbccb4adf0ff35a451c0debe28a2839 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 18 12:18:58 GMT 2008 Daniel P. Berrange + + * examples/domain-events/events-c/event-test.c, + python/types.c: Replace __FUNCTION__ with __func__ for + better portability (John Levon) + Thu Dec 18 12:18:58 GMT 2008 Daniel P. Berrange Fix gcc-ism in python build (John Levon) diff --git a/examples/domain-events/events-c/event-test.c b/examples/domain-events/events-c/event-test.c index e265693f05f7473075c22ac1450db769af139496..5272f44b86093703e1fea6de09aa1580ebf8d47b 100644 --- a/examples/domain-events/events-c/event-test.c +++ b/examples/domain-events/events-c/event-test.c @@ -11,9 +11,9 @@ #include #define DEBUG0(fmt) printf("%s:%d :: " fmt "\n", \ - __FUNCTION__, __LINE__) + __func__, __LINE__) #define DEBUG(fmt, ...) printf("%s:%d: " fmt "\n", \ - __FUNCTION__, __LINE__, __VA_ARGS__) + __func__, __LINE__, __VA_ARGS__) #define STREQ(a,b) (strcmp((a),(b)) == 0) #ifndef ATTRIBUTE_UNUSED @@ -158,7 +158,7 @@ int myDomainEventCallback1 (virConnectPtr conn ATTRIBUTE_UNUSED, int detail, void *opaque ATTRIBUTE_UNUSED) { - printf("%s EVENT: Domain %s(%d) %s %s\n", __FUNCTION__, virDomainGetName(dom), + printf("%s EVENT: Domain %s(%d) %s %s\n", __func__, virDomainGetName(dom), virDomainGetID(dom), eventToString(event), eventDetailToString(event, detail)); return 0; @@ -170,7 +170,7 @@ int myDomainEventCallback2 (virConnectPtr conn ATTRIBUTE_UNUSED, int detail, void *opaque ATTRIBUTE_UNUSED) { - printf("%s EVENT: Domain %s(%d) %s %s\n", __FUNCTION__, virDomainGetName(dom), + printf("%s EVENT: Domain %s(%d) %s %s\n", __func__, virDomainGetName(dom), virDomainGetID(dom), eventToString(event), eventDetailToString(event, detail)); return 0; @@ -179,7 +179,7 @@ int myDomainEventCallback2 (virConnectPtr conn ATTRIBUTE_UNUSED, static void myFreeFunc(void *opaque) { char *str = opaque; - printf("%s: Freeing [%s]\n", __FUNCTION__, str); + printf("%s: Freeing [%s]\n", __func__, str); free(str); } diff --git a/python/types.c b/python/types.c index c773f3094dcaefcfd63ff1aa068e0f6c150b70b2..7981f802baa4b7105ec7971313b884c1f6af130d 100644 --- a/python/types.c +++ b/python/types.c @@ -185,7 +185,7 @@ libvirt_virEventHandleCallbackWrap(virEventHandleCallback node) if (node == NULL) { Py_INCREF(Py_None); - printf("%s: WARNING - Wrapping None\n", __FUNCTION__); + printf("%s: WARNING - Wrapping None\n", __func__); return (Py_None); } ret = @@ -200,7 +200,7 @@ libvirt_virEventTimeoutCallbackWrap(virEventTimeoutCallback node) PyObject *ret; if (node == NULL) { - printf("%s: WARNING - Wrapping None\n", __FUNCTION__); + printf("%s: WARNING - Wrapping None\n", __func__); Py_INCREF(Py_None); return (Py_None); }