-
Notifications
You must be signed in to change notification settings - Fork 10
/
ppport.h
3331 lines (3319 loc) · 79.8 KB
/
ppport.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#if 0
<<'SKIP';
#endif
/*
----------------------------------------------------------------------
ppport.h -- Perl/Pollution/Portability Version 3.32
Automatically created by Devel::PPPort running under perl 5.024000.
Version 3.x, Copyright (c) 2004-2013, Marcus Holland-Moritz.
Version 2.x, Copyright (C) 2001, Paul Marquess.
Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
----------------------------------------------------------------------
SKIP
if (@ARGV && $ARGV[0] eq '--unstrip') {
eval { require Devel::PPPort };
$@ and die "Cannot require Devel::PPPort, please install.\n";
if (eval $Devel::PPPort::VERSION < 3.32) {
die "ppport.h was originally generated with Devel::PPPort 3.32.\n"
. "Your Devel::PPPort is only version $Devel::PPPort::VERSION.\n"
. "Please install a newer version, or --unstrip will not work.\n";
}
Devel::PPPort::WriteFile($0);
exit 0;
}
print <<END;
Sorry, but this is a stripped version of $0.
To be able to use its original script and doc functionality,
please try to regenerate this file using:
$^X $0 --unstrip
END
__DATA__*/
#ifndef _P_P_PORTABILITY_H_
#define _P_P_PORTABILITY_H_
#ifndef DPPP_NAMESPACE
#define DPPP_NAMESPACE DPPP_
#endif
#define DPPP_CAT2(x,y) CAT2(x,y)
#define DPPP_(name) DPPP_CAT2(DPPP_NAMESPACE, name)
#ifndef PERL_REVISION
#if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
#define PERL_PATCHLEVEL_H_IMPLICIT
#include <patchlevel.h>
#endif
#if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
#include <could_not_find_Perl_patchlevel.h>
#endif
#ifndef PERL_REVISION
#define PERL_REVISION (5)
#define PERL_VERSION PATCHLEVEL
#define PERL_SUBVERSION SUBVERSION
#endif
#endif
#define _dpppDEC2BCD(dec) ((((dec)/100)<<8)|((((dec)%100)/10)<<4)|((dec)%10))
#define PERL_BCDVERSION ((_dpppDEC2BCD(PERL_REVISION)<<24)|(_dpppDEC2BCD(PERL_VERSION)<<12)|_dpppDEC2BCD(PERL_SUBVERSION))
#if PERL_REVISION != 5
#error ppport.h only works with Perl version 5
#endif
#ifndef dTHR
#define dTHR dNOOP
#endif
#ifndef dTHX
#define dTHX dNOOP
#endif
#ifndef dTHXa
#define dTHXa(x) dNOOP
#endif
#ifndef pTHX
#define pTHX void
#endif
#ifndef pTHX_
#define pTHX_
#endif
#ifndef aTHX
#define aTHX
#endif
#ifndef aTHX_
#define aTHX_
#endif
#if (PERL_BCDVERSION < 0x5006000)
#ifdef USE_THREADS
#define aTHXR thr
#define aTHXR_ thr,
#else
#define aTHXR
#define aTHXR_
#endif
#define dTHXR dTHR
#else
#define aTHXR aTHX
#define aTHXR_ aTHX_
#define dTHXR dTHX
#endif
#ifndef dTHXoa
#define dTHXoa(x) dTHXa(x)
#endif
#ifdef I_LIMITS
#include <limits.h>
#endif
#ifndef PERL_UCHAR_MIN
#define PERL_UCHAR_MIN ((unsigned char)0)
#endif
#ifndef PERL_UCHAR_MAX
#ifdef UCHAR_MAX
#define PERL_UCHAR_MAX ((unsigned char)UCHAR_MAX)
#else
#ifdef MAXUCHAR
#define PERL_UCHAR_MAX ((unsigned char)MAXUCHAR)
#else
#define PERL_UCHAR_MAX ((unsigned char)~(unsigned)0)
#endif
#endif
#endif
#ifndef PERL_USHORT_MIN
#define PERL_USHORT_MIN ((unsigned short)0)
#endif
#ifndef PERL_USHORT_MAX
#ifdef USHORT_MAX
#define PERL_USHORT_MAX ((unsigned short)USHORT_MAX)
#else
#ifdef MAXUSHORT
#define PERL_USHORT_MAX ((unsigned short)MAXUSHORT)
#else
#ifdef USHRT_MAX
#define PERL_USHORT_MAX ((unsigned short)USHRT_MAX)
#else
#define PERL_USHORT_MAX ((unsigned short)~(unsigned)0)
#endif
#endif
#endif
#endif
#ifndef PERL_SHORT_MAX
#ifdef SHORT_MAX
#define PERL_SHORT_MAX ((short)SHORT_MAX)
#else
#ifdef MAXSHORT
#define PERL_SHORT_MAX ((short)MAXSHORT)
#else
#ifdef SHRT_MAX
#define PERL_SHORT_MAX ((short)SHRT_MAX)
#else
#define PERL_SHORT_MAX ((short) (PERL_USHORT_MAX >> 1))
#endif
#endif
#endif
#endif
#ifndef PERL_SHORT_MIN
#ifdef SHORT_MIN
#define PERL_SHORT_MIN ((short)SHORT_MIN)
#else
#ifdef MINSHORT
#define PERL_SHORT_MIN ((short)MINSHORT)
#else
#ifdef SHRT_MIN
#define PERL_SHORT_MIN ((short)SHRT_MIN)
#else
#define PERL_SHORT_MIN (-PERL_SHORT_MAX - ((3 & -1) == 3))
#endif
#endif
#endif
#endif
#ifndef PERL_UINT_MAX
#ifdef UINT_MAX
#define PERL_UINT_MAX ((unsigned int)UINT_MAX)
#else
#ifdef MAXUINT
#define PERL_UINT_MAX ((unsigned int)MAXUINT)
#else
#define PERL_UINT_MAX (~(unsigned int)0)
#endif
#endif
#endif
#ifndef PERL_UINT_MIN
#define PERL_UINT_MIN ((unsigned int)0)
#endif
#ifndef PERL_INT_MAX
#ifdef INT_MAX
#define PERL_INT_MAX ((int)INT_MAX)
#else
#ifdef MAXINT
#define PERL_INT_MAX ((int)MAXINT)
#else
#define PERL_INT_MAX ((int)(PERL_UINT_MAX >> 1))
#endif
#endif
#endif
#ifndef PERL_INT_MIN
#ifdef INT_MIN
#define PERL_INT_MIN ((int)INT_MIN)
#else
#ifdef MININT
#define PERL_INT_MIN ((int)MININT)
#else
#define PERL_INT_MIN (-PERL_INT_MAX - ((3 & -1) == 3))
#endif
#endif
#endif
#ifndef PERL_ULONG_MAX
#ifdef ULONG_MAX
#define PERL_ULONG_MAX ((unsigned long)ULONG_MAX)
#else
#ifdef MAXULONG
#define PERL_ULONG_MAX ((unsigned long)MAXULONG)
#else
#define PERL_ULONG_MAX (~(unsigned long)0)
#endif
#endif
#endif
#ifndef PERL_ULONG_MIN
#define PERL_ULONG_MIN ((unsigned long)0L)
#endif
#ifndef PERL_LONG_MAX
#ifdef LONG_MAX
#define PERL_LONG_MAX ((long)LONG_MAX)
#else
#ifdef MAXLONG
#define PERL_LONG_MAX ((long)MAXLONG)
#else
#define PERL_LONG_MAX ((long) (PERL_ULONG_MAX >> 1))
#endif
#endif
#endif
#ifndef PERL_LONG_MIN
#ifdef LONG_MIN
#define PERL_LONG_MIN ((long)LONG_MIN)
#else
#ifdef MINLONG
#define PERL_LONG_MIN ((long)MINLONG)
#else
#define PERL_LONG_MIN (-PERL_LONG_MAX - ((3 & -1) == 3))
#endif
#endif
#endif
#if defined(HAS_QUAD) && (defined(convex) || defined(uts))
#ifndef PERL_UQUAD_MAX
#ifdef ULONGLONG_MAX
#define PERL_UQUAD_MAX ((unsigned long long)ULONGLONG_MAX)
#else
#ifdef MAXULONGLONG
#define PERL_UQUAD_MAX ((unsigned long long)MAXULONGLONG)
#else
#define PERL_UQUAD_MAX (~(unsigned long long)0)
#endif
#endif
#endif
#ifndef PERL_UQUAD_MIN
#define PERL_UQUAD_MIN ((unsigned long long)0L)
#endif
#ifndef PERL_QUAD_MAX
#ifdef LONGLONG_MAX
#define PERL_QUAD_MAX ((long long)LONGLONG_MAX)
#else
#ifdef MAXLONGLONG
#define PERL_QUAD_MAX ((long long)MAXLONGLONG)
#else
#define PERL_QUAD_MAX ((long long) (PERL_UQUAD_MAX >> 1))
#endif
#endif
#endif
#ifndef PERL_QUAD_MIN
#ifdef LONGLONG_MIN
#define PERL_QUAD_MIN ((long long)LONGLONG_MIN)
#else
#ifdef MINLONGLONG
#define PERL_QUAD_MIN ((long long)MINLONGLONG)
#else
#define PERL_QUAD_MIN (-PERL_QUAD_MAX - ((3 & -1) == 3))
#endif
#endif
#endif
#endif
#ifdef HAS_QUAD
#ifdef cray
#ifndef IVTYPE
#define IVTYPE int
#endif
#ifndef IV_MIN
#define IV_MIN PERL_INT_MIN
#endif
#ifndef IV_MAX
#define IV_MAX PERL_INT_MAX
#endif
#ifndef UV_MIN
#define UV_MIN PERL_UINT_MIN
#endif
#ifndef UV_MAX
#define UV_MAX PERL_UINT_MAX
#endif
#ifdef INTSIZE
#ifndef IVSIZE
#define IVSIZE INTSIZE
#endif
#endif
#else
#if defined(convex) || defined(uts)
#ifndef IVTYPE
#define IVTYPE long long
#endif
#ifndef IV_MIN
#define IV_MIN PERL_QUAD_MIN
#endif
#ifndef IV_MAX
#define IV_MAX PERL_QUAD_MAX
#endif
#ifndef UV_MIN
#define UV_MIN PERL_UQUAD_MIN
#endif
#ifndef UV_MAX
#define UV_MAX PERL_UQUAD_MAX
#endif
#ifdef LONGLONGSIZE
#ifndef IVSIZE
#define IVSIZE LONGLONGSIZE
#endif
#endif
#else
#ifndef IVTYPE
#define IVTYPE long
#endif
#ifndef IV_MIN
#define IV_MIN PERL_LONG_MIN
#endif
#ifndef IV_MAX
#define IV_MAX PERL_LONG_MAX
#endif
#ifndef UV_MIN
#define UV_MIN PERL_ULONG_MIN
#endif
#ifndef UV_MAX
#define UV_MAX PERL_ULONG_MAX
#endif
#ifdef LONGSIZE
#ifndef IVSIZE
#define IVSIZE LONGSIZE
#endif
#endif
#endif
#endif
#ifndef IVSIZE
#define IVSIZE 8
#endif
#ifndef LONGSIZE
#define LONGSIZE 8
#endif
#ifndef PERL_QUAD_MIN
#define PERL_QUAD_MIN IV_MIN
#endif
#ifndef PERL_QUAD_MAX
#define PERL_QUAD_MAX IV_MAX
#endif
#ifndef PERL_UQUAD_MIN
#define PERL_UQUAD_MIN UV_MIN
#endif
#ifndef PERL_UQUAD_MAX
#define PERL_UQUAD_MAX UV_MAX
#endif
#else
#ifndef IVTYPE
#define IVTYPE long
#endif
#ifndef LONGSIZE
#define LONGSIZE 4
#endif
#ifndef IV_MIN
#define IV_MIN PERL_LONG_MIN
#endif
#ifndef IV_MAX
#define IV_MAX PERL_LONG_MAX
#endif
#ifndef UV_MIN
#define UV_MIN PERL_ULONG_MIN
#endif
#ifndef UV_MAX
#define UV_MAX PERL_ULONG_MAX
#endif
#endif
#ifndef IVSIZE
#ifdef LONGSIZE
#define IVSIZE LONGSIZE
#else
#define IVSIZE 4
#endif
#endif
#ifndef UVTYPE
#define UVTYPE unsigned IVTYPE
#endif
#ifndef UVSIZE
#define UVSIZE IVSIZE
#endif
#ifndef sv_setuv
#define sv_setuv(sv, uv) \
STMT_START { \
UV TeMpUv = uv; \
if (TeMpUv <= IV_MAX) \
sv_setiv(sv, TeMpUv); \
else \
sv_setnv(sv, (double)TeMpUv); \
} STMT_END
#endif
#ifndef newSVuv
#define newSVuv(uv) ((uv) <= IV_MAX ? newSViv((IV)uv) : newSVnv((NV)uv))
#endif
#ifndef sv_2uv
#define sv_2uv(sv) ((PL_Sv = (sv)), (UV) (SvNOK(PL_Sv) ? SvNV(PL_Sv) : sv_2nv(PL_Sv)))
#endif
#ifndef SvUVX
#define SvUVX(sv) ((UV)SvIVX(sv))
#endif
#ifndef SvUVXx
#define SvUVXx(sv) SvUVX(sv)
#endif
#ifndef SvUV
#define SvUV(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv))
#endif
#ifndef SvUVx
#define SvUVx(sv) ((PL_Sv = (sv)), SvUV(PL_Sv))
#endif
#ifndef sv_uv
#define sv_uv(sv) SvUVx(sv)
#endif
#if !defined(SvUOK) && defined(SvIOK_UV)
#define SvUOK(sv) SvIOK_UV(sv)
#endif
#ifndef XST_mUV
#define XST_mUV(i,v) (ST(i) = sv_2mortal(newSVuv(v)) )
#endif
#ifndef XSRETURN_UV
#define XSRETURN_UV(v) STMT_START { XST_mUV(0,v); XSRETURN(1); } STMT_END
#endif
#ifndef PUSHu
#define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
#endif
#ifndef XPUSHu
#define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
#endif
#ifdef HAS_MEMCMP
#ifndef memNE
#define memNE(s1,s2,l) (memcmp(s1,s2,l))
#endif
#ifndef memEQ
#define memEQ(s1,s2,l) (!memcmp(s1,s2,l))
#endif
#else
#ifndef memNE
#define memNE(s1,s2,l) (bcmp(s1,s2,l))
#endif
#ifndef memEQ
#define memEQ(s1,s2,l) (!bcmp(s1,s2,l))
#endif
#endif
#ifndef memEQs
#define memEQs(s1, l, s2) \
(sizeof(s2)-1 == l && memEQ(s1, (s2 ""), (sizeof(s2)-1)))
#endif
#ifndef memNEs
#define memNEs(s1, l, s2) !memEQs(s1, l, s2)
#endif
#ifndef MoveD
#define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t))
#endif
#ifndef CopyD
#define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
#endif
#ifdef HAS_MEMSET
#ifndef ZeroD
#define ZeroD(d,n,t) memzero((char*)(d), (n) * sizeof(t))
#endif
#else
#ifndef ZeroD
#define ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d)
#endif
#endif
#ifndef PoisonWith
#define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
#endif
#ifndef PoisonNew
#define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB)
#endif
#ifndef PoisonFree
#define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF)
#endif
#ifndef Poison
#define Poison(d,n,t) PoisonFree(d,n,t)
#endif
#ifndef Newx
#define Newx(v,n,t) New(0,v,n,t)
#endif
#ifndef Newxc
#define Newxc(v,n,t,c) Newc(0,v,n,t,c)
#endif
#ifndef Newxz
#define Newxz(v,n,t) Newz(0,v,n,t)
#endif
#ifndef PERL_UNUSED_DECL
#ifdef HASATTRIBUTE
#if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
#define PERL_UNUSED_DECL
#else
#define PERL_UNUSED_DECL __attribute__((unused))
#endif
#else
#define PERL_UNUSED_DECL
#endif
#endif
#ifndef PERL_UNUSED_ARG
#if defined(lint) && defined(S_SPLINT_S)
#include <note.h>
#define PERL_UNUSED_ARG(x) NOTE(ARGUNUSED(x))
#else
#define PERL_UNUSED_ARG(x) ((void)x)
#endif
#endif
#ifndef PERL_UNUSED_VAR
#define PERL_UNUSED_VAR(x) ((void)x)
#endif
#ifndef PERL_UNUSED_CONTEXT
#ifdef USE_ITHREADS
#define PERL_UNUSED_CONTEXT PERL_UNUSED_ARG(my_perl)
#else
#define PERL_UNUSED_CONTEXT
#endif
#endif
#ifndef NOOP
#define NOOP (void)0
#endif
#ifndef dNOOP
#define dNOOP extern int Perl___notused PERL_UNUSED_DECL
#endif
#ifndef NVTYPE
#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
#define NVTYPE long double
#else
#define NVTYPE double
#endif
typedef NVTYPE NV;
#endif
#ifndef INT2PTR
#if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
#define PTRV UV
#define INT2PTR(any,d) (any)(d)
#else
#if PTRSIZE == LONGSIZE
#define PTRV unsigned long
#else
#define PTRV unsigned
#endif
#define INT2PTR(any,d) (any)(PTRV)(d)
#endif
#endif
#ifndef PTR2ul
#if PTRSIZE == LONGSIZE
#define PTR2ul(p) (unsigned long)(p)
#else
#define PTR2ul(p) INT2PTR(unsigned long,p)
#endif
#endif
#ifndef PTR2nat
#define PTR2nat(p) (PTRV)(p)
#endif
#ifndef NUM2PTR
#define NUM2PTR(any,d) (any)PTR2nat(d)
#endif
#ifndef PTR2IV
#define PTR2IV(p) INT2PTR(IV,p)
#endif
#ifndef PTR2UV
#define PTR2UV(p) INT2PTR(UV,p)
#endif
#ifndef PTR2NV
#define PTR2NV(p) NUM2PTR(NV,p)
#endif
#undef START_EXTERN_C
#undef END_EXTERN_C
#undef EXTERN_C
#ifdef __cplusplus
#define START_EXTERN_C extern "C" {
#define END_EXTERN_C }
#define EXTERN_C extern "C"
#else
#define START_EXTERN_C
#define END_EXTERN_C
#define EXTERN_C extern
#endif
#if defined(PERL_GCC_PEDANTIC)
#ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
#define PERL_GCC_BRACE_GROUPS_FORBIDDEN
#endif
#endif
#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
#ifndef PERL_USE_GCC_BRACE_GROUPS
#define PERL_USE_GCC_BRACE_GROUPS
#endif
#endif
#undef STMT_START
#undef STMT_END
#ifdef PERL_USE_GCC_BRACE_GROUPS
#define STMT_START (void)(
#define STMT_END )
#else
#if defined(VOIDFLAGS) && (VOIDFLAGS) && (defined(sun) || defined(__sun__)) && !defined(__GNUC__)
#define STMT_START if (1)
#define STMT_END else (void)0
#else
#define STMT_START do
#define STMT_END while (0)
#endif
#endif
#ifndef boolSV
#define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
#endif
#ifndef DEFSV
#define DEFSV GvSV(PL_defgv)
#endif
#ifndef SAVE_DEFSV
#define SAVE_DEFSV SAVESPTR(GvSV(PL_defgv))
#endif
#ifndef DEFSV_set
#define DEFSV_set(sv) (DEFSV = (sv))
#endif
#ifndef AvFILLp
#define AvFILLp AvFILL
#endif
#ifndef ERRSV
#define ERRSV get_sv("@",FALSE)
#endif
#ifndef gv_stashpvn
#define gv_stashpvn(str,len,create) gv_stashpv(str,create)
#endif
#ifndef get_cv
#define get_cv perl_get_cv
#endif
#ifndef get_sv
#define get_sv perl_get_sv
#endif
#ifndef get_av
#define get_av perl_get_av
#endif
#ifndef get_hv
#define get_hv perl_get_hv
#endif
#ifndef dUNDERBAR
#define dUNDERBAR dNOOP
#endif
#ifndef UNDERBAR
#define UNDERBAR DEFSV
#endif
#ifndef dAX
#define dAX I32 ax = MARK - PL_stack_base + 1
#endif
#ifndef dITEMS
#define dITEMS I32 items = SP - MARK
#endif
#ifndef dXSTARG
#define dXSTARG SV * targ = sv_newmortal()
#endif
#ifndef dAXMARK
#define dAXMARK I32 ax = POPMARK; \
register SV ** const mark = PL_stack_base + ax++
#endif
#ifndef XSprePUSH
#define XSprePUSH (sp = PL_stack_base + ax - 1)
#endif
#if (PERL_BCDVERSION < 0x5005000)
#undef XSRETURN
#define XSRETURN(off) \
STMT_START { \
PL_stack_sp = PL_stack_base + ax + ((off) - 1); \
return; \
} STMT_END
#endif
#ifndef XSPROTO
#define XSPROTO(name) void name(pTHX_ CV* cv)
#endif
#ifndef SVfARG
#define SVfARG(p) ((void*)(p))
#endif
#ifndef PERL_ABS
#define PERL_ABS(x) ((x) < 0 ? -(x) : (x))
#endif
#ifndef dVAR
#define dVAR dNOOP
#endif
#ifndef SVf
#define SVf "_"
#endif
#ifndef UTF8_MAXBYTES
#define UTF8_MAXBYTES UTF8_MAXLEN
#endif
#ifndef CPERLscope
#define CPERLscope(x) x
#endif
#ifndef PERL_HASH
#define PERL_HASH(hash,str,len) \
STMT_START { \
const char *s_PeRlHaSh = str; \
I32 i_PeRlHaSh = len; \
U32 hash_PeRlHaSh = 0; \
while (i_PeRlHaSh--) \
hash_PeRlHaSh = hash_PeRlHaSh * 33 + *s_PeRlHaSh++; \
(hash) = hash_PeRlHaSh; \
} STMT_END
#endif
#ifndef PERLIO_FUNCS_DECL
#ifdef PERLIO_FUNCS_CONST
#define PERLIO_FUNCS_DECL(funcs) const PerlIO_funcs funcs
#define PERLIO_FUNCS_CAST(funcs) (PerlIO_funcs*)(funcs)
#else
#define PERLIO_FUNCS_DECL(funcs) PerlIO_funcs funcs
#define PERLIO_FUNCS_CAST(funcs) (funcs)
#endif
#endif
#if (PERL_BCDVERSION < 0x5009003)
#ifdef ARGSproto
typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto);
#else
typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX);
#endif
typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*);
#endif
#ifndef isPSXSPC
#define isPSXSPC(c) (isSPACE(c) || (c) == '\v')
#endif
#ifndef isBLANK
#define isBLANK(c) ((c) == ' ' || (c) == '\t')
#endif
#ifdef EBCDIC
#ifndef isALNUMC
#define isALNUMC(c) isalnum(c)
#endif
#ifndef isASCII
#define isASCII(c) isascii(c)
#endif
#ifndef isCNTRL
#define isCNTRL(c) iscntrl(c)
#endif
#ifndef isGRAPH
#define isGRAPH(c) isgraph(c)
#endif
#ifndef isPRINT
#define isPRINT(c) isprint(c)
#endif
#ifndef isPUNCT
#define isPUNCT(c) ispunct(c)
#endif
#ifndef isXDIGIT
#define isXDIGIT(c) isxdigit(c)
#endif
#else
#if (PERL_BCDVERSION < 0x5010000)
#undef isPRINT
#endif
#ifdef HAS_QUAD
#ifdef U64TYPE
#define WIDEST_UTYPE U64TYPE
#else
#define WIDEST_UTYPE Quad_t
#endif
#else
#define WIDEST_UTYPE U32
#endif
#ifndef isALNUMC
#define isALNUMC(c) (isALPHA(c) || isDIGIT(c))
#endif
#ifndef isASCII
#define isASCII(c) ((WIDEST_UTYPE) (c) <= 127)
#endif
#ifndef isCNTRL
#define isCNTRL(c) ((WIDEST_UTYPE) (c) < ' ' || (c) == 127)
#endif
#ifndef isGRAPH
#define isGRAPH(c) (isALNUM(c) || isPUNCT(c))
#endif
#ifndef isPRINT
#define isPRINT(c) (((c) >= 32 && (c) < 127))
#endif
#ifndef isPUNCT
#define isPUNCT(c) (((c) >= 33 && (c) <= 47) || ((c) >= 58 && (c) <= 64) || ((c) >= 91 && (c) <= 96) || ((c) >= 123 && (c) <= 126))
#endif
#ifndef isXDIGIT
#define isXDIGIT(c) (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
#endif
#endif
#if (PERL_BCDVERSION >= 0x5008000)
#ifndef HeUTF8
#define HeUTF8(he) ((HeKLEN(he) == HEf_SVKEY) ? \
SvUTF8(HeKEY_sv(he)) : \
(U32)HeKUTF8(he))
#endif
#endif
#ifndef PERL_SIGNALS_UNSAFE_FLAG
#define PERL_SIGNALS_UNSAFE_FLAG 0x0001
#if (PERL_BCDVERSION < 0x5008000)
#define D_PPP_PERL_SIGNALS_INIT PERL_SIGNALS_UNSAFE_FLAG
#else
#define D_PPP_PERL_SIGNALS_INIT 0
#endif
#if defined(NEED_PL_signals)
static U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
#elif defined(NEED_PL_signals_GLOBAL)
U32 DPPP_(my_PL_signals) = D_PPP_PERL_SIGNALS_INIT;
#else
extern U32 DPPP_(my_PL_signals);
#endif
#define PL_signals DPPP_(my_PL_signals)
#endif
#if (PERL_BCDVERSION <= 0x5005005)
#define PL_ppaddr ppaddr
#define PL_no_modify no_modify
#endif
#if (PERL_BCDVERSION <= 0x5004005)
#define PL_DBsignal DBsignal
#define PL_DBsingle DBsingle
#define PL_DBsub DBsub
#define PL_DBtrace DBtrace
#define PL_Sv Sv
#define PL_bufend bufend
#define PL_bufptr bufptr
#define PL_compiling compiling
#define PL_copline copline
#define PL_curcop curcop
#define PL_curstash curstash
#define PL_debstash debstash
#define PL_defgv defgv
#define PL_diehook diehook
#define PL_dirty dirty
#define PL_dowarn dowarn
#define PL_errgv errgv
#define PL_error_count error_count
#define PL_expect expect
#define PL_hexdigit hexdigit
#define PL_hints hints
#define PL_in_my in_my
#define PL_laststatval laststatval
#define PL_lex_state lex_state
#define PL_lex_stuff lex_stuff
#define PL_linestr linestr
#define PL_na na
#define PL_perl_destruct_level perl_destruct_level
#define PL_perldb perldb
#define PL_rsfp_filters rsfp_filters
#define PL_rsfp rsfp
#define PL_stack_base stack_base
#define PL_stack_sp stack_sp
#define PL_statcache statcache
#define PL_stdingv stdingv
#define PL_sv_arenaroot sv_arenaroot
#define PL_sv_no sv_no
#define PL_sv_undef sv_undef
#define PL_sv_yes sv_yes
#define PL_tainted tainted
#define PL_tainting tainting
#define PL_tokenbuf tokenbuf
#endif
#if (PERL_BCDVERSION >= 0x5009005)
#ifdef DPPP_PL_parser_NO_DUMMY
#define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
(croak("panic: PL_parser == NULL in %s:%d", \
__FILE__, __LINE__), (yy_parser *) NULL))->var)
#else
#ifdef DPPP_PL_parser_NO_DUMMY_WARNING
#define D_PPP_parser_dummy_warning(var)
#else
#define D_PPP_parser_dummy_warning(var) \
warn("warning: dummy PL_" #var " used in %s:%d", __FILE__, __LINE__),
#endif
#define D_PPP_my_PL_parser_var(var) ((PL_parser ? PL_parser : \
(D_PPP_parser_dummy_warning(var) &DPPP_(dummy_PL_parser)))->var)
#if defined(NEED_PL_parser)
static yy_parser DPPP_(dummy_PL_parser);
#elif defined(NEED_PL_parser_GLOBAL)
yy_parser DPPP_(dummy_PL_parser);
#else
extern yy_parser DPPP_(dummy_PL_parser);
#endif
#endif
#define PL_expect D_PPP_my_PL_parser_var(expect)
#define PL_copline D_PPP_my_PL_parser_var(copline)
#define PL_rsfp D_PPP_my_PL_parser_var(rsfp)
#define PL_rsfp_filters D_PPP_my_PL_parser_var(rsfp_filters)
#define PL_linestr D_PPP_my_PL_parser_var(linestr)
#define PL_bufptr D_PPP_my_PL_parser_var(bufptr)
#define PL_bufend D_PPP_my_PL_parser_var(bufend)
#define PL_lex_state D_PPP_my_PL_parser_var(lex_state)
#define PL_lex_stuff D_PPP_my_PL_parser_var(lex_stuff)
#define PL_tokenbuf D_PPP_my_PL_parser_var(tokenbuf)
#define PL_in_my D_PPP_my_PL_parser_var(in_my)
#define PL_in_my_stash D_PPP_my_PL_parser_var(in_my_stash)
#define PL_error_count D_PPP_my_PL_parser_var(error_count)
#else
#define PL_parser ((void *) 1)
#endif
#ifndef mPUSHs
#define mPUSHs(s) PUSHs(sv_2mortal(s))
#endif
#ifndef PUSHmortal
#define PUSHmortal PUSHs(sv_newmortal())
#endif
#ifndef mPUSHp
#define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l))
#endif
#ifndef mPUSHn
#define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n))
#endif
#ifndef mPUSHi
#define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i))
#endif
#ifndef mPUSHu
#define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u))
#endif
#ifndef mXPUSHs
#define mXPUSHs(s) XPUSHs(sv_2mortal(s))
#endif
#ifndef XPUSHmortal
#define XPUSHmortal XPUSHs(sv_newmortal())
#endif
#ifndef mXPUSHp
#define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
#endif
#ifndef mXPUSHn
#define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
#endif
#ifndef mXPUSHi
#define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
#endif
#ifndef mXPUSHu
#define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
#endif
#ifndef call_sv
#define call_sv perl_call_sv
#endif
#ifndef call_pv
#define call_pv perl_call_pv
#endif
#ifndef call_argv
#define call_argv perl_call_argv
#endif
#ifndef call_method
#define call_method perl_call_method
#endif
#ifndef eval_sv
#define eval_sv perl_eval_sv
#endif
#ifndef PERL_LOADMOD_DENY
#define PERL_LOADMOD_DENY 0x1
#endif
#ifndef PERL_LOADMOD_NOIMPORT
#define PERL_LOADMOD_NOIMPORT 0x2
#endif
#ifndef PERL_LOADMOD_IMPORT_OPS
#define PERL_LOADMOD_IMPORT_OPS 0x4
#endif
#ifndef G_METHOD
#define G_METHOD 64
#ifdef call_sv
#undef call_sv
#endif
#if (PERL_BCDVERSION < 0x5006000)
#define call_sv(sv, flags) ((flags) & G_METHOD ? perl_call_method((char *) SvPV_nolen_const(sv), \
(flags) & ~G_METHOD) : perl_call_sv(sv, flags))
#else
#define call_sv(sv, flags) ((flags) & G_METHOD ? Perl_call_method(aTHX_ (char *) SvPV_nolen_const(sv), \
(flags) & ~G_METHOD) : Perl_call_sv(aTHX_ sv, flags))
#endif
#endif
#ifndef eval_pv
#if defined(NEED_eval_pv)
static SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
static
#else
extern SV* DPPP_(my_eval_pv)(char *p, I32 croak_on_error);
#endif
#ifdef eval_pv
#undef eval_pv
#endif
#define eval_pv(a,b) DPPP_(my_eval_pv)(aTHX_ a,b)
#define Perl_eval_pv DPPP_(my_eval_pv)
#if defined(NEED_eval_pv) || defined(NEED_eval_pv_GLOBAL)
SV*
DPPP_(my_eval_pv)(char *p, I32 croak_on_error)
{
dSP;
SV* sv = newSVpv(p, 0);
PUSHMARK(sp);
eval_sv(sv, G_SCALAR);
SvREFCNT_dec(sv);
SPAGAIN;
sv = POPs;
PUTBACK;