]> git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
Merge changes from CUPS 1.5svn-r9105.
[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 /* #undef HAVE_SSL */
352
353
354 /*
355 * What Security framework headers do we have?
356 */
357
358 /* #undef HAVE_AUTHORIZATION_H */
359 /* #undef HAVE_SECPOLICY_H */
360 /* #undef HAVE_SECPOLICYPRIV_H */
361 /* #undef HAVE_SECBASEPRIV_H */
362 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
363
364
365 /*
366 * Do we have the SecIdentitySearchCreateWithPolicy function?
367 */
368
369 /* #undef HAVE_SECIDENTITYSEARCHCREATEWITHPOLICY */
370
371
372 /*
373 * Do we have the SLP library?
374 */
375
376 /* #undef HAVE_LIBSLP */
377
378
379 /*
380 * Do we have an LDAP library?
381 */
382
383 /* #undef HAVE_LDAP */
384 /* #undef HAVE_OPENLDAP */
385 /* #undef HAVE_MOZILLA_LDAP */
386 /* #undef HAVE_LDAP_SSL_H */
387 /* #undef HAVE_LDAP_SSL */
388 /* #undef HAVE_LDAP_REBIND_PROC */
389
390
391 /*
392 * Do we have libpaper?
393 */
394
395 /* #undef HAVE_LIBPAPER */
396
397
398 /*
399 * Do we have DNS Service Discovery (aka Bonjour)?
400 */
401
402 #define HAVE_DNSSD 1
403
404
405 /*
406 * Do we have <sys/ioctl.h>?
407 */
408
409 /* #undef HAVE_SYS_IOCTL_H */
410
411
412 /*
413 * Does the "tm" structure contain the "tm_gmtoff" member?
414 */
415
416 /* #undef HAVE_TM_GMTOFF */
417
418
419 /*
420 * Do we have rresvport_af()?
421 */
422
423 /* #undef HAVE_RRESVPORT_AF */
424
425
426 /*
427 * Do we have getaddrinfo()?
428 */
429
430 #define HAVE_GETADDRINFO 1
431
432
433 /*
434 * Do we have getnameinfo()?
435 */
436
437 #define HAVE_GETNAMEINFO 1
438
439
440 /*
441 * Do we have getifaddrs()?
442 */
443
444 /* #undef HAVE_GETIFADDRS */
445
446
447 /*
448 * Do we have hstrerror()?
449 */
450
451 /* #undef HAVE_HSTRERROR */
452
453
454 /*
455 * Do we have res_init()?
456 */
457
458 /* #undef HAVE_RES_INIT */
459
460
461 /*
462 * Do we have <resolv.h>
463 */
464
465 /* #undef HAVE_RESOLV_H */
466
467
468 /*
469 * Do we have the <sys/sockio.h> header file?
470 */
471
472 /* #undef HAVE_SYS_SOCKIO_H */
473
474
475 /*
476 * Does the sockaddr structure contain an sa_len parameter?
477 */
478
479 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
480
481
482 /*
483 * Do we have the AIX usersec.h header file?
484 */
485
486 /* #undef HAVE_USERSEC_H */
487
488
489 /*
490 * Do we have pthread support?
491 */
492
493 /* #undef HAVE_PTHREAD_H */
494
495
496 /*
497 * Do we have launchd support?
498 */
499
500 /* #undef HAVE_LAUNCH_H */
501 /* #undef HAVE_LAUNCHD */
502
503
504 /*
505 * Various scripting languages...
506 */
507
508 /* #undef HAVE_JAVA */
509 #define CUPS_JAVA ""
510 /* #undef HAVE_PERL */
511 #define CUPS_PERL ""
512 /* #undef HAVE_PHP */
513 #define CUPS_PHP ""
514 /* #undef HAVE_PYTHON */
515 #define CUPS_PYTHON ""
516
517
518 /*
519 * Location of the poppler/Xpdf pdftops program...
520 */
521
522 /* #undef HAVE_PDFTOPS */
523 #define CUPS_PDFTOPS ""
524
525
526 /*
527 * Location of the Ghostscript gs program...
528 */
529
530 /* #undef HAVE_GHOSTSCRIPT */
531 #define CUPS_GHOSTSCRIPT ""
532
533
534 /*
535 * Do we have Darwin's CoreFoundation and SystemConfiguration frameworks?
536 */
537
538 /* #undef HAVE_COREFOUNDATION */
539 /* #undef HAVE_SYSTEMCONFIGURATION */
540
541
542 /*
543 * Do we have CoreFoundation public and private headers?
544 */
545
546 /* #undef HAVE_COREFOUNDATION_H */
547 /* #undef HAVE_CFPRIV_H */
548 /* #undef HAVE_CFBUNDLEPRIV_H */
549
550
551 /*
552 * Do we have ApplicationServices public headers?
553 */
554
555 /* #undef HAVE_APPLICATIONSERVICES_H */
556
557
558 /*
559 * Do we have the SCDynamicStoreCopyComputerName function?
560 */
561
562 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
563
564
565 /*
566 * Do we have MacOSX 10.4's mbr_XXX functions()?
567 */
568
569 /* #undef HAVE_MEMBERSHIP_H */
570 /* #undef HAVE_MEMBERSHIPPRIV_H */
571 /* #undef HAVE_MBR_UID_TO_UUID */
572
573
574 /*
575 * Do we have Darwin's notify_post() header and function?
576 */
577
578 /* #undef HAVE_NOTIFY_H */
579 /* #undef HAVE_NOTIFY_POST */
580
581
582 /*
583 * Do we have DBUS?
584 */
585
586 /* #undef HAVE_DBUS */
587 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
588
589
590 /*
591 * Do we have the AppleTalk/at_proto.h header?
592 */
593
594 /* #undef HAVE_APPLETALK_AT_PROTO_H */
595
596
597 /*
598 * Do we have the GSSAPI support library (for Kerberos support)?
599 */
600
601 /* #undef HAVE_GSSAPI */
602 /* #undef HAVE_GSSAPI_H */
603 /* #undef HAVE_GSSAPI_GSSAPI_H */
604 /* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
605 /* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
606 /* #undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY */
607 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
608 /* #undef HAVE_KRB5_CC_NEW_UNIQUE */
609 /* #undef HAVE_KRB5_IPC_CLIENT_SET_TARGET_UID */
610 /* #undef HAVE_KRB5_H */
611 /* #undef HAVE_HEIMDAL */
612
613
614 /*
615 * Default GSS service name...
616 */
617
618 #define CUPS_DEFAULT_GSSSERVICENAME "host"
619
620
621 /*
622 * Select/poll interfaces...
623 */
624
625 /* #undef HAVE_POLL */
626 /* #undef HAVE_EPOLL */
627 /* #undef HAVE_KQUEUE */
628
629
630 /*
631 * Do we have the <dlfcn.h> header?
632 */
633
634 /* #undef HAVE_DLFCN_H */
635
636
637 /*
638 * Do we have <sys/param.h>?
639 */
640
641 /* #undef HAVE_SYS_PARAM_H */
642
643
644 /*
645 * Do we have <sys/ucred.h>?
646 */
647
648 /* #undef HAVE_SYS_UCRED_H */
649
650
651 /*
652 * Do we have removefile()?
653 */
654
655 /* #undef HAVE_REMOVEFILE */
656
657
658 /*
659 * Do we have <sandbox.h>?
660 */
661
662 /* #undef HAVE_SANDBOX_H */
663
664
665 /*
666 * Which random number generator function to use...
667 */
668
669 /* #undef HAVE_ARC4RANDOM */
670 /* #undef HAVE_RANDOM */
671 /* #undef HAVE_LRAND48 */
672
673 #ifdef HAVE_ARC4RANDOM
674 # define CUPS_RAND() arc4random()
675 # define CUPS_SRAND(v) arc4random_stir()
676 #elif defined(HAVE_RANDOM)
677 # define CUPS_RAND() random()
678 # define CUPS_SRAND(v) srandom(v)
679 #elif defined(HAVE_LRAND48)
680 # define CUPS_RAND() lrand48()
681 # define CUPS_SRAND(v) srand48(v)
682 #else
683 # define CUPS_RAND() rand()
684 # define CUPS_SRAND(v) srand(v)
685 #endif /* HAVE_ARC4RANDOM */
686
687
688 /*
689 * Do we have vproc_transaction_begin/end?
690 */
691
692 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
693
694
695 /*
696 * Do we have libusb?
697 */
698
699 /* #undef HAVE_USB_H */
700
701
702 /*
703 * Do we have libwrap and tcpd.h?
704 */
705
706 /* #undef HAVE_TCPD_H */
707
708
709 #endif /* !_CUPS_CONFIG_H_ */
710
711 /*
712 * End of "$Id: config.h 6649 2007-07-11 21:46:42Z mike $".
713 */