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