Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source4/heimdal/cf/make-proto.pl

    r414 r745  
    1313my $private_func_re = "^_";
    1414
    15 do Getopts('x:m:o:p:dqE:R:P:') || die "foo";
     15Getopts('x:m:o:p:dqE:R:P:') || die "foo";
    1616
    1717if($opt_d) {
     
    181181    $_ = $arg;
    182182    s/.*\/([^\/]*)/$1/;
     183    s/.*\\([^\\]*)/$1/;
    183184    s/[^a-zA-Z0-9]/_/g;
    184185    "__" . $_ . "__";
     
    254255foreach(sort keys %funcs){
    255256    if(/^(main)$/) { next }
     257    if ($funcs{$_} =~ /\^/) {
     258        $beginblock = "#ifdef __BLOCKS__\n";
     259        $endblock = "#endif /* __BLOCKS__ */\n";
     260    } else {
     261        $beginblock = $endblock = "";
     262    }
    256263    if(!defined($exported{$_}) && /$private_func_re/) {
    257         $private_h .= $funcs{$_} . "\n\n";
     264        $private_h .= $beginblock . $funcs{$_} . "\n" . $endblock . "\n";
    258265        if($funcs{$_} =~ /__attribute__/) {
    259266            $private_attribute_seen = 1;
     
    268275            }
    269276        }
    270         $public_h .= $funcs{$_} . "\n";
     277        $public_h .= $beginblock . $funcs{$_} . "\n" . $endblock;
    271278        if($funcs{$_} =~ /__attribute__/) {
    272279            $public_attribute_seen = 1;
     
    311318if ($opt_E) {
    312319    $public_h_header .= "#ifndef $opt_E
     320#ifndef ${opt_E}_FUNCTION
    313321#if defined(_WIN32)
    314 #define ${opt_E}_FUNCTION __stdcall __declspec(dllimport)
     322#define ${opt_E}_FUNCTION __declspec(dllimport)
     323#define ${opt_E}_CALL __stdcall
    315324#define ${opt_E}_VARIABLE __declspec(dllimport)
    316325#else
    317326#define ${opt_E}_FUNCTION
     327#define ${opt_E}_CALL
    318328#define ${opt_E}_VARIABLE
    319329#endif
    320330#endif
    321 
     331#endif
    322332";
    323333   
    324334    $private_h_header .= "#ifndef $opt_E
     335#ifndef ${opt_E}_FUNCTION
    325336#if defined(_WIN32)
    326 #define ${opt_E}_FUNCTION __stdcall __declspec(dllimport)
     337#define ${opt_E}_FUNCTION __declspec(dllimport)
     338#define ${opt_E}_CALL __stdcall
    327339#define ${opt_E}_VARIABLE __declspec(dllimport)
    328340#else
    329341#define ${opt_E}_FUNCTION
     342#define ${opt_E}_CALL
    330343#define ${opt_E}_VARIABLE
     344#endif
    331345#endif
    332346#endif
Note: See TracChangeset for help on using the changeset viewer.