@@ -84,7 +84,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc.
84
84
extern long DRV_nfiles;
85
85
extern char *DRV_files[];
86
86
87
- void process_long_option (long ac, char **av, long &i);
87
+ void process_long_option (long ac, char **av, long &i);
88
88
89
89
// Push a file into the list of files to be processed
90
90
void
@@ -156,6 +156,10 @@ DRV_usage (void)
156
156
ACE_TEXT (" --unknown-annotations ARG Set reaction to unknown annotations.\n " )
157
157
ACE_TEXT (" ARG must be `warn-once` (default), `warn-all`,\n " )
158
158
ACE_TEXT (" `error`, or `ignore`.\n " )
159
+ ACE_TEXT (" --preprocessor-input KIND Set C preprocessor file input method. KIND must \n " )
160
+ ACE_TEXT (" be `guess`, `direct-with-e`, `direct-without-e`,\n " )
161
+ ACE_TEXT (" `direct-gcc`, or `copy` (default).\n " )
162
+ ACE_TEXT (" See docs/compiler.html for more info.\n " )
159
163
));
160
164
161
165
be_util::usage ();
@@ -485,7 +489,7 @@ DRV_parse_args (long ac, char **av)
485
489
}
486
490
else
487
491
{
488
- process_long_option (ac, av, i);
492
+ process_long_option (ac, av, i);
489
493
}
490
494
break ;
491
495
@@ -556,7 +560,7 @@ DRV_parse_args (long ac, char **av)
556
560
}
557
561
558
562
void
559
- print_idl_versions ()
563
+ print_idl_versions ()
560
564
{
561
565
ACE_DEBUG ((LM_INFO,
562
566
ACE_TEXT (" These are the valid IDL versions this compiler will accept:\n " )
@@ -570,7 +574,7 @@ print_idl_versions()
570
574
}
571
575
572
576
void
573
- process_long_option (long ac, char **av, long &i)
577
+ process_long_option (long ac, char **av, long &i)
574
578
{
575
579
const char *long_option = av[i] + 2 ;
576
580
bool no_more_args = i + 1 >= ac;
@@ -680,21 +684,66 @@ process_long_option(long ac, char **av, long &i)
680
684
{
681
685
invalid_argument = true ;
682
686
ACE_ERROR ((LM_ERROR,
683
- ACE_TEXT (" \" %C\" is not a valid argument.\n " ),
687
+ ACE_TEXT (" \" %C\" is not a valid argument to --unknown-annotations .\n " ),
684
688
av[i]
685
689
));
686
690
}
687
691
}
688
692
if (invalid_argument)
689
693
{
690
694
ACE_ERROR ((LM_ERROR,
691
- ACE_TEXT (" Use either \" warn-once\" , \" warn-all\" , " )
692
- ACE_TEXT (" \" error\" or \" ignore\" .\n " ),
695
+ ACE_TEXT (" Use \" warn-once\" , \" warn-all\" , \" error\" or \" ignore\" .\n " ),
693
696
av[i]
694
697
));
695
698
idl_global->parse_args_exit (1 );
696
699
}
697
700
}
701
+ else if (!ACE_OS::strcmp (long_option, " preprocessor-input" ))
702
+ {
703
+ bool invalid_argument = no_more_args;
704
+ if (no_more_args)
705
+ {
706
+ ACE_ERROR ((LM_ERROR,
707
+ ACE_TEXT (" --preprocessor-input is missing its required argument." )));
708
+ }
709
+ else
710
+ {
711
+ i++;
712
+ if (!ACE_OS::strcmp (av[i], " guess" ))
713
+ {
714
+ idl_global->preprocessor_input_ = IDL_GlobalData::PreprocessorInputGuess;
715
+ }
716
+ else if (!ACE_OS::strcmp (av[i], " direct-with-e" ))
717
+ {
718
+ idl_global->preprocessor_input_ = IDL_GlobalData::PreprocessorInputDirectWithE;
719
+ }
720
+ else if (!ACE_OS::strcmp (av[i], " direct-without-e" ))
721
+ {
722
+ idl_global->preprocessor_input_ = IDL_GlobalData::PreprocessorInputDirectWithoutE;
723
+ }
724
+ else if (!ACE_OS::strcmp (av[i], " direct-gcc" ))
725
+ {
726
+ idl_global->preprocessor_input_ = IDL_GlobalData::PreprocessorInputDirectGcc;
727
+ }
728
+ else if (!ACE_OS::strcmp (av[i], " copy" ))
729
+ {
730
+ idl_global->preprocessor_input_ = IDL_GlobalData::PreprocessorInputCopy;
731
+ }
732
+ else
733
+ {
734
+ invalid_argument = true ;
735
+ ACE_ERROR ((LM_ERROR,
736
+ ACE_TEXT (" \" %C\" is not a valid argument to --preprocessor-input.\n " ), av[i]));
737
+ }
738
+ }
739
+ if (invalid_argument)
740
+ {
741
+ ACE_ERROR ((LM_ERROR, ACE_TEXT (" Use \" guess\" , \" direct-with-e\" , " )
742
+ ACE_TEXT (" \" direct-without-e\" , \" direct-gcc\" , or \" copy\" .\n " ),
743
+ av[i]));
744
+ idl_global->parse_args_exit (1 );
745
+ }
746
+ }
698
747
else
699
748
{
700
749
be_global->parse_args (i, av);
0 commit comments