Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguerrysemones <gas@treenleaf.com>2015-09-23 21:31:55 +0300
committerguerrysemones <gas@treenleaf.com>2015-09-23 21:32:46 +0300
commiteefcd3b42e92d1eec9f1b3e418c519428eccf488 (patch)
treefdd63121eee6a72a2f48908d9476f5a4ff343a90 /mcs/class/System.Drawing/System.Drawing.Printing
parente9767791179ef1ab75d97afd8f2ffc0a8db793d2 (diff)
This is a patch to fix bug 34123. System.Drawing.Printing.PrintingServicesUnix is failing to print on Mac OSX Yosemite because the CUPS function cupsTempFile now always returns an empty string. This function was deprecated. Now replacing cupsTempFile call with call to cupsTempFd to fix printing. I do not see a clear way to unit test this, and there appear to be no prior unit tests covering this. Essentially we are swapping a function call for another that returns the same type of result. This was tested on my copy of net_4_x master. The same fix could be applied to mono version 3 also. This change is released under the MIT license.
Diffstat (limited to 'mcs/class/System.Drawing/System.Drawing.Printing')
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs b/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs
index 5adb549bb9b..8e172ad3a4d 100644
--- a/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Printing/PrintingServicesUnix.cs
@@ -843,7 +843,7 @@ namespace System.Drawing.Printing
if (!settings.PrintToFile) {
StringBuilder sb = new StringBuilder (1024);
int length = sb.Capacity;
- cupsTempFile (sb, length);
+ cupsTempFd (sb, length);
name = sb.ToString ();
tmpfile = name;
}
@@ -889,7 +889,7 @@ namespace System.Drawing.Printing
static extern void cupsFreeDests (int num_dests, IntPtr dests);
[DllImport("libcups", CharSet=CharSet.Ansi)]
- static extern IntPtr cupsTempFile (StringBuilder sb, int len);
+ static extern IntPtr cupsTempFd (StringBuilder sb, int len);
[DllImport("libcups", CharSet=CharSet.Ansi)]
static extern IntPtr cupsGetDefault ();