/* Copyright (C) 2017-2021, Dirk Krause SPDX-License-Identifier: BSD-3-Clause */ /* WARNING: This file was generated by the dkct program (see http://dktools.sourceforge.net/ for details). Changes you make here will be lost if dkct is run again! You should modify the original source and run dkct on it. Original source: dk4mm.ctr */ /** @file dk4mm.c The dk4mm module. */ #include "dk4conf.h" #include #include #if DK4_HAVE_ASSERT_H #ifndef ASSERT_H_INCLUDED #include #define ASSERT_H_INCLUDED 1 #endif #endif int dk4makemode_must_rebuild(const dkChar *dn, const dkChar *sn) { dk4_stat_t ds; dk4_stat_t ss; int back = 0; #if DK4_USE_ASSERT assert(NULL != dn); assert(NULL != sn); #endif if ((NULL == dn) || (NULL == sn)) { goto finished; } if (0 != dk4stat(&ss, sn, NULL)) { /* Source file exists. */ back = 1; if (0 != dk4stat(&ds, dn, NULL)) { /* Destination file exists. */ if (ds.st_mtime > ss.st_mtime) { /* Destination file exists and is up to date. */ back = 0; } } } else { /* Source file does not exist. */ } finished: return back; } /* vim: set ai sw=4 ts=4 : */