]> git.ipfire.org Git - thirdparty/cups.git/blob - xcode/config.h
Update all references to OS X to macOS.
[thirdparty/cups.git] / xcode / config.h
1 /*
2 * Configuration file for CUPS and Xcode.
3 *
4 * Copyright 2007-2016 by Apple Inc.
5 * Copyright 1997-2007 by Easy Software Products.
6 *
7 * These coded instructions, statements, and computer programs are the
8 * property of Apple Inc. and are protected by Federal copyright
9 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 * which should have been included with this file. If this file is
11 * file is missing or damaged, see the license at "http://www.cups.org/".
12 */
13
14 #ifndef _CUPS_CONFIG_H_
15 #define _CUPS_CONFIG_H_
16
17 #include <AvailabilityMacros.h>
18 #include <TargetConditionals.h>
19
20
21 /*
22 * Version of software...
23 */
24
25 #define CUPS_SVERSION "CUPS v2.2"
26 #define CUPS_MINIMAL "CUPS/2.2"
27
28
29 /*
30 * Default user and groups...
31 */
32
33 #define CUPS_DEFAULT_USER "_lp"
34 #define CUPS_DEFAULT_GROUP "_lp"
35 #define CUPS_DEFAULT_SYSTEM_GROUPS "admin"
36 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH "@AUTHKEY(system.print.operator) @admin @lpadmin"
37 #define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
38
39
40 /*
41 * Default file permissions...
42 */
43
44 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
45 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
46
47
48 /*
49 * Default logging settings...
50 */
51
52 #define CUPS_DEFAULT_LOG_LEVEL "warn"
53 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
54
55
56 /*
57 * Default fatal error settings...
58 */
59
60 #define CUPS_DEFAULT_FATAL_ERRORS "config"
61
62
63 /*
64 * Default browsing settings...
65 */
66
67 #define CUPS_DEFAULT_BROWSING 1
68 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
69 #define CUPS_DEFAULT_DEFAULT_SHARED 1
70
71
72 /*
73 * Default IPP port...
74 */
75
76 #define CUPS_DEFAULT_IPP_PORT 631
77
78
79 /*
80 * Default printcap file...
81 */
82
83 #define CUPS_DEFAULT_PRINTCAP "/Library/Preferences/org.cups.printers.plist"
84
85
86 /*
87 * Default Samba and LPD config files...
88 */
89
90 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
91 #define CUPS_DEFAULT_LPD_CONFIG_FILE "launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
92
93
94 /*
95 * Default MaxCopies value...
96 */
97
98 #define CUPS_DEFAULT_MAX_COPIES 9999
99
100
101 /*
102 * Do we have domain socket support, and if so what is the default one?
103 */
104
105 #define CUPS_DEFAULT_DOMAINSOCKET "/private/var/run/cupsd"
106
107
108 /*
109 * Default WebInterface value...
110 */
111
112 #define CUPS_DEFAULT_WEBIF 0
113
114
115 /*
116 * Where are files stored?
117 *
118 * Note: These are defaults, which can be overridden by environment
119 * variables at run-time...
120 */
121
122 #define CUPS_BINDIR "/usr/bin"
123 #define CUPS_CACHEDIR "/private/var/spool/cups/cache"
124 #define CUPS_DATADIR "/usr/share/cups"
125 #define CUPS_DOCROOT "/usr/share/doc/cups"
126 #define CUPS_FONTPATH "/usr/share/cups/fonts"
127 #define CUPS_LOCALEDIR "/usr/share/locale"
128 #define CUPS_LOGDIR "/private/var/log/cups"
129 #define CUPS_REQUESTS "/private/var/spool/cups"
130 #define CUPS_SBINDIR "/usr/sbin"
131 #define CUPS_SERVERBIN "/usr/libexec/cups"
132 #define CUPS_SERVERROOT "/private/etc/cups"
133 #define CUPS_STATEDIR "/private/etc/cups"
134
135
136 /*
137 * Do we have posix_spawn?
138 */
139
140 #define HAVE_POSIX_SPAWN 1
141
142
143 /*
144 * Do we have ZLIB?
145 */
146
147 #define HAVE_LIBZ 1
148 #define HAVE_INFLATECOPY 1
149
150
151 /*
152 * Do we have PAM stuff?
153 */
154
155 #if TARGET_OS_OSX
156 # define HAVE_LIBPAM 1
157 /* #undef HAVE_PAM_PAM_APPL_H */
158 # define HAVE_PAM_SET_ITEM 1
159 # define HAVE_PAM_SETCRED 1
160 #endif /* TARGET_OS_OSX */
161
162
163 /*
164 * Do we have <shadow.h>?
165 */
166
167 /* #undef HAVE_SHADOW_H */
168
169
170 /*
171 * Do we have <crypt.h>?
172 */
173
174 /* #undef HAVE_CRYPT_H */
175
176
177 /*
178 * Use <stdint.h>?
179 */
180
181 #define HAVE_STDINT_H 1
182
183
184 /*
185 * Use <string.h>, <strings.h>, and/or <bstring.h>?
186 */
187
188 #define HAVE_STRING_H 1
189 #define HAVE_STRINGS_H 1
190 /* #undef HAVE_BSTRING_H */
191
192
193 /*
194 * Do we have the long long type?
195 */
196
197 #define HAVE_LONG_LONG 1
198
199 #ifdef HAVE_LONG_LONG
200 # define CUPS_LLFMT "%lld"
201 # define CUPS_LLCAST (long long)
202 #else
203 # define CUPS_LLFMT "%ld"
204 # define CUPS_LLCAST (long)
205 #endif /* HAVE_LONG_LONG */
206
207
208 /*
209 * Do we have the strtoll() function?
210 */
211
212 #define HAVE_STRTOLL 1
213
214 #ifndef HAVE_STRTOLL
215 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
216 #endif /* !HAVE_STRTOLL */
217
218
219 /*
220 * Do we have the strXXX() functions?
221 */
222
223 #define HAVE_STRDUP 1
224 #define HAVE_STRLCAT 1
225 #define HAVE_STRLCPY 1
226
227
228 /*
229 * Do we have the geteuid() function?
230 */
231
232 #define HAVE_GETEUID 1
233
234
235 /*
236 * Do we have the setpgid() function?
237 */
238
239 #define HAVE_SETPGID 1
240
241
242 /*
243 * Do we have the vsyslog() function?
244 */
245
246 #define HAVE_VSYSLOG 1
247
248
249 /*
250 * Do we have the ASL functions?
251 */
252
253 #define HAVE_ASL_H
254
255
256 /*
257 * Do we have the systemd journal functions?
258 */
259
260 /*#undef HAVE_SYSTEMD_SD_JOURNAL_H*/
261
262
263 /*
264 * Do we have the (v)snprintf() functions?
265 */
266
267 #define HAVE_SNPRINTF 1
268 #define HAVE_VSNPRINTF 1
269
270
271 /*
272 * What signal functions to use?
273 */
274
275 #define HAVE_SIGSET 1
276 #define HAVE_SIGACTION 1
277
278
279 /*
280 * What wait functions to use?
281 */
282
283 #define HAVE_WAITPID 1
284 #define HAVE_WAIT3 1
285
286
287 /*
288 * Do we have the mallinfo function and malloc.h?
289 */
290
291 /* #undef HAVE_MALLINFO */
292 /* #undef HAVE_MALLOC_H */
293
294
295 /*
296 * Do we have the POSIX ACL functions?
297 */
298
299 #define HAVE_ACL_INIT 1
300
301
302 /*
303 * Do we have the langinfo.h header file?
304 */
305
306 #define HAVE_LANGINFO_H 1
307
308
309 /*
310 * Which encryption libraries do we have?
311 */
312
313 #define HAVE_CDSASSL 1
314 /* #undef HAVE_GNUTLS */
315 #define HAVE_SSL 1
316
317
318 /*
319 * Do we have the gnutls_transport_set_pull_timeout_function function?
320 */
321
322 /* #undef HAVE_GNUTLS_TRANSPORT_SET_PULL_TIMEOUT_FUNCTION */
323
324
325 /*
326 * Do we have the gnutls_priority_set_direct function?
327 */
328
329 /* #undef HAVE_GNUTLS_PRIORITY_SET_DIRECT */
330
331
332 /*
333 * What Security framework headers do we have?
334 */
335
336 #if !TARGET_OS_IOS
337 # define HAVE_AUTHORIZATION_H 1
338 #endif /* !TARGET_OS_IOS */
339
340 /* #undef HAVE_SECBASEPRIV_H */
341 #define HAVE_SECCERTIFICATE_H 1
342 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
343 #define HAVE_SECITEM_H 1
344 /* #undef HAVE_SECITEMPRIV_H */
345 #define HAVE_SECPOLICY_H 1
346 /* #undef HAVE_SECPOLICYPRIV_H */
347 /* #undef HAVE_SECURETRANSPORTPRIV_H */
348
349
350 /*
351 * Do we have the cssmErrorString function?
352 */
353
354 #if !TARGET_OS_IOS
355 # define HAVE_CSSMERRORSTRING 1
356 #endif /* !TARGET_OS_IOS */
357
358
359 /*
360 * Do we have the SecGenerateSelfSignedCertificate function?
361 */
362
363 #if TARGET_OS_IOS
364 # define HAVE_SECGENERATESELFSIGNEDCERTIFICATE 1
365 #endif /* TARGET_OS_IOS */
366
367
368 /*
369 * Do we have the SecKeychainOpen function?
370 */
371
372 #if !TARGET_OS_IOS
373 # define HAVE_SECKEYCHAINOPEN 1
374 #endif /* !TARGET_OS_IOS */
375
376
377 /*
378 * Do we have (a working) SSLSetEnabledCiphers function?
379 */
380
381 #define HAVE_SSLSETENABLEDCIPHERS 1
382
383
384 /*
385 * Do we have libpaper?
386 */
387
388 /* #undef HAVE_LIBPAPER */
389
390
391 /*
392 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
393 */
394
395 #define HAVE_DNSSD 1
396
397
398 /*
399 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
400 */
401
402 /* #undef HAVE_AVAHI */
403
404
405 /*
406 * Do we have <sys/ioctl.h>?
407 */
408
409 #define HAVE_SYS_IOCTL_H 1
410
411
412 /*
413 * Does the "stat" structure contain the "st_gen" member?
414 */
415
416 #define HAVE_ST_GEN 1
417
418
419 /*
420 * Does the "tm" structure contain the "tm_gmtoff" member?
421 */
422
423 #define HAVE_TM_GMTOFF 1
424
425
426 /*
427 * Do we have rresvport_af()?
428 */
429
430 #define HAVE_RRESVPORT_AF 1
431
432
433 /*
434 * Do we have getaddrinfo()?
435 */
436
437 #define HAVE_GETADDRINFO 1
438
439
440 /*
441 * Do we have getnameinfo()?
442 */
443
444 #define HAVE_GETNAMEINFO 1
445
446
447 /*
448 * Do we have getifaddrs()?
449 */
450
451 #define HAVE_GETIFADDRS 1
452
453
454 /*
455 * Do we have hstrerror()?
456 */
457
458 #define HAVE_HSTRERROR 1
459
460
461 /*
462 * Do we have res_init()?
463 */
464
465 #define HAVE_RES_INIT 1
466
467
468 /*
469 * Do we have <resolv.h>
470 */
471
472 #define HAVE_RESOLV_H 1
473
474
475 /*
476 * Do we have the <sys/sockio.h> header file?
477 */
478
479 #define HAVE_SYS_SOCKIO_H 1
480
481
482 /*
483 * Does the sockaddr structure contain an sa_len parameter?
484 */
485
486 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
487
488
489 /*
490 * Do we have pthread support?
491 */
492
493 #define HAVE_PTHREAD_H 1
494
495
496 /*
497 * Do we have launchd support?
498 */
499
500 #define HAVE_LAUNCH_H 1
501 #define HAVE_LAUNCHD 1
502 #define HAVE_LAUNCH_ACTIVATE_SOCKET 1
503
504
505 /*
506 * Various scripting languages...
507 */
508
509 #if !TARGET_OS_IOS
510 # define HAVE_JAVA 1
511 # define CUPS_JAVA "/usr/bin/java"
512 # define HAVE_PERL 1
513 # define CUPS_PERL "/usr/bin/perl"
514 # define HAVE_PHP 1
515 # define CUPS_PHP "/usr/bin/php"
516 # define HAVE_PYTHON 1
517 # define CUPS_PYTHON "/usr/bin/python"
518 #endif /* !TARGET_OS_IOS */
519
520
521 /*
522 * Do we have CoreFoundation public and private headers?
523 */
524
525 #define HAVE_COREFOUNDATION_H 1
526 /* #undef HAVE_CFPRIV_H */
527 /* #undef HAVE_CFBUNDLEPRIV_H */
528
529
530 /*
531 * Do we have ApplicationServices public headers?
532 */
533
534 #if !TARGET_OS_IOS
535 # define HAVE_APPLICATIONSERVICES_H 1
536 #endif /* !TARGET_OS_IOS */
537
538
539 /*
540 * Do we have the SCDynamicStoreCopyComputerName function?
541 */
542
543 #if !TARGET_OS_IOS
544 # define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1
545 #endif /* !TARGET_OS_IOS */
546
547
548 /*
549 * Do we have the getgrouplist() function?
550 */
551
552 #define HAVE_GETGROUPLIST 1
553
554
555 /*
556 * Do we have macOS 10.4's mbr_XXX functions?
557 */
558
559 #define HAVE_MEMBERSHIP_H 1
560 /* #undef HAVE_MEMBERSHIPPRIV_H */
561 #define HAVE_MBR_UID_TO_UUID 1
562
563
564 /*
565 * Do we have Darwin's notify_post header and function?
566 */
567
568 #define HAVE_NOTIFY_H 1
569 #define HAVE_NOTIFY_POST 1
570
571
572 /*
573 * Do we have DBUS?
574 */
575
576 /* #undef HAVE_DBUS */
577 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
578
579
580 /*
581 * Do we have the GSSAPI support library (for Kerberos support)?
582 */
583
584 #if !TARGET_OS_IOS
585 # define HAVE_GSS_ACQUIRE_CRED_EX_F 1
586 # define HAVE_GSS_C_NT_HOSTBASED_SERVICE 1
587 # define HAVE_GSS_GSSAPI_H 1
588 /* #undef HAVE_GSS_GSSAPI_SPI_H */
589 # define HAVE_GSSAPI 1
590 /* #undef HAVE_GSSAPI_GSSAPI_H */
591 /* #undef HAVE_GSSAPI_H */
592 #endif /* !TARGET_OS_IOS */
593
594
595 /*
596 * Default GSS service name...
597 */
598
599 #define CUPS_DEFAULT_GSSSERVICENAME "host"
600
601
602 /*
603 * Select/poll interfaces...
604 */
605
606 #define HAVE_POLL 1
607 /* #undef HAVE_EPOLL */
608 #define HAVE_KQUEUE 1
609
610
611 /*
612 * Do we have the <dlfcn.h> header?
613 */
614
615 #define HAVE_DLFCN_H 1
616
617
618 /*
619 * Do we have <sys/param.h>?
620 */
621
622 #define HAVE_SYS_PARAM_H 1
623
624
625 /*
626 * Do we have <sys/ucred.h>?
627 */
628
629 #define HAVE_SYS_UCRED_H 1
630
631
632 /*
633 * Do we have removefile()?
634 */
635
636 #define HAVE_REMOVEFILE 1
637
638
639 /*
640 * Do we have <sandbox.h>?
641 */
642
643 #define HAVE_SANDBOX_H 1
644
645
646 /*
647 * Which random number generator function to use...
648 */
649
650 #define HAVE_ARC4RANDOM 1
651 #define HAVE_RANDOM 1
652 #define HAVE_LRAND48 1
653
654 #ifdef HAVE_ARC4RANDOM
655 # define CUPS_RAND() arc4random()
656 # define CUPS_SRAND(v) arc4random_stir()
657 #elif defined(HAVE_RANDOM)
658 # define CUPS_RAND() random()
659 # define CUPS_SRAND(v) srandom(v)
660 #elif defined(HAVE_LRAND48)
661 # define CUPS_RAND() lrand48()
662 # define CUPS_SRAND(v) srand48(v)
663 #else
664 # define CUPS_RAND() rand()
665 # define CUPS_SRAND(v) srand(v)
666 #endif /* HAVE_ARC4RANDOM */
667
668
669 /*
670 * Do we have libusb?
671 */
672
673 /* #undef HAVE_LIBUSB */
674
675
676 /*
677 * Do we have libwrap and tcpd.h?
678 */
679
680 /* #undef HAVE_TCPD_H */
681
682
683 /*
684 * Do we have <iconv.h>?
685 */
686
687 #define HAVE_ICONV_H 1
688
689
690 /*
691 * Do we have statfs or statvfs and one of the corresponding headers?
692 */
693
694 #define HAVE_STATFS 1
695 #define HAVE_STATVFS 1
696 #define HAVE_SYS_MOUNT_H 1
697 /* #undef HAVE_SYS_STATFS_H */
698 #define HAVE_SYS_STATVFS_H 1
699 /* #undef HAVE_SYS_VFS_H */
700
701
702 /*
703 * Location of macOS localization bundle, if any.
704 */
705
706 #if !TARGET_OS_IOS
707 # define CUPS_BUNDLEDIR "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A"
708 #endif /* !TARGET_OS_IOS */
709
710
711 /*
712 * Do we have XPC?
713 */
714
715 #define HAVE_XPC 1
716 /* #undef HAVE_XPC_PRIVATE_H */
717
718
719 /*
720 * Do we have Mini-XML?
721 */
722
723 /* #undef HAVE_MXML_H */
724
725
726 /*
727 * Do we have the C99 abs() function?
728 */
729
730 #define HAVE_ABS 1
731 #if !defined(HAVE_ABS) && !defined(abs)
732 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
733 # define abs(x) _cups_abs(x)
734 static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
735 # elif defined(_MSC_VER)
736 # define abs(x) _cups_abs(x)
737 static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
738 # else
739 # define abs(x) ((x) < 0 ? -(x) : (x))
740 # endif /* __GNUC__ || __STDC_VERSION__ */
741 #endif /* !HAVE_ABS && !abs */
742
743 #endif /* !_CUPS_CONFIG_H_ */