Skip to content

Commit

Permalink
Return OSXFUSE version if function "const char *macfuse_version(void)…
Browse files Browse the repository at this point in the history
…" of

libmacfuse is invoked
  • Loading branch information
bfleischer committed Jul 18, 2011
1 parent dbf53e0 commit a619cd8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
5 changes: 3 additions & 2 deletions libmacfuse.xcodeproj/project.pbxproj
Expand Up @@ -268,7 +268,7 @@
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.5;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "-D__FreeBSD__=10";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-L/tmp/osxfuse-core-10.5-2.1.7/pkgroot/usr/local/lib",
"-L$(OSXFUSE_BUILD_ROOT)/usr/local/lib",
Expand All @@ -285,12 +285,13 @@
DYLIB_COMPATIBILITY_VERSION = 10;
DYLIB_CURRENT_VERSION = 2;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_PREPROCESSOR_DEFINITIONS = "";
GCC_VERSION = 4.2;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.5;
OTHER_CFLAGS = "-D__FreeBSD__=10";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = (
"-L/tmp/osxfuse-core-10.5-2.1.7/pkgroot/usr/local/lib",
"-L$(OSXFUSE_BUILD_ROOT)/usr/local/lib",
Expand Down
13 changes: 8 additions & 5 deletions libmacfuse/macfuse.c
Expand Up @@ -10,12 +10,15 @@

#include "macfuse.h"

__attribute__((constructor)) static void lib_constructor(void);
extern void osxfuse_enable_macfuse_mode(bool);
extern const char *osxfuse_version(void);

const char *macfuse_version(void) {
return MACFUSE_VERSION;
}
__attribute__((constructor)) static void libmacfuse_constructor(void);

static void lib_constructor(void) {
static void libmacfuse_constructor(void) {
osxfuse_enable_macfuse_mode(true);
}

const char *macfuse_version(void) {
return osxfuse_version();
}
5 changes: 0 additions & 5 deletions libmacfuse/macfuse.h
Expand Up @@ -8,9 +8,4 @@

#include <stdbool.h>

#define MACFUSE_VERSION "2.1.5"

const char *macfuse_version(void);

// Enable or disable the MacFUSE compatibility mode
void osxfuse_enable_macfuse_mode(bool);

0 comments on commit a619cd8

Please sign in to comment.