From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:a10:: with SMTP id z16mr1015747ioi.13.1542715062836; Tue, 20 Nov 2018 03:57:42 -0800 (PST) X-Received: by 2002:a9d:5403:: with SMTP id j3mr31048oth.2.1542715062668; Tue, 20 Nov 2018 03:57:42 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!z5-v6no345494ite.0!news-out.google.com!v141ni501ita.0!nntp.google.com!z5-v6no345489ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 20 Nov 2018 03:57:42 -0800 (PST) In-Reply-To: <04221674-95d8-4d4a-8743-42877b13eead@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=79.94.114.188; posting-account=O1Kt4QoAAABKYAjrg-cGai_vZLnN2LEw NNTP-Posting-Host: 79.94.114.188 References: <0577e947-d691-4b81-aca6-b2e86bbef634@googlegroups.com> <04221674-95d8-4d4a-8743-42877b13eead@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7938d434-d666-4b80-a5cb-6c2f8ee70153@googlegroups.com> Subject: Re: GNAT Modification_Time limitation From: Lionel Draghi Injection-Date: Tue, 20 Nov 2018 11:57:42 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:54849 Date: 2018-11-20T03:57:42-08:00 List-Id: Thank you guys for your answers : @Shark : see the description of my app hereafter, I will try the simple way first :-) @Keith and Emmanuel : the Time_Of call I put in my message comes from the body of Ada.Directories (/opt/GNAT/2018/lib/gcc/x86_64-pc-linux-gnu/7.3.1/adainclude/a-direct.adb) : ... Date := File_Time_Stamp (Name); GM_Split (Date, Year, Month, Day, Hour, Minute, Second); return Time_Of (Year, Month, Day, Hour, Minute, Second, 0.0); ... and GM_Split (in System.OS_Lib package) is calling procedure To_GM_Time (P_Time_T : Address; P_Year : Address; P_Month : Address; P_Day : Address; P_Hours : Address; P_Mins : Address; P_Secs : Address); pragma Import (C, To_GM_Time, "__gnat_to_gm_time"); P_Secs is pointing an Integer. So the limitation seems to come from GNAT C interface to OS lib. @Keith : my App is (in this first version) using strace, so thanks for the stat idea, I should directly get the OS time stamp from strace output. @Emmanuel : my make is a POC to do a make without makefile! :-) it runs command and observes files accesses (thanks to linux kernel ptrace interface), and automatically understand what files it depends on, and what files are output. My first test case is to replace this Makefile: all: hello hello.o: hello.c gcc -o hello.o -c hello.c main.o: main.c hello.h gcc -o main.o -c main.c hello: hello.o main.o gcc -o hello hello.o main.o with just : gcc -o hello.o -c hello.c gcc -o main.o -c main.c gcc -o hello hello.o main.o and to get the same optimized behavior when removing a .o file or touching one of the source files. -- -- Lionel