Author: brane
Date: Sun Apr 10 22:50:33 2022
New Revision: 1899721

URL: http://svn.apache.org/viewvc?rev=1899721&view=rev
Log:
Correctly report newer macOS version names.

* subversion/libsvn_subr/sysinfo.c
  (release_name_from_version): Detect Big Sur (11.x) and Monterey (12.x).
* subversion/svn/help-cmd.c
  (svn_cl__help): Report "macOS Keychain" instead of "Mac OS X Keychain".

Modified:
    subversion/trunk/subversion/libsvn_subr/sysinfo.c
    subversion/trunk/subversion/svn/help-cmd.c

Modified: subversion/trunk/subversion/libsvn_subr/sysinfo.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sysinfo.c?rev=1899721&r1=1899720&r2=1899721&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sysinfo.c Sun Apr 10 22:50:33 2022
@@ -1375,7 +1375,9 @@ static const char *
 release_name_from_version(int major, int minor, const char* product_name)
 {
   /* We can only do this if we know the official product name. */
-  if (0 == strcmp(product_name, "Mac OS X"))
+  if (0 == strcmp(product_name, "Mac OS X")
+      || 0 == strcmp(product_name, "OS X")
+      || 0 == strcmp(product_name, "macOS"))
     {
       /* See https://en.wikipedia.org/wiki/MacOS_version_history#Releases */
       switch(major)
@@ -1403,10 +1405,11 @@ release_name_from_version(int major, int
           break;
 
         case 11:
-          switch(minor)
-            {
-            case  0: return "Big Sur";
-            }
+          return "Big Sur";
+          break;
+
+        case 12:
+          return "Monterey";
           break;
         }
     }

Modified: subversion/trunk/subversion/svn/help-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/help-cmd.c?rev=1899721&r1=1899720&r2=1899721&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/help-cmd.c (original)
+++ subversion/trunk/subversion/svn/help-cmd.c Sun Apr 10 22:50:33 2022
@@ -208,7 +208,7 @@ svn_cl__help(apr_getopt_t *os,
   svn_stringbuf_appendcstr(version_footer, "* GPG-Agent\n");
 #endif
 #ifdef SVN_HAVE_KEYCHAIN_SERVICES
-  svn_stringbuf_appendcstr(version_footer, "* Mac OS X Keychain\n");
+  svn_stringbuf_appendcstr(version_footer, "* macOS Keychain\n");
 #endif
 #ifdef SVN_HAVE_KWALLET
   svn_stringbuf_appendcstr(version_footer, "* KWallet (KDE)\n");


Reply via email to