]> git.donarmstrong.com Git - samtools.git/blobdiff - ksort.h
Merge branch 'vsbuffalo-master' into develop
[samtools.git] / ksort.h
diff --git a/ksort.h b/ksort.h
index b8b62f189c557a8aa77fbdfbb93e7dafb3acba14..aa0bb93e2a703068a76eac007d949908337ffb65 100644 (file)
--- a/ksort.h
+++ b/ksort.h
 /* Contact: Heng Li <lh3@sanger.ac.uk> */
 
 /*
+  2012-12-11 (0.1.4):
+
+    * Defined __ks_insertsort_##name as static to compile with C99.
+
   2008-11-16 (0.1.4):
 
     * Fixed a bug in introsort() that happens in rare cases.
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef _WIN32
-#define drand48() ((double)rand() / RAND_MAX)
-#endif
-
 typedef struct {
        void *left, *right;
        int depth;
@@ -145,7 +145,7 @@ typedef struct {
                        tmp = *l; *l = l[i]; l[i] = tmp; ks_heapadjust_##name(0, i, l); \
                }                                                                                                                               \
        }                                                                                                                                       \
-       inline void __ks_insertsort_##name(type_t *s, type_t *t)                        \
+       static inline void __ks_insertsort_##name(type_t *s, type_t *t)         \
        {                                                                                                                                       \
                type_t *i, *j, swap_tmp;                                                                                \
                for (i = s + 1; i < t; ++i)                                                                             \