LeOS-Genesis/external/badvpn/fix_flex.php

11 lines
376 B
PHP
Raw Normal View History

2020-10-05 13:12:00 +02: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);