]> git.ipfire.org Git - thirdparty/cups.git/blob - vcnet/config.h
Get builds working on Windows again.
[thirdparty/cups.git] / vcnet / config.h
1 /*
2 * "$Id$"
3 *
4 * Configuration file for CUPS on Windows.
5 *
6 * Copyright 2007-2013 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 <io.h>
28 #include <direct.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 mkdir(d,p) _mkdir(d)
46 #define open _open
47 #define read _read
48 #define rmdir _rmdir
49 #define snprintf _snprintf
50 #define strdup _strdup
51 #define unlink _unlink
52 #define vsnprintf _vsnprintf
53 #define write _write
54
55
56 /*
57 * Map the POSIX sleep() and usleep() functions to the Win32 Sleep() function...
58 */
59
60 typedef unsigned long useconds_t;
61 #define sleep(X) Sleep(1000 * (X))
62 #define usleep(X) Sleep((X)/1000)
63
64
65 /*
66 * Map various parameters to Posix style system calls
67 */
68
69 # define F_OK 00
70 # define W_OK 02
71 # define R_OK 04
72 # define O_RDONLY _O_RDONLY
73 # define O_WRONLY _O_WRONLY
74 # define O_CREATE _O_CREAT
75 # define O_TRUNC _O_TRUNC
76
77
78 /*
79 * Compiler stuff...
80 */
81
82 #undef const
83 #undef __CHAR_UNSIGNED__
84
85
86 /*
87 * Version of software...
88 */
89
90 #define CUPS_SVERSION "CUPS v2.0.0"
91 #define CUPS_MINIMAL "CUPS/2.0.0"
92
93
94 /*
95 * Default user and groups...
96 */
97
98 #define CUPS_DEFAULT_USER ""
99 #define CUPS_DEFAULT_GROUP ""
100 #define CUPS_DEFAULT_SYSTEM_GROUPS ""
101 #define CUPS_DEFAULT_PRINTOPERATOR_AUTH ""
102
103
104 /*
105 * Default file permissions...
106 */
107
108 #define CUPS_DEFAULT_CONFIG_FILE_PERM 0640
109 #define CUPS_DEFAULT_LOG_FILE_PERM 0644
110
111
112 /*
113 * Default logging settings...
114 */
115
116 #define CUPS_DEFAULT_LOG_LEVEL "warn"
117 #define CUPS_DEFAULT_ACCESS_LOG_LEVEL "actions"
118
119
120 /*
121 * Default fatal error settings...
122 */
123
124 #define CUPS_DEFAULT_FATAL_ERRORS "config"
125
126
127 /*
128 * Default browsing settings...
129 */
130
131 #define CUPS_DEFAULT_BROWSING 1
132 #define CUPS_DEFAULT_BROWSE_LOCAL_PROTOCOLS ""
133 #define CUPS_DEFAULT_DEFAULT_SHARED 1
134
135
136 /*
137 * Default IPP port...
138 */
139
140 #define CUPS_DEFAULT_IPP_PORT 631
141
142
143 /*
144 * Default printcap file...
145 */
146
147 #define CUPS_DEFAULT_PRINTCAP ""
148
149
150 /*
151 * Default Samba and LPD config files...
152 */
153
154 #define CUPS_DEFAULT_SMB_CONFIG_FILE ""
155 #define CUPS_DEFAULT_LPD_CONFIG_FILE ""
156
157
158 /*
159 * Default MaxCopies value...
160 */
161
162 #define CUPS_DEFAULT_MAX_COPIES 9999
163
164
165 /*
166 * Do we have domain socket support?
167 */
168
169 #undef CUPS_DEFAULT_DOMAINSOCKET
170
171
172 /*
173 * Default WebInterface value...
174 */
175
176 #undef CUPS_DEFAULT_WEBIF
177
178
179 /*
180 * Where are files stored?
181 *
182 * Note: These are defaults, which can be overridden by environment
183 * variables at run-time...
184 */
185
186 #define CUPS_BINDIR "C:/CUPS/bin"
187 #define CUPS_CACHEDIR "C:/CUPS/cache"
188 #define CUPS_DATADIR "C:/CUPS/share"
189 #define CUPS_DOCROOT "C:/CUPS/share/doc"
190 #define CUPS_FONTPATH "C:/CUPS/share/fonts"
191 #define CUPS_LOCALEDIR "C:/CUPS/locale"
192 #define CUPS_LOGDIR "C:/CUPS/logs"
193 #define CUPS_REQUESTS "C:/CUPS/spool"
194 #define CUPS_SBINDIR "C:/CUPS/sbin"
195 #define CUPS_SERVERBIN "C:/CUPS/lib"
196 #define CUPS_SERVERROOT "C:/CUPS/etc"
197 #define CUPS_STATEDIR "C:/CUPS/run"
198
199
200 /*
201 * Do we have ZLIB?
202 */
203
204 #define HAVE_LIBZ 1
205 #define HAVE_INFLATECOPY 1
206
207
208 /*
209 * Do we have PAM stuff?
210 */
211
212 #ifndef HAVE_LIBPAM
213 #define HAVE_LIBPAM 0
214 #endif /* !HAVE_LIBPAM */
215
216 /* #undef HAVE_PAM_PAM_APPL_H */
217 /* #undef HAVE_PAM_SET_ITEM */
218 /* #undef HAVE_PAM_SETCRED */
219
220
221 /*
222 * Do we have <shadow.h>?
223 */
224
225 /* #undef HAVE_SHADOW_H */
226
227
228 /*
229 * Do we have <crypt.h>?
230 */
231
232 /* #undef HAVE_CRYPT_H */
233
234
235 /*
236 * Use <stdint.h>?
237 */
238
239 /* #undef HAVE_STDINT_H */
240
241
242 /*
243 * Use <string.h>, <strings.h>, and/or <bstring.h>?
244 */
245
246 #define HAVE_STRING_H 1
247 /* #undef HAVE_STRINGS_H */
248 /* #undef HAVE_BSTRING_H */
249
250
251 /*
252 * Do we have the long long type?
253 */
254
255 /* #undef HAVE_LONG_LONG */
256
257 #ifdef HAVE_LONG_LONG
258 # define CUPS_LLFMT "%lld"
259 # define CUPS_LLCAST (long long)
260 #else
261 # define CUPS_LLFMT "%ld"
262 # define CUPS_LLCAST (long)
263 #endif /* HAVE_LONG_LONG */
264
265
266 /*
267 * Do we have the strtoll() function?
268 */
269
270 /* #undef HAVE_STRTOLL */
271
272 #ifndef HAVE_STRTOLL
273 # define strtoll(nptr,endptr,base) strtol((nptr), (endptr), (base))
274 #endif /* !HAVE_STRTOLL */
275
276
277 /*
278 * Do we have the strXXX() functions?
279 */
280
281 #define HAVE_STRDUP 1
282 /* #undef HAVE_STRLCAT */
283 /* #undef HAVE_STRLCPY */
284
285
286 /*
287 * Do we have the geteuid() function?
288 */
289
290 /* #undef HAVE_GETEUID */
291
292
293 /*
294 * Do we have the setpgid() function?
295 */
296
297 /* #undef HAVE_SETPGID */
298
299
300 /*
301 * Do we have the vsyslog() function?
302 */
303
304 /* #undef HAVE_VSYSLOG */
305
306
307 /*
308 * Do we have the (v)snprintf() functions?
309 */
310
311 #define HAVE_SNPRINTF 1
312 #define HAVE_VSNPRINTF 1
313
314
315 /*
316 * What signal functions to use?
317 */
318
319 /* #undef HAVE_SIGSET */
320 /* #undef HAVE_SIGACTION */
321
322
323 /*
324 * What wait functions to use?
325 */
326
327 /* #undef HAVE_WAITPID */
328 /* #undef HAVE_WAIT3 */
329
330
331 /*
332 * Do we have the mallinfo function and malloc.h?
333 */
334
335 /* #undef HAVE_MALLINFO */
336 /* #undef HAVE_MALLOC_H */
337
338
339 /*
340 * Do we have the POSIX ACL functions?
341 */
342
343 /* #undef HAVE_ACL_INIT */
344
345
346 /*
347 * Do we have the langinfo.h header file?
348 */
349
350 /* #undef HAVE_LANGINFO_H */
351
352
353 /*
354 * Which encryption libraries do we have?
355 */
356
357 /* #undef HAVE_CDSASSL */
358 /* #undef HAVE_GNUTLS */
359 #define HAVE_SSPISSL
360 #define HAVE_SSL
361
362
363 /*
364 * What Security framework headers do we have?
365 */
366
367 /* #undef HAVE_AUTHORIZATION_H */
368 /* #undef HAVE_SECBASEPRIV_H */
369 /* #undef HAVE_SECCERTIFICATE_H */
370 /* #undef HAVE_SECIDENTITYSEARCHPRIV_H */
371 /* #undef HAVE_SECITEM_H */
372 /* #undef HAVE_SECITEMPRIV_H */
373 /* #undef HAVE_SECPOLICY_H */
374 /* #undef HAVE_SECPOLICYPRIV_H */
375 /* #undef HAVE_SECURETRANSPORTPRIV_H */
376
377
378 /*
379 * Do we have the cssmErrorString function?
380 */
381
382 /* #undef HAVE_CSSMERRORSTRING */
383
384
385 /*
386 * Do we have libpaper?
387 */
388
389 /* #undef HAVE_LIBPAPER */
390
391
392 /*
393 * Do we have mDNSResponder for DNS Service Discovery (aka Bonjour)?
394 */
395
396 #define HAVE_DNSSD 1
397
398
399 /*
400 * Do we have Avahi for DNS Service Discovery (aka Bonjour)?
401 */
402
403 #undef HAVE_AVAHI
404
405
406 /*
407 * Do we have <sys/ioctl.h>?
408 */
409
410 #undef HAVE_SYS_IOCTL_H
411
412
413 /*
414 * Does the "stat" structure contain the "st_gen" member?
415 */
416
417 /* #undef HAVE_ST_GEN */
418
419
420 /*
421 * Does the "tm" structure contain the "tm_gmtoff" member?
422 */
423
424 /* #undef HAVE_TM_GMTOFF */
425
426
427 /*
428 * Do we have rresvport_af()?
429 */
430
431 /* #undef HAVE_RRESVPORT_AF */
432
433
434 /*
435 * Do we have getaddrinfo()?
436 */
437
438 #define HAVE_GETADDRINFO 1
439
440
441 /*
442 * Do we have getnameinfo()?
443 */
444
445 #define HAVE_GETNAMEINFO 1
446
447
448 /*
449 * Do we have getifaddrs()?
450 */
451
452 /* #undef HAVE_GETIFADDRS */
453
454
455 /*
456 * Do we have hstrerror()?
457 */
458
459 /* #undef HAVE_HSTRERROR */
460
461
462 /*
463 * Do we have res_init()?
464 */
465
466 /* #undef HAVE_RES_INIT */
467
468
469 /*
470 * Do we have <resolv.h>
471 */
472
473 /* #undef HAVE_RESOLV_H */
474
475
476 /*
477 * Do we have the <sys/sockio.h> header file?
478 */
479
480 /* #undef HAVE_SYS_SOCKIO_H */
481
482
483 /*
484 * Does the sockaddr structure contain an sa_len parameter?
485 */
486
487 /* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
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 /* #undef HAVE_PDFTOPS_WITH_ORIGPAGESIZES */
525 #define CUPS_PDFTOPS ""
526
527
528 /*
529 * Location of the Ghostscript gs program...
530 */
531
532 /* #undef HAVE_GHOSTSCRIPT */
533 #define CUPS_GHOSTSCRIPT ""
534
535
536 /*
537 * Do we have CoreFoundation public and private headers?
538 */
539
540 /* #undef HAVE_COREFOUNDATION_H */
541 /* #undef HAVE_CFPRIV_H */
542 /* #undef HAVE_CFBUNDLEPRIV_H */
543
544
545 /*
546 * Do we have ApplicationServices public headers?
547 */
548
549 /* #undef HAVE_APPLICATIONSERVICES_H */
550
551
552 /*
553 * Do we have the SCDynamicStoreCopyComputerName function?
554 */
555
556 /* #undef HAVE_SCDYNAMICSTORECOPYCOMPUTERNAME */
557
558
559 /*
560 * Do we have OS X 10.4's mbr_XXX functions?
561 */
562
563 /* #undef HAVE_MEMBERSHIP_H */
564 /* #undef HAVE_MEMBERSHIPPRIV_H */
565 /* #undef HAVE_MBR_UID_TO_UUID */
566
567
568 /*
569 * Do we have Darwin's notify_post header and function?
570 */
571
572 /* #undef HAVE_NOTIFY_H */
573 /* #undef HAVE_NOTIFY_POST */
574
575
576 /*
577 * Do we have DBUS?
578 */
579
580 /* #undef HAVE_DBUS */
581 /* #undef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND */
582
583
584 /*
585 * Do we have the GSSAPI support library (for Kerberos support)?
586 */
587
588 /* #undef HAVE_GSS_ACQUIRE_CRED_EX_F */
589 /* #undef HAVE_GSS_C_NT_HOSTBASED_SERVICE */
590 /* #undef HAVE_GSS_GSSAPI_H */
591 /* #undef HAVE_GSS_GSSAPI_SPI_H */
592 /* #undef HAVE_GSSAPI */
593 /* #undef HAVE_GSSAPI_GSSAPI_H */
594 /* #undef HAVE_GSSAPI_H */
595
596
597 /*
598 * Default GSS service name...
599 */
600
601 #define CUPS_DEFAULT_GSSSERVICENAME "host"
602
603
604 /*
605 * Select/poll interfaces...
606 */
607
608 /* #undef HAVE_POLL */
609 /* #undef HAVE_EPOLL */
610 /* #undef HAVE_KQUEUE */
611
612
613 /*
614 * Do we have the <dlfcn.h> header?
615 */
616
617 /* #undef HAVE_DLFCN_H */
618
619
620 /*
621 * Do we have <sys/param.h>?
622 */
623
624 /* #undef HAVE_SYS_PARAM_H */
625
626
627 /*
628 * Do we have <sys/ucred.h>?
629 */
630
631 /* #undef HAVE_SYS_UCRED_H */
632
633
634 /*
635 * Do we have removefile()?
636 */
637
638 /* #undef HAVE_REMOVEFILE */
639
640
641 /*
642 * Do we have <sandbox.h>?
643 */
644
645 /* #undef HAVE_SANDBOX_H */
646
647
648 /*
649 * Which random number generator function to use...
650 */
651
652 /* #undef HAVE_ARC4RANDOM */
653 /* #undef HAVE_RANDOM */
654 /* #undef HAVE_LRAND48 */
655
656 #ifdef HAVE_ARC4RANDOM
657 # define CUPS_RAND() arc4random()
658 # define CUPS_SRAND(v) arc4random_stir()
659 #elif defined(HAVE_RANDOM)
660 # define CUPS_RAND() random()
661 # define CUPS_SRAND(v) srandom(v)
662 #elif defined(HAVE_LRAND48)
663 # define CUPS_RAND() lrand48()
664 # define CUPS_SRAND(v) srand48(v)
665 #else
666 # define CUPS_RAND() rand()
667 # define CUPS_SRAND(v) srand(v)
668 #endif /* HAVE_ARC4RANDOM */
669
670
671 /*
672 * Do we have vproc_transaction_begin/end?
673 */
674
675 /* #undef HAVE_VPROC_TRANSACTION_BEGIN */
676
677
678 /*
679 * Do we have libusb?
680 */
681
682 /* #undef HAVE_LIBUSB */
683
684
685 /*
686 * Do we have libwrap and tcpd.h?
687 */
688
689 /* #undef HAVE_TCPD_H */
690
691
692 /*
693 * Do we have <iconv.h>?
694 */
695
696 /* #undef HAVE_ICONV_H */
697
698
699 /*
700 * Do we have statfs or statvfs and one of the corresponding headers?
701 */
702
703 /* #undef HAVE_STATFS */
704 /* #undef HAVE_STATVFS */
705 /* #undef HAVE_SYS_MOUNT_H */
706 /* #undef HAVE_SYS_STATFS_H */
707 /* #undef HAVE_SYS_STATVFS_H */
708 /* #undef HAVE_SYS_VFS_H */
709
710
711 /*
712 * Location of OS X localization bundle, if any.
713 */
714
715 /* #undef CUPS_BUNDLEDIR */
716
717
718 /*
719 * Do we have XPC?
720 */
721
722 /* #undef HAVE_XPC */
723 /* #undef HAVE_XPC_PRIVATE_H */
724
725
726 /*
727 * Do we have Mini-XML?
728 */
729
730 /* #undef HAVE_MXML_H */
731
732
733 /*
734 * Do we have the C99 abs() function?
735 */
736
737 /* #undef HAVE_ABS */
738 #if !defined(HAVE_ABS) && !defined(abs)
739 # if defined(__GNUC__) || __STDC_VERSION__ >= 199901L
740 # define abs(x) _cups_abs(x)
741 static inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
742 # elif defined(_MSC_VER)
743 # define abs(x) _cups_abs(x)
744 static __inline int _cups_abs(int i) { return (i < 0 ? -i : i); }
745 # else
746 # define abs(x) ((x) < 0 ? -(x) : (x))
747 # endif /* __GNUC__ || __STDC_VERSION__ */
748 #endif /* !HAVE_ABS && !abs */
749
750 #endif /* !_CUPS_CONFIG_H_ */
751
752 /*
753 * End of "$Id$".
754 */