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