Re: Compile errors when building libapl

2024-03-03 Thread Paul Rockwell
I've done a little digging into the source code. I hope this helps.

libapl.cc hasn't been changed since SVN 1712. It seems to me that it has not 
caught up to changes in other parts of the code.

From searching the entire source tree and browsing the SVN repository, it looks 
like the following changes in SVN 1713 have contributed to breaking libapl.cc:

the definition of resolve_right() in Symbol.hh and SystemVariable.hh was 
changed to add the additional argument
the removal of the definition of extract_and_keep() in class Token in Token.hh.

- 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(), &st) == 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-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