Skip to content

Commit

Permalink
Merge pull request #189 from landryb/master
Browse files Browse the repository at this point in the history
Define inline for all systems, change for Windows to __inline
  • Loading branch information
elemoine committed Aug 21, 2017
2 parents 07ccd89 + c0c0461 commit d7bb3ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/sort_r/sort_r.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ void sort_r(void *base, size_t nel, size_t width,
*/

#define _SORT_R_INLINE inline

#if (defined __APPLE__ || defined __MACH__ || defined __DARWIN__ || \
defined __FreeBSD__ || defined __DragonFly__)
# define _SORT_R_BSD
# define _SORT_R_INLINE inline
#elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
defined __linux__ || (defined __MINGW32__ && !defined __MINGW64_VERSION_MAJOR) || defined __GLIBC__)
# define _SORT_R_LINUX
# define _SORT_R_INLINE inline
#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
# define _SORT_R_WINDOWS
# undef _SORT_R_INLINE
# define _SORT_R_INLINE __inline
#else
/* Using our own recursive quicksort sort_r_simple() */
Expand Down

0 comments on commit d7bb3ed

Please sign in to comment.