Changeset 988 for vendor/current/source4/heimdal/cf
- Timestamp:
- Nov 24, 2016, 1:14:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source4/heimdal/cf/make-proto.pl
r919 r988 3 3 4 4 use Getopt::Std; 5 #require 'getopts.pl';6 5 7 6 my $comment = 0; … … 12 11 my $oproto = 1; 13 12 my $private_func_re = "^_"; 13 my %depfunction = (); 14 14 15 15 getopts('x:m:o:p:dqE:R:P:') || die "foo"; … … 26 26 $private_func_re = $opt_R; 27 27 } 28 %flags = (28 my %flags = ( 29 29 'multiline-proto' => 1, 30 30 'header' => 1, … … 101 101 s/\s*$//; 102 102 s/\s+/ /g; 103 if($_ =~ /\)$/ or $_ =~ /DEPRECATED$/){103 if($_ =~ /\)$/){ 104 104 if(!/^static/ && !/^PRIVATE/){ 105 105 $attr = ""; … … 108 108 $_ = $1; 109 109 } 110 if(m/(.*)\s(\w+DEPRECATED)/) { 110 if(m/(.*)\s(\w+DEPRECATED_FUNCTION)\s?(\(.*\))(.*)/) { 111 $depfunction{$2} = 1; 112 $attr .= " $2$3"; 113 $_ = "$1 $4"; 114 } 115 if(m/(.*)\s(\w+DEPRECATED)(.*)/) { 111 116 $attr .= " $2"; 112 $_ = $1;117 $_ = "$1 $3"; 113 118 } 114 119 # remove outer () … … 303 308 } 304 309 } 310 311 my $depstr = ""; 312 my $undepstr = ""; 313 foreach (keys %depfunction) { 314 $depstr .= "#ifndef $_ 315 #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 ))) 316 #define $_(X) __attribute__((__deprecated__)) 317 #else 318 #define $_(X) 319 #endif 320 #endif 321 322 323 "; 324 $public_h_trailer .= "#undef $_ 325 326 "; 327 $private_h_trailer .= "#undef $_ 328 #define $_(X) 329 330 "; 331 } 332 333 $public_h_header .= $depstr; 334 $private_h_header .= $depstr; 335 336 305 337 if($flags{"cxx"}) { 306 338 $public_h_header .= "#ifdef __cplusplus … … 309 341 310 342 "; 311 $public_h_trailer .= "#ifdef __cplusplus312 } 313 #endif 314 315 " ;343 $public_h_trailer = "#ifdef __cplusplus 344 } 345 #endif 346 347 " . $public_h_trailer; 316 348 317 349 } … … 349 381 } 350 382 383 $public_h_trailer .= $undepstr; 384 $private_h_trailer .= $undepstr; 385 351 386 if ($public_h ne "" && $flags{"header"}) { 352 387 $public_h = $public_h_header . $public_h .
Note:
See TracChangeset
for help on using the changeset viewer.