Skip to content

Commit 909eb22

Browse files
committed
Also patching gcc now.
1 parent c319254 commit 909eb22

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

tools/macos-mips/mipsel-none-elf-gcc.rb

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class MipselNoneElfGcc < Formula
1111
depends_on "mpfr"
1212
depends_on "gnu-sed"
1313

14+
patch :DATA
15+
1416
def install
1517
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin"
1618
mkdir "mipsel-none-elf-gcc-build" do
@@ -50,3 +52,47 @@ def install
5052
system "#{bin}/mipsel-none-elf-gcc", "-c", "-o", "test-c.o", "test-c.c"
5153
end
5254
end
55+
56+
__END__
57+
diff --git a/zlib/zutil.h b/zlib/zutil.h
58+
index 0bd2dbcba..bb513cb4b 100644
59+
--- a/zlib/zutil.h
60+
+++ b/zlib/zutil.h
61+
@@ -130,17 +130,8 @@
62+
# endif
63+
#endif
64+
65+
-#if defined(MACOS) || defined(TARGET_OS_MAC)
66+
+#if defined(MACOS)
67+
# define OS_CODE 7
68+
-# ifndef Z_SOLO
69+
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
70+
-# include <unix.h> /* for fdopen */
71+
-# else
72+
-# ifndef fdopen
73+
-# define fdopen(fd,mode) NULL /* No fdopen() */
74+
-# endif
75+
-# endif
76+
-# endif
77+
#endif
78+
79+
#ifdef __acorn
80+
@@ -163,19 +154,12 @@
81+
# define OS_CODE 19
82+
#endif
83+
84+
-#if defined(_BEOS_) || defined(RISCOS)
85+
-# define fdopen(fd,mode) NULL /* No fdopen() */
86+
-#endif
87+
-
88+
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
89+
# if defined(_WIN32_WCE)
90+
-# define fdopen(fd,mode) NULL /* No fdopen() */
91+
# ifndef _PTRDIFF_T_DEFINED
92+
typedef int ptrdiff_t;
93+
# define _PTRDIFF_T_DEFINED
94+
# endif
95+
-# else
96+
-# define fdopen(fd,type) _fdopen(fd,type)
97+
# endif
98+
#endif

tools/vscode-extension/scripts/mipsel-none-elf-gcc.rb

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class MipselNoneElfGcc < Formula
1111
depends_on "mpfr"
1212
depends_on "gnu-sed"
1313

14+
patch :DATA
15+
1416
def install
1517
ENV.prepend_path "PATH", Formula["gnu-sed"].opt_libexec/"gnubin"
1618
mkdir "mipsel-none-elf-gcc-build" do
@@ -50,3 +52,47 @@ def install
5052
system "#{bin}/mipsel-none-elf-gcc", "-c", "-o", "test-c.o", "test-c.c"
5153
end
5254
end
55+
56+
__END__
57+
diff --git a/zlib/zutil.h b/zlib/zutil.h
58+
index 0bd2dbcba..bb513cb4b 100644
59+
--- a/zlib/zutil.h
60+
+++ b/zlib/zutil.h
61+
@@ -130,17 +130,8 @@
62+
# endif
63+
#endif
64+
65+
-#if defined(MACOS) || defined(TARGET_OS_MAC)
66+
+#if defined(MACOS)
67+
# define OS_CODE 7
68+
-# ifndef Z_SOLO
69+
-# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
70+
-# include <unix.h> /* for fdopen */
71+
-# else
72+
-# ifndef fdopen
73+
-# define fdopen(fd,mode) NULL /* No fdopen() */
74+
-# endif
75+
-# endif
76+
-# endif
77+
#endif
78+
79+
#ifdef __acorn
80+
@@ -163,19 +154,12 @@
81+
# define OS_CODE 19
82+
#endif
83+
84+
-#if defined(_BEOS_) || defined(RISCOS)
85+
-# define fdopen(fd,mode) NULL /* No fdopen() */
86+
-#endif
87+
-
88+
#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
89+
# if defined(_WIN32_WCE)
90+
-# define fdopen(fd,mode) NULL /* No fdopen() */
91+
# ifndef _PTRDIFF_T_DEFINED
92+
typedef int ptrdiff_t;
93+
# define _PTRDIFF_T_DEFINED
94+
# endif
95+
-# else
96+
-# define fdopen(fd,type) _fdopen(fd,type)
97+
# endif
98+
#endif

0 commit comments

Comments
 (0)