#!/usr/bin/tclsh

set fd [open configure r]
set body [read $fd]
close $fd

regsub -all \
    "int main\\(\\) {\nmain\\(\\)\n;" \
    $body \
    "int main() {\n" \
    body

regsub -all \
    "atoi\\(\\*tzname\\)" \
    $body \
    "char *c; c = *tzname" \
    body
    
set fd [open configure w]
puts -nonewline $fd $body
close $fd
