nsprpub/config/make-system-wrappers.pl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nsprpub/config/make-system-wrappers.pl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,26 @@
     1.4 +#!/usr/bin/perl
     1.5 +#
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +$output_dir = shift;
    1.11 +
    1.12 +while (<STDIN>) {
    1.13 +    chomp;
    1.14 +    if (-e "$output_dir/$_") {
    1.15 +	next;
    1.16 +    }
    1.17 +
    1.18 +    if (/(.*)\/[^\/*]/) {
    1.19 +	mkdir "$output_dir/$1";
    1.20 +    }
    1.21 +
    1.22 +    open OUT, ">$output_dir/$_";
    1.23 +    print OUT "#pragma GCC system_header\n";  # suppress include_next warning
    1.24 +    print OUT "#pragma GCC visibility push(default)\n";
    1.25 +    print OUT "#include_next \<$_\>\n";
    1.26 +    print OUT "#pragma GCC visibility pop\n";
    1.27 +    close OUT;
    1.28 +}
    1.29 +

mercurial