equal
deleted
inserted
replaced
60 # This will have to be changed if we ever have to check |
60 # This will have to be changed if we ever have to check |
61 # for a function on Windows. |
61 # for a function on Windows. |
62 devnull = open('/dev/null', 'w') |
62 devnull = open('/dev/null', 'w') |
63 oldstderr = os.dup(sys.stderr.fileno()) |
63 oldstderr = os.dup(sys.stderr.fileno()) |
64 os.dup2(devnull.fileno(), sys.stderr.fileno()) |
64 os.dup2(devnull.fileno(), sys.stderr.fileno()) |
65 objects = cc.compile([fname]) |
65 objects = cc.compile([fname], output_dir=tmpdir) |
66 cc.link_executable(objects, os.path.join(tmpdir, "a.out")) |
66 cc.link_executable(objects, os.path.join(tmpdir, "a.out")) |
67 except: |
67 except: |
68 return False |
68 return False |
69 return True |
69 return True |
70 finally: |
70 finally: |