Skip to content

Instantly share code, notes, and snippets.

@leedm777
Created November 8, 2010 21:57
Show Gist options
  • Save leedm777/668341 to your computer and use it in GitHub Desktop.
Save leedm777/668341 to your computer and use it in GitHub Desktop.
Homebrew patch. Fixes MCPP compilation on Mac.
stpcpy is a #define on Mac OS X. Trying to define it as an extern is invalid.
diff -ur mcpp-2.7.2-orig/src/internal.H mcpp-2.7.2/src/internal.H
--- mcpp-2.7.2-orig/src/internal.H 2008-08-27 08:01:16.000000000 -0500
+++ mcpp-2.7.2/src/internal.H 2010-11-08 15:53:38.000000000 -0600
@@ -557,6 +557,6 @@
#endif
#endif
-#if HOST_HAVE_STPCPY
+#if HOST_HAVE_STPCPY && !defined(stpcpy)
extern char * stpcpy( char * dest, const char * src);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment