Re: Is svn release 1758 missing fixes?

2024-03-04 Thread Dr . Jürgen Sauermann

Hi Mike,

sorry for that, it came after *#ifdef APPLE* so I did not notice it.
I am not a MAC owner, so I can't compile myself but rather depend
on your reports.

Now hopefully fixed in *SVN 1760*.

As to svn, you simply check out GNU APL once (as you did) and then

*svn up*

to fetch that changes that I made.


Best Regards,
Jürgen


On 3/3/24 22:08, M.Hall wrote:

Is svn release 1758 missing fixes for Backtrace.cc and Command.cc ?
On macos 10.15.7 (old, I know).
I added small fixes in my "working copy" below to avoid compile errors 
- the diff will show them.
(Also, '__APPLE__' is defined by the compiler.  See the output of 
'echo | g++ -dM -E -' as in the libapl bug report.)


$ svn up

$ svn info
Path: .
Working Copy Root Path: /Volumes/Archive/Language/APL/gnu-apl/SVN/trunk
URL: http://svn.savannah.gnu.org/svn/apl/trunk
Relative URL: ^/trunk
Repository Root: http://svn.savannah.gnu.org/svn/apl
Repository UUID: bd74f7bd-1a55-4bac-9fab-68015b139e80
Revision: 1758
Node Kind: directory
Schedule: normal
Last Changed Author: j_sauermann
Last Changed Rev: 1758
Last Changed Date: 2024-03-03 08:22:02 -0600 (Sun, 03 Mar 2024)

$ svn diff

Index: src/Backtrace.cc
===
--- src/Backtrace.cc (revision 1758)
+++ src/Backtrace.cc (working copy)
@@ -364,7 +364,7 @@
               *e = '\0';
               fun = e + 1;
               abs_addr = strtoll(a_a, nullptr, 16);
-              abs_addr -= main_offset 0;
+              abs_addr -= main_offset_0;
           }
       }

Index: src/Command.cc
===
--- src/Command.cc (revision 1758)
+++ src/Command.cc (working copy)
@@ -2024,6 +2024,9 @@
    if (access(name.c_str(), R_OK) == 0)   // file is readable
       {
         struct stat st;
+#ifdef __APPLE__
+#define st_mtim  st_mtimespec
+#endif
         if (stat(name.c_str(), ) == 0)   // got stat
            {
              if (sort == SORT_SIZE)   return st.st_size;

Or is there a 'subversion' way to pull in these fixes?
Backtrace.cc was fixed in 1752.
Command.cc was fixed in 1753.
But when I do a full 'checkout' or an 'upgrade' they do not appear.
I'm a total beginner to svn, so I could be using it the wrong way.

Thank you!
--
Mike Hall




Re: Is svn release 1758 missing fixes?

2024-03-04 Thread Dr . Jürgen Sauermann

Hi Paul,

thanks, fixed in *SVN 1759 *as proposed. I was initially thinking of

*return st.st_mtime;*

myself but didn't do it because is is a macro and I wasn't sure if it is 
#define'd

on all platform.

Best Regards,
Jürgen


On 3/4/24 02:49, Paul Rockwell wrote:

Mike,

I noticed the same issues in SVN 1757 and 1758 as well. I have made 
similar fixes in the source that I have.


Our fixes differ in that the fix I made to Command.cc 
 is to change line 2030 from

if (sort == SORT_TIME) return st.st_mtim.tv_sec;
2031

to
if (sort == SORT_TIME) return st.st_mtime;
2031

Both Linux and macOS #define st_mtime to best.st_mtim.tv_sec (Linux) 
or st.st_mtimespec.tv_sec (macOS) to provide backward compatibility. 
That way we don't need the

test for __APPLE__.

- Paul Rockwell


Re: Is svn release 1758 missing fixes?

2024-03-03 Thread Paul Rockwell
Mike,

I noticed the same issues in SVN 1757 and 1758 as well. I have made similar 
fixes in the source that I have.

Our fixes differ in that the fix I made to Command.cc  is 
to change line 2030 from 
if (sort == SORT_TIME)   return st.st_mtim.tv_sec;
2031
to
if (sort == SORT_TIME)   return st.st_mtime;
2031

Both Linux and macOS #define st_mtime to be st.st_mtim.tv_sec (Linux) or 
st.st_mtimespec.tv_sec (macOS) to provide backward compatibility. That way we 
don't need the 
test for __APPLE__.

- Paul Rockwell

Is svn release 1758 missing fixes?

2024-03-03 Thread M.Hall
Is svn release 1758 missing fixes for Backtrace.cc and Command.cc ?
On macos 10.15.7 (old, I know).
I added small fixes in my "working copy" below to avoid compile errors -
the diff will show them.
(Also, '__APPLE__' is defined by the compiler.  See the output of 'echo |
g++ -dM -E -' as in the libapl bug report.)

$ svn up

$ svn info
Path: .
Working Copy Root Path: /Volumes/Archive/Language/APL/gnu-apl/SVN/trunk
URL: http://svn.savannah.gnu.org/svn/apl/trunk
Relative URL: ^/trunk
Repository Root: http://svn.savannah.gnu.org/svn/apl
Repository UUID: bd74f7bd-1a55-4bac-9fab-68015b139e80
Revision: 1758
Node Kind: directory
Schedule: normal
Last Changed Author: j_sauermann
Last Changed Rev: 1758
Last Changed Date: 2024-03-03 08:22:02 -0600 (Sun, 03 Mar 2024)

$ svn diff

Index: src/Backtrace.cc
===
--- src/Backtrace.cc (revision 1758)
+++ src/Backtrace.cc (working copy)
@@ -364,7 +364,7 @@
   *e = '\0';
   fun = e + 1;
   abs_addr = strtoll(a_a, nullptr, 16);
-  abs_addr -= main_offset 0;
+  abs_addr -= main_offset_0;
   }
   }

Index: src/Command.cc
===
--- src/Command.cc (revision 1758)
+++ src/Command.cc (working copy)
@@ -2024,6 +2024,9 @@
if (access(name.c_str(), R_OK) == 0)   // file is readable
   {
 struct stat st;
+#ifdef __APPLE__
+#define st_mtim  st_mtimespec
+#endif
 if (stat(name.c_str(), ) == 0)   // got stat
{
  if (sort == SORT_SIZE)   return st.st_size;

Or is there a 'subversion' way to pull in these fixes?
Backtrace.cc was fixed in 1752.
Command.cc was fixed in 1753.
But when I do a full 'checkout' or an 'upgrade' they do not appear.
I'm a total beginner to svn, so I could be using it the wrong way.

Thank you!
 --
Mike Hall