ff3086448f9e22aba4c937765fee204cb57eb3a6
[bpt/coccinelle.git] / standard.h
1 // clone: yacfe(master), coccinelle, acomment,
2
3 // ****************************************************************************
4 // Prelude, this file is to be used with the -macro_file option of the C parser
5 // ****************************************************************************
6
7 /* This file contains:
8 * - macros found in <.h>
9 * - macros found in .c; macros that cannot be parsed.
10 * In the future should be autodetected
11 * (not so easy to do same for macros in .h cos require to access .h file)
12 * - macros found in ".h"
13 * but where we cant detect that it will be a "bad macro"
14 * - macros found in .c; macros correctly parsed
15 * but where we cant detect that it will be a "bad macro"
16 * - hints, cf below.
17 *
18 * Some of those macros could be deleted and the C code rewritten because
19 * they are "bad" macros.
20 *
21 * todo? perhaps better if could enable/disable some of those expansions
22 * as different software may use conflicting macros.
23 *
24 *
25 * can maybe have a look in sparse/lib.c to see a list of default #define
26 * handled builtin apparently by gcc.
27 */
28
29 // ****************************************************************************
30 // Hints
31 // ****************************************************************************
32
33 /* Cooperation with parsing_hack.ml: some body of macros in this file, such
34 * as MACROSTATEMENT, are considered as magic strings.
35 * I can't just expand those macros into some 'whatever();' because I need
36 * to generate a TMacroStmt for solving some ambiguities in the grammar
37 * for the toplevel stuff I think.
38 * Right now a set of special strings are used as "hints" to the parser
39 * to help it parse code. Those hints are specified in parsing_hack.ml:
40 *
41 * - YACFE_ITERATOR
42 * - YACFE_DECLARATOR
43 * - YACFE_STRING
44 * - YACFE_STATEMENT, or MACROSTATEMENT
45 * - YACFE_ATTRIBUTE
46 * - YACFE_IDENT_BUILDER
47 */
48
49 // ****************************************************************************
50 // Test macros
51 // ****************************************************************************
52
53 // #define FOO(a, OP, b) a OP b
54 // #define FOO(a,b) fn(a,b)
55 #define FOO_METH_TEST(a) YACFE_IDENT_BUILDER
56
57 // ****************************************************************************
58 // Generic macros
59 // ****************************************************************************
60
61 // ****************************************************************************
62 // Yacc macros
63 // ****************************************************************************
64
65 #define YY_PROTO(x) x
66 #define yyconst const
67
68
69 // ****************************************************************************
70 // GNU Hello macros
71 // ****************************************************************************
72
73 #define __getopt_argv_const const
74
75
76 // ****************************************************************************
77 // Gcc (as in the source of gcc code) macros
78 // ****************************************************************************
79
80
81 // ****************************************************************************
82 // Linux macros
83 // ****************************************************************************
84
85 // ----------------------------------------------------------------------------
86 // Attributes. could perhaps generalize via "__.*"
87 // ----------------------------------------------------------------------------
88 #define __init
89 #define __exit
90 #define __user
91 #define __iomem
92 #define __initdata
93 #define __exitdata
94 #define __devinit
95 #define __devexit
96 #define __devinitdata
97 #define __cpuinit
98 #define __cpuinitdata
99 #define __init_or_module
100 #define __initdata_or_module
101 #define __pminit
102 #define __pminitdata
103
104 #define __cacheline_aligned
105 #define ____cacheline_aligned
106 #define __cacheline_aligned_in_smp
107 #define ____cacheline_aligned_in_smp
108 #define ____cacheline_internodealigned_in_smp
109
110 #define __ALIGNED__
111 #define __3xp_aligned
112
113 #define __pmac
114 #define __force
115 #define __nocast
116 #define __read_mostly
117
118 #define __must_check
119 // pb
120 #define __unused
121 #define __maybe_unused
122
123
124 #define __attribute_used__
125 #define __attribute_pure__
126 #define __attribute_const__
127 // #define _attribute__const __attribute__((const))
128
129 #define __always_inline
130
131 #define __xipram
132
133 // in the other part of the kernel, in arch/, mm/, etc
134 #define __sched
135 #define __initmv
136 #define __exception
137 #define __cpuexit
138 #define __kprobes
139 #define __meminit
140 #define __meminitdata
141 #define __nosavedata
142 #define __kernel
143 #define __nomods_init
144 #define __apicdebuginit
145 #define __ipc_init
146 #define __modinit
147 #define __lockfunc
148 #define __weak
149 #define __tlb_handler_align
150 #define __lock_aligned
151 #define __force_data
152 #define __nongprelbss
153 #define __nongpreldata
154 #define __noreturn
155
156 #define __section_jiffies
157 #define __vsyscall_fn
158 #define __section_vgetcpu_mode
159 #define __section_vsyscall_gtod_data
160
161 // in header files
162 #define __bitwise
163 #define __bitwise__
164 #define __deprecated
165
166
167 // last found
168 #define __init_refok
169
170
171 // maybe only in old kernel
172 #define __openfirmware
173
174
175 #define __extension__
176
177 #define __thread
178 #define __used
179 #define __pure
180
181 #define __ref
182 #define __refdata
183
184 #define __uses_jump_to_uncached
185
186 // ----------------------------------------------------------------------------
187 // String macros
188 // ----------------------------------------------------------------------------
189
190 /* string macro. normally handle quite well by mu lalr(k), but
191 * sometimes not enough, if have for instance the XX YY case, could
192 * be considered as a declaration with XX being a typedef, so would
193 * Have ambiguity. So at least by adding this special case, we can
194 * catch more correct string-macro, no more a XX YY but now a good
195 * "XX" YY
196 *
197 * cf include/linux/kernel.h
198 *
199 * For stringification I need to have at least a witness, a string,
200 * and sometimes have just printk(KERN_WARNING MYSTR) and it could
201 * be transformed in a typedef later, so better to at least
202 * transform in string already the string-macro we know.
203 *
204 * Perhaps better to apply also as soon as possible the
205 * correct macro-annotation tagging (__init & co) to be able to
206 * filter them as soon as possible so that they will not polluate
207 * our pattern-matching that come later.
208 */
209
210 #define KERN_EMERG "KERN_EMERG"
211 #define KERN_ALERT "KERN_ALERT"
212 #define KERN_CRIT "KERN_CRIT"
213 #define KERN_ERR "KERN_ERR"
214 #define KERN_WARNING "KERN_WARNING"
215 #define KERN_NOTICE "KERN_NOTICE"
216 #define KERN_INFO "KERN_INFO"
217 #define KERN_DEBUG "KERN_DEBUG"
218
219
220 /* EX_TABLE & co.
221 *
222 * Replaced by a string. We can't put everything as comment
223 * because it can be part of an expression where we wait for
224 * something, where we wait for a string. So at least we
225 * must keep the EX_TABLE token and transform it as a string.
226 *
227 * normally not needed if have good stringification of macro
228 * but those macros are sometimes used multiple times
229 * as in EX_TABLE(0b) EX_TABLE(1b) and we don't detect
230 * it well yet.
231 */
232
233 // TODO don't use x :(
234 #define EX_TABLE(x) "TOTO"
235 #define ASM_EXCEPTIONTABLE_ENTRY(x) "TOTO"
236 #define DCACHE_CLEAR(x) "TOTO"
237 #define PPC405_ERR77(x) "TOTO"
238
239
240
241
242 // ----------------------------------------------------------------------------
243 // Alias keywords
244 // ----------------------------------------------------------------------------
245 // pb, false positive, can also be a #define cst and use as 'case CONST:'
246 //#define CONST const
247
248
249 #define STATIC static
250 #define _static static
251
252 #define noinline
253
254 #define __CS4231_INLINE__ inline
255 #define CCIO_INLINE inline
256 #define SBA_INLINE inline
257
258 #define STATIC_INLINE static inline
259 #define __EXTERN_INLINE extern inline
260
261 #define AGPEXTERN extern
262
263 #define PNMI_STATIC static
264 #define RLMT_STATIC static
265 #define SISINITSTATIC static
266 #define SCTP_STATIC static
267
268 #define BUGLVL if
269 #define IFDEBUG if
270
271 #define TRACE_EXIT return
272
273
274 // ----------------------------------------------------------------------------
275 // linkage
276 // ----------------------------------------------------------------------------
277
278 #define fastcall
279 #define asmlinkage
280
281 #define far
282 #define SK_FAR
283
284 // pb
285 //#define near
286
287
288 // ----------------------------------------------------------------------------
289 // ----------------------------------------------------------------------------
290
291 #define INITSECTION
292
293 #define NORET_TYPE
294
295 #define compat_init_data
296
297 #define DIVA_EXIT_FUNCTION
298 #define DIVA_INIT_FUNCTION
299 #define ACPI_SYSTEM_XFACE
300
301 #define ASC_INITDATA
302 #define in2000__INITDATA
303 #define PACKED
304
305 #define WPMINFO
306 #define CPMINFO
307 #define PMINFO
308
309 #define ACPI_INTERNAL_VAR_XFACE
310
311 #define SISIOMEMTYPE
312
313 #define ACPI_STATE_COMMON
314 #define ACPI_PARSE_COMMON
315 #define ACPI_COMMON_DEBUG_MEM_HEADER
316
317
318 #define nabi_no_regargs
319
320
321 #define ATTRIB_NORET
322 #define ATTRIBUTE_UNUSED
323 #define BTEXT
324 #define BTDATA
325 #define PAGE_ALIGNED
326
327 #define EARLY_INIT_SECTION_ATTR
328
329 // pb
330 //#define INIT
331
332 #define IDI_CALL_ENTITY_T
333 #define IDI_CALL_LINK_T
334
335 /* cf gcc-linux.h
336 * A trick to suppress uninitialized variable warning without generating any
337 * code
338 */
339 #define uninitialized_var(x) x = x
340 // as in u16 uninitialized_var(ioboard_type); /* GCC be quiet */
341
342 // ----------------------------------------------------------------------------
343 // ----------------------------------------------------------------------------
344
345 #define __releases(x)
346 #define __acquires(x)
347 #define __declspec(x)
348 #define __page_aligned(x)
349 #define __vsyscall(x)
350
351 // ----------------------------------------------------------------------------
352 // ----------------------------------------------------------------------------
353
354
355 //conflict with a macro of firefox
356 //#define FASTCALL(x) x
357 #define PARAMS(x) x
358
359
360
361 // ----------------------------------------------------------------------------
362 // ----------------------------------------------------------------------------
363
364 // include/asm-arm/mach/arch.h
365 // #define MACHINE_START(x) struct foo { x }
366 #define MACHINE_START(_type,_name) \
367 static const struct machine_desc __mach_desc_##_type \
368 /* __used*/ \
369 __attribute__((__section__(".arch.info.init"))) = { \
370 .nr = MACH_TYPE_##_type, \
371 .name = _name,
372
373 #define MACHINE_END \
374 };
375
376 // include/asm-powerpc/machdep.h
377 #define define_machine(name) \
378 extern struct machdep_calls mach_##name; \
379 EXPORT_SYMBOL(mach_##name); \
380 struct machdep_calls mach_##name /*__machine_desc*/ =
381
382
383 // ----------------------------------------------------------------------------
384 // Declare like macros (in structure def), or tricky Declare macros
385 // ----------------------------------------------------------------------------
386
387 // include/asm-i386/pci.h
388 // the DECLARE are detected by parsing_hack but not when they are
389 // inside a struct def.
390 #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
391 #define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
392
393 // defined in drivers/infiniband/hw/mthca/mthca_doorbell.h
394 #define MTHCA_DECLARE_DOORBELL_LOCK(doorbell_lock)
395
396 // include/linux/types.h
397 //#define BITS_TO_LONGS(bits) \
398 // (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
399 #define DECLARE_BITMAP(name,bits) \
400 /*unsigned*/ long name[BITS_TO_LONGS(bits)]
401
402
403 // include/asm-i386/percpu.h
404 // interesting macro where we see the need of __typeof__(type) with
405 // for example DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf);
406 #define DEFINE_PER_CPU(type, name) \
407 __attribute__((__section__(".data.percpu"))) __typeof__(type) per_cpu__##name
408 #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name
409
410
411
412 // include/linux/kobject.h
413 #define decl_subsys(_name,_type,_uevent_ops) \
414 struct subsystem _name##_subsys = { \
415 .kset = { \
416 .kobj = { .name = __stringify(_name) }, \
417 .ktype = _type, \
418 .uevent_ops =_uevent_ops, \
419 } \
420 }
421
422 // ----------------------------------------------------------------------------
423 // ----------------------------------------------------------------------------
424
425 // pb: if use this macro then we will not transform the argument of CS_CHECK
426 // in some rules.
427 //#define CS_CHECK(fn, ret) \
428 // do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
429
430
431 // bt2/hci_bcsp.c
432 #define BCSP_CRC_INIT(x) x = 0xffff
433
434
435 // sound/oss/cs46xx_wrapper-24.h
436 #define CS_OWNER .owner =
437 #define CS_THIS_MODULE THIS_MODULE,
438
439
440 // sound/sparc/dbri.c
441 // "bad macro", have a ',' at the end
442 #define CS4215_SINGLE(xname, entry, shift, mask, invert) \
443 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
444 .info = snd_cs4215_info_single, \
445 .get = snd_cs4215_get_single, .put = snd_cs4215_put_single, \
446 .private_value = entry | (shift << 8) | (mask << 16) | (invert << 24) },
447
448 // drivers/media/video/sn9c102/sn9c102_sensor.h
449 //#define sn9c102_write_const_regs(sn9c102_device, data...) \
450 // ({ const static u8 _valreg[][2] = {data}; \
451 // sn9c102_write_regs(sn9c102_device, _valreg, ARRAY_SIZE(_valreg)); })
452
453
454
455
456
457 // drivers/s390/cio/qdio.h
458 #define SYNC_MEMORY if (unlikely(q->siga_sync)) qdio_siga_sync_q(q)
459 #define SYNC_MEMORY_ALL if (unlikely(q->siga_sync)) \
460 qdio_siga_sync(q,~0U,~0U)
461 #define SYNC_MEMORY_ALL_OUTB if (unlikely(q->siga_sync)) \
462 qdio_siga_sync(q,~0U,0)
463
464 // drivers/scsi/g_NCR5380.c
465 #define ANDP ,
466
467
468 // drivers/scsi/ncr53c8xx.c
469 // generate lots of errors because error en cascade car dans l'initialiseur
470 // il y'a des '}' dans la premiere colonne
471 #define PREFETCH_FLUSH SCR_CALL, PADDRH (wait_dma),
472
473 // drivers/net/e100.c
474 // pbs false positive, defined in another manner in some files
475 //#define X(a,b) a,b
476
477
478 // net/ipv4/netfilter/ip_conntrack_helper_h323_asn1.c
479 // also used in other.c that don't do any include :(
480 // but locally redefined in drivers/net/bnx2.c :( with a
481 // #define FNAME 0x8
482 #define FNAME(name) name,
483
484
485 // drivers/net/tulip/de4x5.c
486 #define DESC_ALIGN
487
488
489 // in .h
490 #define MPI_POINTER *
491
492 // mega4/soc.c mega4/socal.c
493 // cause false typedef inference if let soc_printk
494 #define soc_printk printk
495 #define socal_printk printk
496
497
498 // ----------------------------------------------------------------------------
499 // Initializer array macros
500 // ----------------------------------------------------------------------------
501
502 // drivers/net/wireless/bcm43xx/bcm43xx_wx.c
503 // defined in similar way multiple times, in the same file and in another one
504 #define WX(ioctl) [(ioctl) - SIOCSIWCOMMIT]
505 // #define WX(x) [(x)-SIOCIWFIRST]
506
507 // drivers/net/wireless/ipw2200.c
508 #define IW_IOCTL(x) [(x)-SIOCSIWCOMMIT]
509
510 // drivers/net/wireless/zd1211rw/zd_netdev.c
511 #define PRIV_OFFSET(x) [(x)-SIOCIWFIRSTPRIV]
512
513 // drivers/net/wireless/zd1211rw/zd_rf.h
514 #define RF_CHANNEL(ch) [(ch)-1]
515
516 // drivers/net/wireless/zd1211rw/zd_rf_uw2453.c
517 #define RF_CHANPAIR(a,b) [CHAN_TO_PAIRIDX(a)]
518
519 // drivers/net/wireless/arlan-proc.c
520 // incomplete macro, the real macro is quite complex and use other macros
521 #define ARLAN_SYSCTL_TABLE_TOTAL(x)
522
523
524 // ----------------------------------------------------------------------------
525 // ----------------------------------------------------------------------------
526
527 // drivers/net/cxgb3/t3_hw.c
528 #define VPD_ENTRY(name, len) \
529 u8 name##_kword[2]; u8 name##_len; u8 name##_data[len]
530
531
532 // #define rtrc(i) {}
533
534 // ----------------------------------------------------------------------------
535 // ----------------------------------------------------------------------------
536
537 // drivers/video/nvidia/nv_type.h
538 // use: SetBitField(h_blank_e, 5: 5, 7:7)
539 //#define BITMASK(t,b) (((unsigned)(1U << (((t)-(b)+1)))-1) << (b))
540 //#define MASKEXPAND(mask) BITMASK(1?mask,0?mask)
541 //#define SetBF(mask,value) ((value) << (0?mask))
542 //#define GetBF(var,mask) (((unsigned)((var) & MASKEXPAND(mask))) >> (0?mask) )
543 //#define SetBitField(value,from,to) SetBF(to, GetBF(value,from))
544 //#define SetBit(n) (1<<(n))
545 //#define Set8Bits(value) ((value)&0xff)
546
547
548 // drivers/video/sis/init.c
549 // use: GETBITSTR((SiS_Pr->CVTotal -2), 10:10, 0:0)
550 //#define BITMASK(h,l) (((unsigned)(1U << ((h)-(l)+1))-1)<<(l))
551 //#define GENMASK(mask) BITMASK(1?mask,0?mask)
552 //#define GETBITS(var,mask) (((var) & GENMASK(mask)) >> (0?mask))
553 //#define GETBITSTR(val,from,to) ((GETBITS(val,from)) << (0?to))
554
555
556 // fs/afs/internal.h
557 #define ASSERTCMP(X, OP, Y) \
558 do { \
559 if (unlikely(!((X) OP (Y)))) { \
560 printk(KERN_ERR "\n"); \
561 printk(KERN_ERR "AFS: Assertion failed\n"); \
562 printk(KERN_ERR "%lu " /*#OP*/ " %lu is false\n", \
563 (unsigned long)(X), (unsigned long)(Y)); \
564 printk(KERN_ERR "0x%lx " /*#OP*/ " 0x%lx is false\n", \
565 (unsigned long)(X), (unsigned long)(Y)); \
566 BUG(); \
567 } \
568 } while(0)
569
570 #define ASSERTIFCMP(C, X, OP, Y) \
571 do { \
572 if (unlikely((C) && !((X) OP (Y)))) { \
573 printk(KERN_ERR "\n"); \
574 printk(KERN_ERR "AFS: Assertion failed\n"); \
575 printk(KERN_ERR "%lu " /*#OP*/ " %lu is false\n", \
576 (unsigned long)(X), (unsigned long)(Y)); \
577 printk(KERN_ERR "0x%lx " /*#OP*/ " 0x%lx is false\n", \
578 (unsigned long)(X), (unsigned long)(Y)); \
579 BUG(); \
580 } \
581 } while(0)
582
583
584 #define ASSERTRANGE(L, OP1, N, OP2, H) \
585 do { \
586 if (unlikely(!((L) OP1 (N)) || !((N) OP2 (H)))) { \
587 printk(KERN_ERR "\n"); \
588 printk(KERN_ERR "AFS: Assertion failed\n"); \
589 printk(KERN_ERR "%lu "/*#OP1*/" %lu "/*#OP2*/" %lu is false\n", \
590 (unsigned long)(L), (unsigned long)(N), \
591 (unsigned long)(H)); \
592 printk(KERN_ERR "0x%lx "/*#OP1*/" 0x%lx "/*#OP2*/" 0x%lx is false\n", \
593 (unsigned long)(L), (unsigned long)(N), \
594 (unsigned long)(H)); \
595 BUG(); \
596 } \
597 } while(0)
598
599
600
601
602 // loop, macro without ';', single macro. ex: DEBUG()
603
604 // TODO should find the definition because we don't use 'x' and so
605 // may lose code sites with coccinelle. If expand correctly, will
606 // still don't transform correctly but at least will detect the place.
607
608
609
610
611 #define ASSERT(x) MACROSTATEMENT
612 #define IRDA_ASSERT(x) MACROSTATEMENT
613
614 #define CHECK_NULL(x) MACROSTATEMENT
615
616 //#define DEBUG(x) MACROSTATEMENT
617 #define DEBUG0(x) MACROSTATEMENT
618 #define DEBUG1(x) MACROSTATEMENT
619 #define DEBUG2(x) MACROSTATEMENT
620 #define DEBUG3(x) MACROSTATEMENT
621
622
623 #define DBG(x) MACROSTATEMENT
624 #define DEB(x) MACROSTATEMENT
625 #define PARSEDEBUG(x) MACROSTATEMENT
626 #define DEBC(x) MACROSTATEMENT
627 #define DBG_TRC(x) MACROSTATEMENT
628 #define DBG_ERR(x) MACROSTATEMENT
629 #define DBG_FTL(x) MACROSTATEMENT
630
631 #define DBGINFO(x) MACROSTATEMENT
632 #define DFLOW(x) MACROSTATEMENT
633 #define DFLIP(x) MACROSTATEMENT
634 #define DLOG_INT_TRIG(x) MACROSTATEMENT
635
636 #define D3(x) MACROSTATEMENT
637 #define D1(x) MACROSTATEMENT
638 #define DB(x) MACROSTATEMENT
639 #define DCBDEBUG(x) MACROSTATEMENT
640 #define SCSI_LOG_MLQUEUE(x) MACROSTATEMENT
641
642 #define PLND(x) MACROSTATEMENT
643 #define FCALND(x) MACROSTATEMENT
644 #define FCALD(x) MACROSTATEMENT
645
646 #define DEBUGRECURSION(x) MACROSTATEMENT
647
648 #define DEBUGPIO(x) MACROSTATEMENT
649 #define VDEB(x) MACROSTATEMENT
650
651 #define READ_UNLOCK_IRQRESTORE(x) MACROSTATEMENT
652
653 #define TRACE_CATCH(x) MACROSTATEMENT
654
655 #define PDBGG(x) MACROSTATEMENT
656
657 #define IF_ABR(x) MACROSTATEMENT
658 #define IF_EVENT(x) MACROSTATEMENT
659 #define IF_ERR(x) MACROSTATEMENT
660 #define IF_CBR(x) MACROSTATEMENT
661 #define IF_INIT(x) MACROSTATEMENT
662 #define IF_RX(x) MACROSTATEMENT
663
664 #define SOD(x) MACROSTATEMENT
665
666 #define KDBG(x) MACROSTATEMENT
667
668 #define IRDA_ASSERT_LABEL(x) MACROSTATEMENT
669
670
671
672
673
674 // ----------------------------------------------------------------------------
675 // Difficult foreach
676 // ----------------------------------------------------------------------------
677
678 // include/linux/sched.h
679 #define while_each_thread(g, t) \
680 while ((t = next_thread(t)) != g)
681
682
683
684 // net/decnet/dn_fib.c
685 #define for_fib_info() { struct dn_fib_info *fi;\
686 for(fi = dn_fib_info_list; fi; fi = fi->fib_next)
687 #define endfor_fib_info() }
688
689 #define for_nexthops(fi) { int nhsel; const struct dn_fib_nh *nh;\
690 for(nhsel = 0, nh = (fi)->fib_nh; nhsel < (fi)->fib_nhs; nh++, nhsel++)
691
692 #define change_nexthops(fi) { int nhsel; struct dn_fib_nh *nh;\
693 for(nhsel = 0, nh = (struct dn_fib_nh *)((fi)->fib_nh); nhsel < (fi)->fib_nhs; nh++, nhsel++)
694
695 #define endfor_nexthops(fi) }
696
697
698 // ----------------------------------------------------------------------------
699 // Macros around function prototype
700 // ----------------------------------------------------------------------------
701
702
703 // net/sched/em_meta.c
704 #define META_COLLECTOR(FUNC) static void meta_##FUNC(struct sk_buff *skb, \
705 struct tcf_pkt_info *info, struct meta_value *v, \
706 struct meta_obj *dst, int *err)
707
708
709 #define GDTH_INITFUNC(x,y) x y
710 #define ASC_INITFUNC(x,y) x y
711
712
713 // ----------------------------------------------------------------------------
714 // If-like macros
715 // ----------------------------------------------------------------------------
716
717 // include/linux/lockd/debug.h
718 // include/linux/nfs_fs.h
719 // include/linux/nfsd/debug.h
720 // include/linux/sunrpc/debug.h
721 //#define ifdebug(flag) if (unlikely(nlm_debug & NLMDBG_##flag))
722 #define ifdebug(flag) if (0)
723
724
725
726 // ----------------------------------------------------------------------------
727 //#define __PROM_O32
728
729 // ----------------------------------------------------------------------------
730 // for tests-big/ macros, may be obsolete now cos fixed in latest kernel
731 // ----------------------------------------------------------------------------
732
733 // rule10
734 //#define ACPI_MODULE_NAME(x)
735
736
737
738
739 // ****************************************************************************
740 // Httpd (apache) macros
741 // ****************************************************************************
742
743 #define AP_DECLARE(x) x
744 #define PROXY_DECLARE(x) x
745 #define CACHE_DECLARE(x) x
746 #define DBD_DECLARE_NONSTD(x) x
747 #define DAV_DECLARE(x) x
748 #define APU_DECLARE(x) x
749 #define APU_DECLARE_NONSTD(x) x
750 #define APR_DECLARE(x) x
751 #define AP_CORE_DECLARE(x) x
752 #define AP_DECLARE_NONSTD(x) x
753 #define AP_CORE_DECLARE_NONSTD(x) x
754 #define APR_OPTIONAL_FN_TYPE(x) x
755 #define DAV_DECLARE_NONSTD(x) x
756 #define APR_DECLARE_NONSTD(x) x
757
758 #define APU_DECLARE_DATA
759 #define APR_THREAD_FUNC
760 #define AP_DECLARE_DATA
761 #define PROXY_DECLARE_DATA
762 #define AP_MODULE_DECLARE_DATA
763 #define APR_DECLARE_DATA
764
765
766
767 #define APR_INLINE inline
768 #define EXPORT static
769 #define REGISTER register
770
771 #define MODSSL_D2I_SSL_SESSION_CONST const
772 #define MODSSL_D2I_X509_CONST const
773 #define MODSSL_D2I_PrivateKey_CONST const
774 #define MODSSL_D2I_SSL_SESSION_CONST const
775
776 #define STACK_OF(X509_NAME) X509_NAME
777
778 #define MODSSL_PCHAR_CAST (pchar)
779
780 #define WINAPI
781 //#define CALLBACK
782 // generate false positive in Linux
783 #define APIENTRY
784 #define __declspec(x)
785 #define __stdcall
786
787
788 //#define module struct xxx
789
790 #define APR_POOL_IMPLEMENT_ACCESSOR(shm)
791
792 #define ADD_SUITE(suite) suite;
793
794 // ****************************************************************************
795 // CISCO vpn client macros
796 // ****************************************************************************
797
798 // #define NOREGPARM
799 // #define IN
800 // #define OUT
801 // #define OPTIONAL
802
803 #define likely(x) x
804 #define unlikely(x) x