Simplify my *-tests modules.
[gnulib.git] / lib / time_r.c
index 7368f3b..245ac92 100644 (file)
 
    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+   Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* Written by Paul Eggert.  */
 
-#if HAVE_CONFIG_H
+#ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
@@ -59,11 +59,11 @@ ctime_r (time_t const *t, char *buf)
 struct tm *
 gmtime_r (time_t const * restrict t, struct tm * restrict tp)
 {
-  return copy_tm_result (gmtime (t));
+  return copy_tm_result (tp, gmtime (t));
 }
 
 struct tm *
 localtime_r (time_t const * restrict t, struct tm * restrict tp)
 {
-  return copy_tm_result (localtime (t));
+  return copy_tm_result (tp, localtime (t));
 }