Changeset 745 for trunk/server/source4/heimdal/cf/make-proto.pl
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source4/heimdal/cf/make-proto.pl
r414 r745 13 13 my $private_func_re = "^_"; 14 14 15 doGetopts('x:m:o:p:dqE:R:P:') || die "foo";15 Getopts('x:m:o:p:dqE:R:P:') || die "foo"; 16 16 17 17 if($opt_d) { … … 181 181 $_ = $arg; 182 182 s/.*\/([^\/]*)/$1/; 183 s/.*\\([^\\]*)/$1/; 183 184 s/[^a-zA-Z0-9]/_/g; 184 185 "__" . $_ . "__"; … … 254 255 foreach(sort keys %funcs){ 255 256 if(/^(main)$/) { next } 257 if ($funcs{$_} =~ /\^/) { 258 $beginblock = "#ifdef __BLOCKS__\n"; 259 $endblock = "#endif /* __BLOCKS__ */\n"; 260 } else { 261 $beginblock = $endblock = ""; 262 } 256 263 if(!defined($exported{$_}) && /$private_func_re/) { 257 $private_h .= $ funcs{$_} . "\n\n";264 $private_h .= $beginblock . $funcs{$_} . "\n" . $endblock . "\n"; 258 265 if($funcs{$_} =~ /__attribute__/) { 259 266 $private_attribute_seen = 1; … … 268 275 } 269 276 } 270 $public_h .= $ funcs{$_} . "\n";277 $public_h .= $beginblock . $funcs{$_} . "\n" . $endblock; 271 278 if($funcs{$_} =~ /__attribute__/) { 272 279 $public_attribute_seen = 1; … … 311 318 if ($opt_E) { 312 319 $public_h_header .= "#ifndef $opt_E 320 #ifndef ${opt_E}_FUNCTION 313 321 #if defined(_WIN32) 314 #define ${opt_E}_FUNCTION __stdcall __declspec(dllimport) 322 #define ${opt_E}_FUNCTION __declspec(dllimport) 323 #define ${opt_E}_CALL __stdcall 315 324 #define ${opt_E}_VARIABLE __declspec(dllimport) 316 325 #else 317 326 #define ${opt_E}_FUNCTION 327 #define ${opt_E}_CALL 318 328 #define ${opt_E}_VARIABLE 319 329 #endif 320 330 #endif 321 331 #endif 322 332 "; 323 333 324 334 $private_h_header .= "#ifndef $opt_E 335 #ifndef ${opt_E}_FUNCTION 325 336 #if defined(_WIN32) 326 #define ${opt_E}_FUNCTION __stdcall __declspec(dllimport) 337 #define ${opt_E}_FUNCTION __declspec(dllimport) 338 #define ${opt_E}_CALL __stdcall 327 339 #define ${opt_E}_VARIABLE __declspec(dllimport) 328 340 #else 329 341 #define ${opt_E}_FUNCTION 342 #define ${opt_E}_CALL 330 343 #define ${opt_E}_VARIABLE 344 #endif 331 345 #endif 332 346 #endif
Note:
See TracChangeset
for help on using the changeset viewer.