Skip to content

Instantly share code, notes, and snippets.

@command-Q
command-Q / gist:2721440
Created May 17, 2012 20:34
Patch against OS X 10.6 math.h fixing compilation of C++11 programs with libc++.
--- /usr/include/architecture/i386/math.h 2009-10-02 02:12:05.000000000 -0400
+++ /usr/local/include/math.h 2012-05-17 15:32:14.000000000 -0400
@@ -384,7 +384,7 @@
extern long int lround ( double );
extern long int lroundf ( float );
-#if ( defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L ) || ! defined( __STRICT_ANSI__ ) || ! defined( __GNUC__ )
+#if !(__DARWIN_NO_LONG_LONG)
/* long long is not part of C90. Make sure you are passing -std=c99 or -std=gnu99 or better if you need this. */
@command-Q
command-Q / file_cmds-202.2-2.patch
Created April 17, 2012 05:09
Patch against Darwin file_cmds 202.2 (10.6.8) making cp, mv, and touch handle file birthtime attribute.
diff -rupN file_cmds-202.2/mv/pathnames.h file_cmds-202.2-birthtime/mv/pathnames.h
--- file_cmds-202.2/mv/pathnames.h 2005-01-20 20:11:19.000000000 -0500
+++ file_cmds-202.2-birthtime/mv/pathnames.h 2012-03-07 11:25:18.000000000 -0500
@@ -36,5 +36,5 @@
#define _PATH_RM "/bin/rm"
#ifdef __APPLE__
-#define _PATH_CP "/bin/cp"
+#define _PATH_CP "/usr/local/bin/cp"
#endif /* __APPLE__ */