[138965] trunk/base/src/pextlib1.0

raimue at macports.org raimue at macports.org
Sat Jul 25 04:13:18 PDT 2015


Revision: 138965
          https://trac.macports.org/changeset/138965
Author:   raimue at macports.org
Date:     2015-07-25 04:13:18 -0700 (Sat, 25 Jul 2015)
Log Message:
-----------
pextlib: replace __printlike with __attribute__ for compilation on other platforms

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/Pextlib.c
    trunk/base/src/pextlib1.0/Pextlib.h

Modified: trunk/base/src/pextlib1.0/Pextlib.c
===================================================================
--- trunk/base/src/pextlib1.0/Pextlib.c	2015-07-25 05:12:12 UTC (rev 138964)
+++ trunk/base/src/pextlib1.0/Pextlib.c	2015-07-25 11:13:18 UTC (rev 138965)
@@ -105,7 +105,7 @@
 #include "setmode.h"
 #endif
 
-__printflike(3, 0)
+__attribute__((format(printf, 3, 0)))
 static void ui_message(Tcl_Interp *interp, const char *severity, const char *format, va_list va) {
     char tclcmd[32];
     char *buf;
@@ -125,7 +125,7 @@
     free(buf);
 }
 
-__printflike(2, 3)
+__attribute__((format(printf, 2, 3)))
 void ui_error(Tcl_Interp *interp, const char *format, ...) {
     va_list va;
     va_start(va, format);
@@ -133,7 +133,7 @@
     va_end(va);
 }
 
-__printflike(2, 3)
+__attribute__((format(printf, 2, 3)))
 void ui_warn(Tcl_Interp *interp, const char *format, ...) {
     va_list va;
 
@@ -142,7 +142,7 @@
     va_end(va);
 }
 
-__printflike(2, 3)
+__attribute__((format(printf, 2, 3)))
 void ui_msg(Tcl_Interp *interp, const char *format, ...) {
     va_list va;
     va_start(va, format);
@@ -150,7 +150,7 @@
     va_end(va);
 }
 
-__printflike(2, 3)
+__attribute__((format(printf, 2, 3)))
 void ui_notice(Tcl_Interp *interp, const char *format, ...) {
     va_list va;
 
@@ -159,7 +159,7 @@
     va_end(va);
 }
 
-__printflike(2, 3)
+__attribute__((format(printf, 2, 3)))
 void ui_info(Tcl_Interp *interp, const char *format, ...) {
     va_list va;
 
@@ -168,7 +168,7 @@
     va_end(va);
 }
 
-__printflike(2, 3)
+__attribute__((format(printf, 2, 3)))
 void ui_debug(Tcl_Interp *interp, const char *format, ...) {
     va_list va;
 

Modified: trunk/base/src/pextlib1.0/Pextlib.h
===================================================================
--- trunk/base/src/pextlib1.0/Pextlib.h	2015-07-25 05:12:12 UTC (rev 138964)
+++ trunk/base/src/pextlib1.0/Pextlib.h	2015-07-25 11:13:18 UTC (rev 138965)
@@ -30,9 +30,9 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-void ui_error(Tcl_Interp *interp, const char *format, ...) __printflike(2, 3);
-void ui_warn(Tcl_Interp *interp, const char *format, ...) __printflike(2, 3);
-void ui_msg(Tcl_Interp *interp, const char *format, ...) __printflike(2, 3);
-void ui_notice(Tcl_Interp *interp, const char *format, ...) __printflike(2, 3);
-void ui_info(Tcl_Interp *interp, const char *format, ...) __printflike(2, 3);
-void ui_debug(Tcl_Interp *interp, const char *format, ...) __printflike(2, 3);
+void ui_error(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
+void ui_warn(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
+void ui_msg(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
+void ui_notice(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
+void ui_info(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
+void ui_debug(Tcl_Interp *interp, const char *format, ...) __attribute__((format(printf, 2, 3)));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150725/3b215a0a/attachment.html>


More information about the macports-changes mailing list