[Gnucash-changes] r13578 - gnucash/trunk/src/backend/file - Check for errno macro EOPNOTSUPP only if it is defined

Christian Stimming cstim at cvs.gnucash.org
Fri Mar 10 04:36:44 EST 2006


Author: cstim
Date: 2006-03-10 04:36:43 -0500 (Fri, 10 Mar 2006)
New Revision: 13578
Trac: http://svn.gnucash.org/trac/changeset/13578

Modified:
   gnucash/trunk/src/backend/file/gnc-backend-file.c
Log:
Check for errno macro EOPNOTSUPP only if it is defined

Modified: gnucash/trunk/src/backend/file/gnc-backend-file.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-backend-file.c	2006-03-10 09:14:51 UTC (rev 13577)
+++ gnucash/trunk/src/backend/file/gnc-backend-file.c	2006-03-10 09:36:43 UTC (rev 13578)
@@ -129,7 +129,11 @@
     if (rc)
     {
         /* If hard links aren't supported, just allow the lock. */
-        if (errno == EOPNOTSUPP || errno == EPERM)
+        if (errno == EPERM
+#ifdef EOPNOTSUPP
+	    || errno == EOPNOTSUPP
+#endif
+	    )
         {
             be->linkfile = NULL;
             return TRUE;
@@ -336,7 +340,11 @@
     int err_ret = link(orig, bkup);
     if(err_ret != 0)
     {
-        if(errno == EPERM || errno == EOPNOTSUPP)
+        if(errno == EPERM
+#ifdef EOPNOTSUPP
+	   || errno == EOPNOTSUPP
+#endif
+	   )
         {
             err_ret = copy_file(orig, bkup);
         }



More information about the gnucash-changes mailing list