subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1413030 - in /subversion/trunk: configure.ac subversion/svn/props.c
Date Fri, 23 Nov 2012 18:57:45 GMT
Author: brane
Date: Fri Nov 23 18:57:44 2012
New Revision: 1413030

URL: http://svn.apache.org/viewvc?rev=1413030&view=rev
Log:
Make Julian happy: use #ifdef even when #if works just fine.

* configure.ac,
  subversion/svn/props.c: Replace #if with #ifdef/#ifdef/#if defined().

Modified:
    subversion/trunk/configure.ac
    subversion/trunk/subversion/svn/props.c

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1413030&r1=1413029&r2=1413030&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Fri Nov 23 18:57:44 2012
@@ -684,10 +684,10 @@ fi
 
 AH_BOTTOM([
 /* Wrap qsort_r for cross-platform compatibility */
-#if !HAVE_QSORT_R
+#ifindef HAVE_QSORT_R
 #define SVN_QSORT_R(base, length, width, compare, thunk) \
   (qsort((base), (length), (width), (compare)))
-#elif SVN_QSORT_R_NORMAL_ARG_ORDER
+#elif defined(SVN_QSORT_R_NORMAL_ARG_ORDER)
 #define SVN_QSORT_R qsort_r
 #else
 /* BSD changes the order of the compare and thunk arguments */

Modified: subversion/trunk/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/props.c?rev=1413030&r1=1413029&r2=1413030&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/props.c (original)
+++ subversion/trunk/subversion/svn/props.c Fri Nov 23 18:57:44 2012
@@ -239,7 +239,7 @@ struct simprop_t
   svn_string_t name;      /* svn: property name */
   unsigned int score;     /* the similarity score */
   apr_size_t diff;        /* number of chars different from context.name */
-#if !HAVE_QSORT_R
+#ifndef HAVE_QSORT_R
   struct simprop_context_t *context; /* sorting context for qsort() */
 #endif
 };
@@ -259,20 +259,20 @@ simprop_key_diff(const svn_string_t *key
 }
 
 /* Key comparator for qsort or qsort_r for simprop_t */
-#if !HAVE_QSORT_R
+#ifdef HAVE_QSORT_R
 static int
-simprop_compare(const void *pkeya, const void *pkeyb)
+simprop_compare(void *pcontext, const void *pkeya, const void *pkeyb)
 #else
 static int
-simprop_compare(void *pcontext, const void *pkeya, const void *pkeyb)
+simprop_compare(const void *pkeya, const void *pkeyb)
 #endif
 {
   struct simprop_t *const keya = *(struct simprop_t *const *)pkeya;
   struct simprop_t *const keyb = *(struct simprop_t *const *)pkeyb;
-#if !HAVE_QSORT_R
-  struct simprop_context_t *const context = keya->context;
-#else
+#ifdef HAVE_QSORT_R
   struct simprop_context_t *const context = pcontext;
+#else
+  struct simprop_context_t *const context = keya->context;
 #endif
 
   if (keya->score == -1)
@@ -357,7 +357,7 @@ svn_cl__check_svn_prop_name(const char *
       propbuf[i].name.data = proplist[i];
       propbuf[i].name.len = strlen(proplist[i]);
       propbuf[i].score = (unsigned int)-1;
-#if !HAVE_QSORT_R
+#ifndef HAVE_QSORT_R
       propbuf[i].context = &context;
 #endif
     }



Mime
View raw message