emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-28 e0ee1d0: Work around IBM XL C compiler bug


From: Paul Eggert
Subject: emacs-28 e0ee1d0: Work around IBM XL C compiler bug
Date: Thu, 2 Dec 2021 21:20:29 -0500 (EST)

branch: emacs-28
commit e0ee1d003ac84ba32b6c23575ddaeabb932cd6e1
Author: Paul Eggert <eggert@cs.ucla.edu>
Commit: Paul Eggert <eggert@cs.ucla.edu>

    Work around IBM XL C compiler bug
    
    * src/fileio.c (Fcopy_file): Work around a compiler bug in IBM XL
    C for AIX, V12.1 (5765-J02, 5725-C72).  Without this patch, the
    compiler incorrectly complains “Initialization between types "int"
    and "struct timespec" is not allowed” and “Initialization between
    types "long" and "struct timespec" is not allowed”.
---
 src/fileio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/fileio.c b/src/fileio.c
index 3c13d3f..7e3bebc 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2386,7 +2386,9 @@ permissions.  */)
 
   if (!NILP (keep_time))
     {
-      struct timespec ts[] = { get_stat_atime (&st), get_stat_mtime (&st) };
+      struct timespec ts[2];
+      ts[0] = get_stat_atime (&st);
+      ts[1] = get_stat_mtime (&st);
       if (futimens (ofd, ts) != 0)
        xsignal2 (Qfile_date_error,
                  build_string ("Cannot set file date"), newname);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]