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