tor-android/external/badvpn_dns/fix_flex.php

11 lines
376 B
PHP
Raw Normal View History

2015-01-25 11:08:34 +00:00
<?php
$filename = $argv[1];
$contents = file_get_contents($filename);
if ($contents === FALSE) exit(1);
$search = array("<inttypes.h>", "#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L");
$replace = array("<stdint.h>", "#if 1");
$contents = str_replace($search, $replace, $contents);
$res = file_put_contents($filename, $contents);
if ($res === FALSE) exit(1);