X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595771847; bh=jzuALax633NdPC5Ve40e53ECDZzFtwikmK+y6v1EHLE=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=l16Kj7h/BtOxyV4zOPyQ/P5HpFOPP9jDwtQv+AfR8hRk/9uh/EjwsGRNnkatIsp2z 61tFgV6KDWTLS4Y40jl0zPzwGY7Lp+MvhFCW7MygAbG6wjL1d/0PPQrNvJVq5I1kwK qyivW3L2UqvYPGqLKlC4DEFtSUuAOrvuOOyx6Qx0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Message-ID: <5F1D8BC5.6030405@gmx.de> Date: Sun, 26 Jul 2020 15:57:25 +0200 From: "Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via djgpp AT delorie DOT com]" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7 MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: Fwd: Fwd: Bug report -- utimes() References: <5F1C6113 DOT 9050807 AT gmx DOT de> <20200725181011.DP1yL%schily AT schily DOT net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed X-Provags-ID: V03:K1:Fxenh0ybaOdM4aXY8a6aqcXb8wFBWzX1Fe8/Uw4brVnCw5rosoC +GRa7rW8tY35b83I8+oc9UCeHp5iOqX0HlPNJUqvuMqq6Z1ol2ASutWVr1WOAQrb8a4xyBk vWT+F9ZUBtGVtL1XZep1hVLDnvPZj2YSET9V7PyRt55tiBDjqloVrQAhiEOAG8EuQnTBF6B 2Vi1uUpQNMpi4U2RTdJRg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:AYy9hD7EDks=:ErJLGBu+eujb6CwK+92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51Ar7LBzdsoimf9nNdMn vMsThAjSCif2CsapIQMNw7T6eWm5ifWkZWeWUFu/KB9xQmdLVdlnvQPDZ98tPjYFUGyrbXeCh sfXa7DtZ1tTCTm9yKJaiype2GmGwhff3Qev4ZL6Stn9JaQvOMDIblcalu4A6d7p4cIeEfp5mk RvHZBLEeBS80JIc8QC+cw9QR+O+9C1T1bvvpMkg== Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 06QDwIlu017829 Reply-To: djgpp AT delorie DOT com Am 25.07.2020 20:58, schrieb A. Wik (awik32 AT gmail DOT com) [via djgpp AT delorie DOT com]: > Reply from Schilling: > > ---------- Forwarded message --------- > From: Joerg Schilling > Date: Sat, 25 Jul 2020 at 18:10 > Subject: Re: Fwd: Bug report -- utimes() > To:, > > > "A. Wik" wrote: > >> Hi, >> >> I received this reply to the utimes() bug report you asked me to forward. >> >> ---------- Forwarded message --------- >> From: Juan Manuel Guerrero (juan DOT guerrero AT gmx DOT de) [via >> djgpp AT delorie DOT com] >> Date: Sat, 25 Jul 2020 at 16:49 >> Subject: Re: Bug report -- utimes() >> To: > ... >> >> Sorry, but I do not fully understannd this. >> DJGPP provides utime() and utimes() that fully conform to 4.3BSD, POSIX.1-2001 >> with regards to their arguments. There is nothing like a const struct >> timestruct > > OK, this was a typo, but the problem seems to be a wrong protoype for utimes() > in DJGPP. > > The bug is in > > c:/djgpp/include/sys/time.h:41:46: note: expected 'struct timeval *' but > argument is of type 'const struct timeval *' > 41 | int utimes(const char *_file, struct timeval _tvp[2]); > > and the standard says: > > https://pubs.opengroup.org/onlinepubs/9699919799/functions/utimes.html > > Jörg > > -- > EMail:joerg AT schily DOT net (home) Jörg Schilling D-13353 Berlin > joerg DOT schilling AT fokus DOT fraunhofer DOT de (work) Blog: http://schily.blogspot.com/ > URL: http://cdrecord.org/private/ > http://sourceforge.net/projects/schilytools/files/ > Thank you for the clarification. The issue has been fixed. Regards, Juan M. Guerrero 2020-07-26 Juan Manuel Guerrero * djgpp/include/sys/time.h: utimes prototype fixed. Reported by Jörg Schilling and Albert Wik. * djgpp/src/libc/compat/time/utimes.c: arguments of utimes fixed. Reported by Jörg Schilling and Albert Wik. * djgpp/src/libc/compat/time/utimes.txh: utimes prototype fixed. Reported by Jörg Schilling and Albert Wik. Index: djgpp/include/sys/time.h =================================================================== RCS file: /cvs/djgpp/djgpp/include/sys/time.h,v retrieving revision 1.6 diff -U 5 -r1.6 time.h --- djgpp/include/sys/time.h 2 May 2015 07:31:58 -0000 1.6 +++ djgpp/include/sys/time.h 26 Jul 2020 13:38:05 -0000 @@ -1,5 +1,6 @@ +/* Copyright (C) 2020 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2012 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 2003 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1999 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #ifndef __dj_include_sys_time_h_ @@ -36,11 +37,11 @@ clock granularity. */ extern long __djgpp_clock_tick_interval; int getitimer(int _which, struct itimerval *_value); int setitimer(int _which, struct itimerval *_value, struct itimerval *_ovalue); -int utimes(const char *_file, struct timeval _tvp[2]); +int utimes(const char *_file, const struct timeval _tvp[2]); #endif /* !_POSIX_SOURCE */ #endif /* !__STRICT_ANSI__ */ #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */ Index: djgpp/src/libc/compat/time/utimes.c =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/compat/time/utimes.c,v retrieving revision 1.1 diff -U 5 -r1.1 utimes.c --- djgpp/src/libc/compat/time/utimes.c 27 Aug 1995 04:27:32 -0000 1.1 +++ djgpp/src/libc/compat/time/utimes.c 26 Jul 2020 13:38:05 -0000 @@ -1,11 +1,12 @@ +/* Copyright (C) 2020 DJ Delorie, see COPYING.DJ for details */ /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #include int -utimes(const char *file, struct timeval tvp[2]) +utimes(const char *file, const struct timeval tvp[2]) { struct utimbuf utb; utb.actime = tvp[0].tv_sec; utb.modtime = tvp[1].tv_sec; return utime(file, &utb); Index: djgpp/src/libc/compat/time/utimes.txh =================================================================== RCS file: /cvs/djgpp/djgpp/src/libc/compat/time/utimes.txh,v retrieving revision 1.4 diff -U 5 -r1.4 utimes.txh --- djgpp/src/libc/compat/time/utimes.txh 29 Jan 2003 12:43:38 -0000 1.4 +++ djgpp/src/libc/compat/time/utimes.txh 26 Jul 2020 13:38:05 -0000 @@ -3,11 +3,11 @@ @subheading Syntax @example #include -int utimes(const char *file, struct timeval tvp[2]); +int utimes(const char *file, const struct timeval tvp[2]); @end example @subheading Description This function sets the file access time as specified by