Use /usr/local/bin/lpq from CUPS for FreeBSD
for now; this prevents immediate dtprintinfo
crash.
In the future we should handle both built-in
/usr/bin/lpq as well as CUPS /usr/local/bin/lpq
output in separate functions.
Code to support CUPS should probably shared between
other operating systems.
#if defined(__osf__)
sprintf(buf, "lpstat -o%s", printer);
#endif
-#if defined(linux) || defined(CSRG_BASED)
- sprintf(buf, "lpq -P%s", printer);
+#if defined(linux) || defined(__OpenBSD__)
+ snprintf(buf, 1000, "lpq -P%s", printer);
+#elif defined(__FreeBSD__)
+ snprintf(buf, 1000, "/usr/local/bin/lpq -P%s", printer);
#endif
Invoke *_thread = new Invoke(buf, &output);