Sun WorkShop Compiler C 5.0 User's Guide

(7.9.4.2) The effect if a file with the new name exists prior to a call to the rename function:

If the file exists, it is removed and the new file is written over the previously existing file.