Skip to content

Commit

Permalink
Fixes for OS X.
Browse files Browse the repository at this point in the history
  • Loading branch information
frankencode committed Oct 21, 2010
1 parent d92b715 commit dda5bde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions codetips/HaxeCodetips.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ Ref<Tip, Owner> HaxeCodetips::assist(Ref<Context> context, int modifiers, uchar_
processFactory_->setWorkingDirectory(Path(projectFile).reduce());
// debug("HaxeCodetips::assist(): processFactory_->execPath() = \"%%\"\n", processFactory_->execPath());

String options = Format("%% %% --display %%@%%") << projectFile << className << context->path() << context->cursorByte();
String options = Format("%%,%%,--display,%%@%%") << projectFile << className << context->path() << context->cursorByte();
// debug("HaxeCodetips::assist(): options = \"%%\"\n", options);

processFactory_->setOptions(options.split(" "));
processFactory_->setOptions(options.split(","));

Ref<Process, Owner> process = processFactory_->produce();
String message = process->rawOutput()->readAll();
Expand Down
9 changes: 2 additions & 7 deletions codetips/InterpositionClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <ftl/PrintDebug.hpp> // DEBUG
#include <ftl/Path.hpp>
#include <ftl/LocalStatic.hpp>
#include <ftl/Process.hpp>
#include <ftl/StreamSocket.hpp>
Expand All @@ -29,7 +29,6 @@ String InterpositionClient::redirectOpen(String path, int flags)
class OpenFunction {
public:
typedef int (*Pointer)(const char* path, int flags, ...);

OpenFunction()
: ptr_((Pointer)dlsym(RTLD_NEXT, "open"))
{}
Expand All @@ -38,7 +37,7 @@ class OpenFunction {

} // namespace codetips

int open(const char* path, int flags, ...)
__attribute__((visibility("default"))) int open(const char* path, int flags, ...)
{
using namespace codetips;
String redirPath = InterpositionClient::redirectOpen(path, flags);
Expand All @@ -56,7 +55,3 @@ int open(const char* path, int flags, ...)
}
return ret;
}

#ifdef __MACH__
char** environ; // link HACK
#endif

0 comments on commit dda5bde

Please sign in to comment.