]> git.ipfire.org Git - thirdparty/cups.git/blame - xcode/config.h
Update all references to OS X to macOS.
[thirdparty/cups.git] / xcode / config.h
CommitLineData
82f97232 1/*
996acce8 2 * Configuration file for CUPS and Xcode.
82f97232 3 *
f73476ae 4 * Copyright 2007-2016 by Apple Inc.
996acce8 5 * Copyright 1997-2007 by Easy Software Products.
82f97232 6 *
996acce8
MS
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/".
82f97232
MS
12 */
13
14#ifndef _CUPS_CONFIG_H_
15#define _CUPS_CONFIG_H_
16
ee6226a5 17#include <AvailabilityMacros.h>
9688061e
MS
18#include <TargetConditionals.h>
19
ee6226a5 20
82f97232
MS
21/*
22 * Version of software...
23 */
24
24343173
MS
25#define CUPS_SVERSION "CUPS v2.2"
26#define CUPS_MINIMAL "CUPS/2.2"
82f97232
MS
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"
996acce8 37#define CUPS_DEFAULT_SYSTEM_AUTHKEY "system.print.admin"
82f97232
MS
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
37e7e6e0 68#define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "dnssd"
82f97232 69#define CUPS_DEFAULT_DEFAULT_SHARED 1
82f97232
MS
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
c82f05ea
MS
136/*
137 * Do we have posix_spawn?
138 */
139
140#define HAVE_POSIX_SPAWN 1
141
142
82f97232 143/*
db8b865d 144 * Do we have ZLIB?
82f97232
MS
145 */
146
82f97232 147#define HAVE_LIBZ 1
db8b865d 148#define HAVE_INFLATECOPY 1
82f97232
MS
149
150
151/*
152 * Do we have PAM stuff?
153 */
154
9688061e
MS
155#if TARGET_OS_OSX
156# define HAVE_LIBPAM 1
82f97232 157/* #undef HAVE_PAM_PAM_APPL_H */
9688061e
MS
158# define HAVE_PAM_SET_ITEM 1
159# define HAVE_PAM_SETCRED 1
160#endif /* TARGET_OS_OSX */
82f97232
MS
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/*
cb7f98ee 178 * Use <stdint.h>?
82f97232
MS
179 */
180
cb7f98ee 181#define HAVE_STDINT_H 1
82f97232
MS
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
37e7e6e0 192
82f97232
MS
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
37e7e6e0 207
82f97232
MS
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
37e7e6e0 218
82f97232
MS
219/*
220 * Do we have the strXXX() functions?
221 */
222
223#define HAVE_STRDUP 1
82f97232
MS
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
88f9aafc
MS
235/*
236 * Do we have the setpgid() function?
237 */
238
239#define HAVE_SETPGID 1
240
241
82f97232
MS
242/*
243 * Do we have the vsyslog() function?
244 */
245
246#define HAVE_VSYSLOG 1
247
248
0dc4a6bf
MS
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
82f97232
MS
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 */
82f97232
MS
315#define HAVE_SSL 1
316
317
19ba6878
MS
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
82f97232
MS
332/*
333 * What Security framework headers do we have?
334 */
335
9688061e
MS
336#if !TARGET_OS_IOS
337# define HAVE_AUTHORIZATION_H 1
338#endif /* !TARGET_OS_IOS */
339
a469f8a5 340/* #undef HAVE_SECBASEPRIV_H */
82f97232 341#define HAVE_SECCERTIFICATE_H 1
a469f8a5 342/* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
82f97232 343#define HAVE_SECITEM_H 1
a469f8a5 344/* #undef HAVE_SECITEMPRIV_H */
82f97232 345#define HAVE_SECPOLICY_H 1
a469f8a5
MS
346/* #undef HAVE_SECPOLICYPRIV_H */
347/* #undef HAVE_SECURETRANSPORTPRIV_H */
82f97232
MS
348
349
82f97232
MS
350/*
351 * Do we have the cssmErrorString function?
352 */
353
9688061e
MS
354#if !TARGET_OS_IOS
355# define HAVE_CSSMERRORSTRING 1
356#endif /* !TARGET_OS_IOS */
82f97232
MS
357
358
8aaeeaa9
MS
359/*
360 * Do we have the SecGenerateSelfSignedCertificate function?
361 */
362
9688061e
MS
363#if TARGET_OS_IOS
364# define HAVE_SECGENERATESELFSIGNEDCERTIFICATE 1
365#endif /* TARGET_OS_IOS */
8aaeeaa9
MS
366
367
368/*
369 * Do we have the SecKeychainOpen function?
370 */
371
9688061e
MS
372#if !TARGET_OS_IOS
373# define HAVE_SECKEYCHAINOPEN 1
374#endif /* !TARGET_OS_IOS */
8aaeeaa9
MS
375
376
ee6226a5
MS
377/*
378 * Do we have (a working) SSLSetEnabledCiphers function?
379 */
380
9688061e 381#define HAVE_SSLSETENABLEDCIPHERS 1
ee6226a5
MS
382
383
82f97232 384/*
37e7e6e0 385 * Do we have libpaper?
82f97232
MS
386 */
387
37e7e6e0 388/* #undef HAVE_LIBPAPER */
82f97232
MS
389
390
391/*
37e7e6e0 392 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
82f97232
MS
393 */
394
37e7e6e0 395#define HAVE_DNSSD 1
82f97232
MS
396
397
398/*
37e7e6e0 399 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
82f97232
MS
400 */
401
37e7e6e0 402/* #undef HAVE_AVAHI */
82f97232
MS
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
82f97232
MS
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
108f7505 502#define HAVE_LAUNCH_ACTIVATE_SOCKET 1
82f97232
MS
503
504
505/*
506 * Various scripting languages...
507 */
508
9688061e
MS
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 */
82f97232
MS
519
520
82f97232
MS
521/*
522 * Do we have CoreFoundation public and private headers?
523 */
524
525#define HAVE_COREFOUNDATION_H 1
a469f8a5
MS
526/* #undef HAVE_CFPRIV_H */
527/* #undef HAVE_CFBUNDLEPRIV_H */
82f97232
MS
528
529
530/*
531 * Do we have ApplicationServices public headers?
532 */
533
9688061e
MS
534#if !TARGET_OS_IOS
535# define HAVE_APPLICATIONSERVICES_H 1
536#endif /* !TARGET_OS_IOS */
82f97232
MS
537
538
539/*
540 * Do we have the SCDynamicStoreCopyComputerName function?
541 */
542
9688061e
MS
543#if !TARGET_OS_IOS
544# define HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME 1
545#endif /* !TARGET_OS_IOS */
82f97232
MS
546
547
6eb98aee
MS
548/*
549 * Do we have the getgrouplist() function?
550 */
551
552#define HAVE_GETGROUPLIST 1
8072030b 553
6eb98aee 554
82f97232 555/*
8072030b 556 * Do we have macOS 10.4's mbr_XXX functions?
82f97232
MS
557 */
558
559#define HAVE_MEMBERSHIP_H 1
a469f8a5 560/* #undef HAVE_MEMBERSHIPPRIV_H */
82f97232
MS
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
82f97232 572/*
37e7e6e0 573 * Do we have DBUS?
82f97232
MS
574 */
575
37e7e6e0
MS
576/* #undef HAVE_DBUS */
577/* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
82f97232
MS
578
579
580/*
581 * Do we have the GSSAPI support library (for Kerberos support)?
582 */
583
9688061e
MS
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
a469f8a5 588/* #undef HAVE_GSS_GSSAPI_SPI_H */
9688061e 589# define HAVE_GSSAPI 1
37e7e6e0
MS
590/* #undef HAVE_GSSAPI_GSSAPI_H */
591/* #undef HAVE_GSSAPI_H */
9688061e 592#endif /* !TARGET_OS_IOS */
82f97232
MS
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
82f97232
MS
669/*
670 * Do we have libusb?
671 */
672
37e7e6e0 673/* #undef HAVE_LIBUSB */
82f97232
MS
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/*
8072030b 703 * Location of macOS localization bundle, if any.
82f97232
MS
704 */
705
9688061e
MS
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 */
82f97232
MS
709
710
711/*
37e7e6e0 712 * Do we have XPC?
82f97232
MS
713 */
714
37e7e6e0 715#define HAVE_XPC 1
a469f8a5 716/* #undef HAVE_XPC_PRIVATE_H */
82f97232
MS
717
718
eac3a0a0 719/*
37e7e6e0 720 * Do we have Mini-XML?
eac3a0a0
MS
721 */
722
37e7e6e0
MS
723/* #undef HAVE_MXML_H */
724
725
726/*
727 * Do we have the C99 abs() function?
728 */
eac3a0a0 729
37e7e6e0
MS
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)
734static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
735# elif defined(_MSC_VER)
736# define abs(x) _cups_abs(x)
737static __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 */
eac3a0a0 742
82f97232 743#endif /* !_CUPS_CONFIG_H_ */