[51282] trunk/base/src/pextlib1.0/curl.c
toby at macports.org
toby at macports.org
Thu May 21 23:52:06 PDT 2009
Revision: 51282
http://trac.macports.org/changeset/51282
Author: toby at macports.org
Date: 2009-05-21 23:52:05 -0700 (Thu, 21 May 2009)
Log Message:
-----------
easier check for curl_easy_strerror
misc cleanup
Modified Paths:
--------------
trunk/base/src/pextlib1.0/curl.c
Modified: trunk/base/src/pextlib1.0/curl.c
===================================================================
--- trunk/base/src/pextlib1.0/curl.c 2009-05-22 06:37:56 UTC (rev 51281)
+++ trunk/base/src/pextlib1.0/curl.c 2009-05-22 06:52:05 UTC (rev 51282)
@@ -97,18 +97,16 @@
theResult = TCL_OK;
break;
- default:
-#ifdef HAVE_CURL_EASY_STRERROR
- Tcl_SetResult(interp, (char*) curl_easy_strerror(inErrorCode), TCL_VOLATILE);
+ default: {
+#if LIBCURL_VERSION_NUM >= 0x070c00 /* 7.12.0 */
+ Tcl_SetResult(interp, (char *)curl_easy_strerror(inErrorCode), TCL_VOLATILE);
#else
- {
- char theErrorString[512];
- (void) snprintf(theErrorString, sizeof(theErrorString),
- "curl error %i", inErrorCode);
- Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
- }
+ char theErrorString[512];
+ (void)snprintf(theErrorString, sizeof(theErrorString), "curl error %i", inErrorCode);
+ Tcl_SetResult(interp, theErrorString, TCL_VOLATILE);
#endif
theResult = TCL_ERROR;
+ }
}
return theResult;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090521/5d0be523/attachment-0001.html>
More information about the macports-changes
mailing list