]> git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
Merge changes from CUPS 1.5svn-r9136.
[thirdparty/cups.git] / vcnet / config.h
1 /*
2 * "$Id: config.h 6649 2007-07-11 21:46:42Z mike $"
3 *
4 * Configuration file for CUPS.
5 *
6 * Copyright 2007-2010 by Apple Inc.
7 * Copyright 1997-2007 by Easy Software Products.
8 *
9 * These coded instructions, statements, and computer programs are the
10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
14 */
15
16 #ifndef _CUPS_CONFIG_H_
17 #define _CUPS_CONFIG_H_
18
19 /*
20 * Include necessary headers...
21 */
22
23 #include <stdio.h>
24 #include <stdlib.h>
25 #include <string.h>
26 #include <stdarg.h>
27 #include <ctype.h>
28 #include <io.h>
29
30
31 /*
32 * Microsoft renames the POSIX functions to _name, and introduces
33 * a broken compatibility layer using the original names. As a result,
34 * random crashes can occur when, for example, strdup() allocates memory
35 * from a different heap than used by malloc() and free().
36 *
37 * To avoid moronic problems like this, we #define the POSIX function
38 * names to the corresponding non-standard Microsoft names.
39 */
40
41 #define access _access
42 #define close _close
43 #define fileno _fileno
44 #define lseek _lseek
45 #define open _open
46 #define read _read
47 #define snprintf _snprintf
48 #define strdup _strdup
49 #define unlink _unlink
50 #define vsnprintf _vsnprintf
51 #define write _write
52
53
54 /*
55 * Map the POSIX sleep() and usleep() functions to the Win32 Sleep() function...
56 */
57
58 #define sleep(X) Sleep(1000 * (X))
59 #define usleep(X) Sleep((X)/1000)
60
61
62 /*
63 * Map various parameters to Posix style system calls
64 */
65
66 # define F_OK 00
67 # define W_OK 02
68 # define R_OK 04
69 # define O_RDONLY _O_RDONLY
70 # define O_WRONLY _O_WRONLY
71 # define O_CREATE _O_CREAT
72 # define O_TRUNC _O_TRUNC
73
74
75 /*
76 * Compiler stuff...
77 */
78
79 #undef const
80 #undef __CHAR_UNSIGNED__
81
82
83 /*
84 * Version of software...
85 */
86
87 #define CUPS_SVERSION "CUPS v1.5svn"
88 #define CUPS_MINIMAL "CUPS/1.5svn"
89
90
91 /*
92 * Default user and groups...
93 */
94
95 #define CUPS_DEFAULT_USER ""
96 #define CUPS_DEFAULT_GROUP ""
97 #define CUPS_DEFAULT_SYSTEM_GROUPS ""
98 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH ""
99
100
101 /*
102 * Default file permissions...
103 */
104
105 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0644
106 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
107
108
109 /*
110 * Default logging settings...
111 */
112
113 #define CUPS_DEFAULT_LOG_LEVEL "warn"
114 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
115
116
117 /*
118 * Default fatal error settings...
119 */
120
121 #define CUPS_DEFAULT_FATAL_ERRORS "config"
122
123
124 /*
125 * Default browsing settings...
126 */
127
128 #define CUPS_DEFAULT_BROWSING 1
129 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS "CUPS dnssd"
130 #define CUPS_DEFAULT_BROWSE_REMOTE_PROTOCOLS ""
131 #define CUPS_DEFAULT_BROWSE_SHORT_NAMES 1
132 #define CUPS_DEFAULT_DEFAULT_SHARED 1
133 #define CUPS_DEFAULT_IMPLICIT_CLASSES 1
134 #define CUPS_DEFAULT_USE_NETWORK_DEFAULT 0
135
136
137 /*
138 * Default IPP port...
139 */
140
141 #define CUPS_DEFAULT_IPP_PORT 631
142
143
144 /*
145 * Default printcap file...
146 */
147
148 #define CUPS_DEFAULT_PRINTCAP ""
149
150
151 /*
152 * Default Samba and LPD config files...
153 */
154
155 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
156 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
157
158
159 /*
160 * Default MaxCopies value...
161 */
162
163 #define CUPS_DEFAULT_MAX_COPIES 9999
164
165
166 /*
167 * Do we have domain socket support?
168 */
169
170 #undef CUPS_DEFAULT_DOMAINSOCKET
171
172
173 /*
174 * Where are files stored?
175 *
176 * Note: These are defaults, which can be overridden by environment
177 * variables at run-time...
178 */
179
180 #define CUPS_BINDIR "C:/CUPS/bin"
181 #define CUPS_CACHEDIR "C:/CUPS/cache"
182 #define CUPS_DATADIR "C:/CUPS/share"
183 #define CUPS_DOCROOT "C:/CUPS/share/doc"
184 #define CUPS_FONTPATH "C:/CUPS/share/fonts"
185 #define CUPS_LOCALEDIR "C:/CUPS/locale"
186 #define CUPS_LOGDIR "C:/CUPS/logs"
187 #define CUPS_REQUESTS "C:/CUPS/spool"
188 #define CUPS_SBINDIR "C:/CUPS/sbin"
189 #define CUPS_SERVERBIN "C:/CUPS/lib"
190 #define CUPS_SERVERROOT "C:/CUPS/etc"
191 #define CUPS_STATEDIR "C:/CUPS/run"
192
193
194 /*
195 * Do we have various image libraries?
196 */
197
198 /* #undef HAVE_LIBPNG */
199 /* #undef HAVE_LIBZ */
200 /* #undef HAVE_LIBJPEG */
201 /* #undef HAVE_LIBTIFF */
202
203
204 /*
205 * Do we have PAM stuff?
206 */
207
208 #ifndef HAVE_LIBPAM
209 #define HAVE_LIBPAM 0
210 #endif /* !HAVE_LIBPAM */
211
212 /* #undef HAVE_PAM_PAM_APPL_H */
213 /* #undef HAVE_PAM_SET_ITEM */
214 /* #undef HAVE_PAM_SETCRED */
215
216
217 /*
218 * Do we have <shadow.h>?
219 */
220
221 /* #undef HAVE_SHADOW_H */
222
223
224 /*
225 * Do we have <crypt.h>?
226 */
227
228 /* #undef HAVE_CRYPT_H */
229
230
231 /*
232 * Do we have <scsi/sg.h>?
233 */
234
235 /* #undef HAVE_SCSI_SG_H */
236
237
238 /*
239 * Use <string.h>, <strings.h>, and/or <bstring.h>?
240 */
241
242 #define HAVE_STRING_H 1
243 /* #undef HAVE_STRINGS_H */
244 /* #undef HAVE_BSTRING_H */
245
246
247 /*
248 * Do we have the long long type?
249 */
250
251 /* #undef HAVE_LONG_LONG */
252
253 #ifdef HAVE_LONG_LONG
254 # define CUPS_LLFMT "%lld"
255 # define CUPS_LLCAST (long long)
256 #else
257 # define CUPS_LLFMT "%ld"
258 # define CUPS_LLCAST (long)
259 #endif /* HAVE_LONG_LONG */
260
261
262 /*
263 * Do we have the strtoll() function?
264 */
265
266 /* #undef HAVE_STRTOLL */
267
268 #ifndef HAVE_STRTOLL
269 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
270 #endif /* !HAVE_STRTOLL */
271
272
273 /*
274 * Do we have the strXXX() functions?
275 */
276
277 #define HAVE_STRDUP 1
278 #define HAVE_STRCASECMP 1
279 #define HAVE_STRNCASECMP 1
280 /* #undef HAVE_STRLCAT */
281 /* #undef HAVE_STRLCPY */
282
283
284 /*
285 * Do we have the geteuid() function?
286 */
287
288 /* #undef HAVE_GETEUID */
289
290
291 /*
292 * Do we have the vsyslog() function?
293 */
294
295 /* #undef HAVE_VSYSLOG */
296
297
298 /*
299 * Do we have the (v)snprintf() functions?
300 */
301
302 #define HAVE_SNPRINTF 1
303 #define HAVE_VSNPRINTF 1
304
305
306 /*
307 * What signal functions to use?
308 */
309
310 /* #undef HAVE_SIGSET */
311 /* #undef HAVE_SIGACTION */
312
313
314 /*
315 * What wait functions to use?
316 */
317
318 /* #undef HAVE_WAITPID */
319 /* #undef HAVE_WAIT3 */
320
321
322 /*
323 * Do we have the mallinfo function and malloc.h?
324 */
325
326 /* #undef HAVE_MALLINFO */
327 /* #undef HAVE_MALLOC_H */
328
329
330 /*
331 * Do we have the POSIX ACL functions?
332 */
333
334 /* #undef HAVE_ACL_INIT */
335
336
337 /*
338 * Do we have the langinfo.h header file?
339 */
340
341 /* #undef HAVE_LANGINFO_H */
342
343
344 /*
345 * Which encryption libraries do we have?
346 */
347
348 /* #undef HAVE_CDSASSL */
349 /* #undef HAVE_GNUTLS */
350 /* #undef HAVE_LIBSSL */
351 #define HAVE_SSPISSL
352 #define HAVE_SSL
353
354
355 /*
356 * What Security framework headers do we have?
357 */
358
359 /* #undef HAVE_AUTHORIZATION_H */
360 /* #undef HAVE_SECPOLICY_H */
361 /* #undef HAVE_SECPOLICYPRIV_H */
362 /* #undef HAVE_SECBASEPRIV_H */
363 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
364
365
366 /*
367 * Do we have the SecIdentitySearchCreateWithPolicy function?
368 */
369
370 /* #undef HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY */
371
372
373 /*
374 * Do we have the SLP library?
375 */
376
377 /* #undef HAVE_LIBSLP */
378
379
380 /*
381 * Do we have an LDAP library?
382 */
383
384 /* #undef HAVE_LDAP */
385 /* #undef HAVE_OPENLDAP */
386 /* #undef HAVE_MOZILLA_LDAP */
387 /* #undef HAVE_LDAP_SSL_H */
388 /* #undef HAVE_LDAP_SSL */
389 /* #undef HAVE_LDAP_REBIND_PROC */
390
391
392 /*
393 * Do we have libpaper?
394 */
395
396 /* #undef HAVE_LIBPAPER */
397
398
399 /*
400 * Do we have DNS Service Discovery (aka Bonjour)?
401 */
402
403 #define HAVE_DNSSD 1
404
405
406 /*
407 * Do we have <sys/ioctl.h>?
408 */
409
410 /* #undef HAVE_SYS_IOCTL_H */
411
412
413 /*
414 * Does the "tm" structure contain the "tm_gmtoff" member?
415 */
416
417 /* #undef HAVE_TM_GMTOFF */
418
419
420 /*
421 * Do we have rresvport_af()?
422 */
423
424 /* #undef HAVE_RRESVPORT_AF */
425
426
427 /*
428 * Do we have getaddrinfo()?
429 */
430
431 #define HAVE_GETADDRINFO 1
432
433
434 /*
435 * Do we have getnameinfo()?
436 */
437
438 #define HAVE_GETNAMEINFO 1
439
440
441 /*
442 * Do we have getifaddrs()?
443 */
444
445 /* #undef HAVE_GETIFADDRS */
446
447
448 /*
449 * Do we have hstrerror()?
450 */
451
452 /* #undef HAVE_HSTRERROR */
453
454
455 /*
456 * Do we have res_init()?
457 */
458
459 /* #undef HAVE_RES_INIT */
460
461
462 /*
463 * Do we have <resolv.h>
464 */
465
466 /* #undef HAVE_RESOLV_H */
467
468
469 /*
470 * Do we have the <sys/sockio.h> header file?
471 */
472
473 /* #undef HAVE_SYS_SOCKIO_H */
474
475
476 /*
477 * Does the sockaddr structure contain an sa_len parameter?
478 */
479
480 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
481
482
483 /*
484 * Do we have the AIX usersec.h header file?
485 */
486
487 /* #undef HAVE_USERSEC_H */
488
489
490 /*
491 * Do we have pthread support?
492 */
493
494 /* #undef HAVE_PTHREAD_H */
495
496
497 /*
498 * Do we have launchd support?
499 */
500
501 /* #undef HAVE_LAUNCH_H */
502 /* #undef HAVE_LAUNCHD */
503
504
505 /*
506 * Various scripting languages...
507 */
508
509 /* #undef HAVE_JAVA */
510 #define CUPS_JAVA ""
511 /* #undef HAVE_PERL */
512 #define CUPS_PERL ""
513 /* #undef HAVE_PHP */
514 #define CUPS_PHP ""
515 /* #undef HAVE_PYTHON */
516 #define CUPS_PYTHON ""
517
518
519 /*
520 * Location of the poppler/Xpdf pdftops program...
521 */
522
523 /* #undef HAVE_PDFTOPS */
524 #define CUPS_PDFTOPS ""
525
526
527 /*
528 * Location of the Ghostscript gs program...
529 */
530
531 /* #undef HAVE_GHOSTSCRIPT */
532 #define CUPS_GHOSTSCRIPT ""
533
534
535 /*
536 * Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
537 */
538
539 /* #undef HAVE_COREFOUNDATION */
540 /* #undef HAVE_SYSTEMCONFIGURATION */
541
542
543 /*
544 * Do we have CoreFoundation public and private headers?
545 */
546
547 /* #undef HAVE_COREFOUNDATION_H */
548 /* #undef HAVE_CFPRIV_H */
549 /* #undef HAVE_CFBUNDLEPRIV_H */
550
551
552 /*
553 * Do we have ApplicationServices public headers?
554 */
555
556 /* #undef HAVE_APPLICATIONSERVICES_H */
557
558
559 /*
560 * Do we have the SCDynamicStoreCopyComputerName function?
561 */
562
563 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
564
565
566 /*
567 * Do we have MacOSX 10.4's mbr_XXX functions()?
568 */
569
570 /* #undef HAVE_MEMBERSHIP_H */
571 /* #undef HAVE_MEMBERSHIPPRIV_H */
572 /* #undef HAVE_MBR_UID_TO_UUID */
573
574
575 /*
576 * Do we have Darwin's notify_post() header and function?
577 */
578
579 /* #undef HAVE_NOTIFY_H */
580 /* #undef HAVE_NOTIFY_POST */
581
582
583 /*
584 * Do we have DBUS?
585 */
586
587 /* #undef HAVE_DBUS */
588 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
589
590
591 /*
592 * Do we have the AppleTalk/at_proto.h header?
593 */
594
595 /* #undef HAVE_APPLETALK_AT_PROTO_H */
596
597
598 /*
599 * Do we have the GSSAPI support library (for Kerberos support)?
600 */
601
602 /* #undef HAVE_GSSAPI */
603 /* #undef HAVE_GSSAPI_H */
604 /* #undef HAVE_GSSAPI_GSSAPI_H */
605 /* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
606 /* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
607 /* #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
608 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
609 /* #undef HAVE_KRB5_CC_NEW_UNIQUE */
610 /* #undef HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID */
611 /* #undef HAVE_KRB5_H */
612 /* #undef HAVE_HEIMDAL */
613
614
615 /*
616 * Default GSS service name...
617 */
618
619 #define CUPS_DEFAULT_GSSSERVICENAME "host"
620
621
622 /*
623 * Select/poll interfaces...
624 */
625
626 /* #undef HAVE_POLL */
627 /* #undef HAVE_EPOLL */
628 /* #undef HAVE_KQUEUE */
629
630
631 /*
632 * Do we have the <dlfcn.h> header?
633 */
634
635 /* #undef HAVE_DLFCN_H */
636
637
638 /*
639 * Do we have <sys/param.h>?
640 */
641
642 /* #undef HAVE_SYS_PARAM_H */
643
644
645 /*
646 * Do we have <sys/ucred.h>?
647 */
648
649 /* #undef HAVE_SYS_UCRED_H */
650
651
652 /*
653 * Do we have removefile()?
654 */
655
656 /* #undef HAVE_REMOVEFILE */
657
658
659 /*
660 * Do we have <sandbox.h>?
661 */
662
663 /* #undef HAVE_SANDBOX_H */
664
665
666 /*
667 * Which random number generator function to use...
668 */
669
670 /* #undef HAVE_ARC4RANDOM */
671 /* #undef HAVE_RANDOM */
672 /* #undef HAVE_LRAND48 */
673
674 #ifdef HAVE_ARC4RANDOM
675 # define CUPS_RAND() arc4random()
676 # define CUPS_SRAND(v) arc4random_stir()
677 #elif defined(HAVE_RANDOM)
678 # define CUPS_RAND() random()
679 # define CUPS_SRAND(v) srandom(v)
680 #elif defined(HAVE_LRAND48)
681 # define CUPS_RAND() lrand48()
682 # define CUPS_SRAND(v) srand48(v)
683 #else
684 # define CUPS_RAND() rand()
685 # define CUPS_SRAND(v) srand(v)
686 #endif /* HAVE_ARC4RANDOM */
687
688
689 /*
690 * Do we have vproc_transaction_begin/end?
691 */
692
693 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
694
695
696 /*
697 * Do we have libusb?
698 */
699
700 /* #undef HAVE_USB_H */
701
702
703 /*
704 * Do we have libwrap and tcpd.h?
705 */
706
707 /* #undef HAVE_TCPD_H */
708
709
710 #endif /* !_CUPS_CONFIG_H_ */
711
712 /*
713 * End of "$Id: config.h 6649 2007-07-11 21:46:42Z mike $".
714 */