1 diff -rub ./include/architecture/i386/fpu.h ./include/architecture/i386/fpu.h
2 --- ./include/architecture/i386/fpu.h Thu May 6 19:24:30 1999
3 +++ ./include/architecture/i386/fpu.h Mon Aug 25 12:56:22 2003
8 -#import <architecture/i386/sel.h>
9 +#include <architecture/i386/sel.h>
12 * Floating point 'environment'
13 diff -rub ./include/architecture/i386/frame.h ./include/architecture/i386/frame.h
14 --- ./include/architecture/i386/frame.h Thu May 6 19:24:33 1999
15 +++ ./include/architecture/i386/frame.h Mon Aug 25 12:56:22 2003
20 -#import <architecture/i386/sel.h>
21 +#include <architecture/i386/sel.h>
24 * The actual hardware exception frame
25 diff -rub ./include/architecture/m88k/fp_regs.h ./include/architecture/m88k/fp_regs.h
26 --- ./include/architecture/m88k/fp_regs.h Wed Oct 9 18:47:37 2002
27 +++ ./include/architecture/m88k/fp_regs.h Mon Aug 25 12:56:22 2003
29 #ifndef _ARCH_M88K_FP_REGS_H_
30 #define _ARCH_M88K_FP_REGS_H_
32 -#import <architecture/m88k/reg_help.h>
33 +#include <architecture/m88k/reg_help.h>
36 * m88k_xrf_t -- data types that MAY be in extended register file
37 diff -rub ./include/architecture/m88k/reg_help.h ./include/architecture/m88k/reg_help.h
38 --- ./include/architecture/m88k/reg_help.h Wed Oct 9 18:47:39 2002
39 +++ ./include/architecture/m88k/reg_help.h Mon Aug 25 12:56:22 2003
41 #ifndef _ARCH_M88K_REG_HELP_H_
42 #define _ARCH_M88K_REG_HELP_H_
44 -#import <architecture/nrw/reg_help.h>
45 +#include <architecture/nrw/reg_help.h>
47 /* Stack pointer must always be a multiple of 16 */
49 diff -rub ./include/mach/m88k/thread_status.h ./include/mach/m88k/thread_status.h
50 --- ./include/mach/m88k/thread_status.h Wed Oct 9 18:48:16 2002
51 +++ ./include/mach/m88k/thread_status.h Mon Aug 25 12:56:22 2003
53 #ifndef _MACH_M88K_THREAD_STATE_
54 #define _MACH_M88K_THREAD_STATE_
56 -#import <architecture/m88k/fp_regs.h>
57 -#import <architecture/m88k/reg_help.h>
58 +#include <architecture/m88k/fp_regs.h>
59 +#include <architecture/m88k/reg_help.h>
61 /**************************************************************************
62 * Data Typedefs used by thread_getstatus() and thread_setstatus() *
63 diff -rub ./include/mach/machine.h ./include/mach/machine.h
64 --- ./include/mach/machine.h Mon Feb 10 19:52:25 2003
65 +++ ./include/mach/machine.h Mon Aug 25 12:56:22 2003
67 #ifndef _MACH_MACHINE_H_
68 #define _MACH_MACHINE_H_
70 -#import <mach/machine/vm_types.h>
71 -#import <mach/boolean.h>
72 +#include <mach/machine/vm_types.h>
73 +#include <mach/boolean.h>
76 * For each host, there is a maximum possible number of
77 diff -rub ./include/mach-o/hppa/swap.h ./include/mach-o/hppa/swap.h
78 --- ./include/mach-o/hppa/swap.h Thu May 6 19:25:11 1999
79 +++ ./include/mach-o/hppa/swap.h Mon Aug 25 12:56:22 2003
82 * @APPLE_LICENSE_HEADER_END@
84 -#import <architecture/byte_order.h>
85 -#import <mach/hppa/thread_status.h>
86 +#include <architecture/byte_order.h>
87 +#include <mach/hppa/thread_status.h>
89 extern void swap_hppa_integer_thread_state(
90 struct hp_pa_integer_thread_state *regs,
91 diff -rub ./include/mach-o/i860/swap.h ./include/mach-o/i860/swap.h
92 --- ./include/mach-o/i860/swap.h Thu May 6 19:25:19 1999
93 +++ ./include/mach-o/i860/swap.h Mon Aug 25 12:56:22 2003
96 * @APPLE_LICENSE_HEADER_END@
98 -#import <architecture/byte_order.h>
99 -#import <mach/i860/thread_status.h>
100 +#include <architecture/byte_order.h>
101 +#include <mach/i860/thread_status.h>
103 extern void swap_i860_thread_state_regs(
104 struct i860_thread_state_regs *cpu,
105 diff -rub ./include/mach-o/m68k/swap.h ./include/mach-o/m68k/swap.h
106 --- ./include/mach-o/m68k/swap.h Thu May 6 19:25:26 1999
107 +++ ./include/mach-o/m68k/swap.h Mon Aug 25 12:56:22 2003
110 * @APPLE_LICENSE_HEADER_END@
112 -#import <architecture/byte_order.h>
113 -#import <mach/m68k/thread_status.h>
114 +#include <architecture/byte_order.h>
115 +#include <mach/m68k/thread_status.h>
117 extern void swap_m68k_thread_state_regs(
118 struct m68k_thread_state_regs *cpu,
119 diff -rub ./include/mach-o/m88k/swap.h ./include/mach-o/m88k/swap.h
120 --- ./include/mach-o/m88k/swap.h Thu May 6 19:25:31 1999
121 +++ ./include/mach-o/m88k/swap.h Mon Aug 25 12:56:22 2003
124 * @APPLE_LICENSE_HEADER_END@
126 -#import <architecture/byte_order.h>
127 -#import <mach/m88k/thread_status.h>
128 +#include <architecture/byte_order.h>
129 +#include <mach/m88k/thread_status.h>
131 extern void swap_m88k_thread_state_grf_t(
132 m88k_thread_state_grf_t *cpu,
133 diff -rub ./include/mach-o/rld.h ./include/mach-o/rld.h
134 --- ./include/mach-o/rld.h Tue Oct 2 15:19:03 2001
135 +++ ./include/mach-o/rld.h Mon Aug 25 12:56:22 2003
137 #ifndef _MACHO_RLD_H_
138 #define _MACHO_RLD_H_
140 -#include <streams/streams.h>
141 +//~ #include <streams/streams.h>
142 #include <mach-o/loader.h>
144 extern long rld_load(
145 diff -rub ./include/mach-o/sparc/swap.h ./include/mach-o/sparc/swap.h
146 --- ./include/mach-o/sparc/swap.h Thu May 6 19:25:56 1999
147 +++ ./include/mach-o/sparc/swap.h Mon Aug 25 12:56:22 2003
150 * @APPLE_LICENSE_HEADER_END@
152 -#import <architecture/byte_order.h>
153 -#import <mach/sparc/thread_status.h>
154 +#include <architecture/byte_order.h>
155 +#include <mach/sparc/thread_status.h>
157 void swap_sparc_thread_state_regs(
158 struct sparc_thread_state_regs *cpu,
159 diff -rub ./include/standalone/libsa.h ./include/standalone/libsa.h
160 --- ./include/standalone/libsa.h Mon Sep 11 15:03:00 2000
161 +++ ./include/standalone/libsa.h Mon Aug 25 12:56:22 2003
164 /* Exported API for standalone library */
165 #if !(defined(KLD) && defined(__STATIC__))
166 -#import <mach/mach.h>
167 +#include <mach/mach.h>
168 #else /* defined(KLD) && defined(__STATIC__) */
169 #include <mach/kern_return.h>
170 #endif /* !(defined(KLD) && defined(__STATIC__)) */
171 -#import <mach-o/loader.h>
174 +#include <mach-o/loader.h>
180 diff -rub ./include/stuff/allocate.h ./include/stuff/allocate.h
181 --- ./include/stuff/allocate.h Thu May 6 19:26:24 1999
182 +++ ./include/stuff/allocate.h Mon Aug 25 13:08:44 2003
185 * @APPLE_LICENSE_HEADER_END@
187 -#if defined(__MWERKS__) && !defined(__private_extern__)
188 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
189 #define __private_extern__ __declspec(private_extern)
190 +#elif ( defined(__linux__) && !defined(__private_extern__) )
191 +#define __private_extern__ extern
194 /* defined in allocate.c */
195 diff -rub ./include/stuff/arch.h ./include/stuff/arch.h
196 --- ./include/stuff/arch.h Mon Nov 19 12:09:40 2001
197 +++ ./include/stuff/arch.h Mon Aug 25 13:10:15 2003
199 #ifndef _STUFF_ARCH_H_
200 #define _STUFF_ARCH_H_
202 -#if defined(__MWERKS__) && !defined(__private_extern__)
203 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
204 #define __private_extern__ __declspec(private_extern)
205 +#elif ( defined(__linux__) && !defined(__private_extern__) )
206 +#define __private_extern__ extern
209 * This file contains the current known set of flags and constants for the
210 * known architectures.
212 -#import <mach/machine.h>
213 -#import <stuff/bytesex.h>
214 +#include <mach/machine.h>
215 +#include <stuff/bytesex.h>
218 * The structure describing an architecture flag with the string of the flag
219 diff -rub ./include/stuff/best_arch.h ./include/stuff/best_arch.h
220 --- ./include/stuff/best_arch.h Thu May 6 19:26:29 1999
221 +++ ./include/stuff/best_arch.h Mon Aug 25 13:10:13 2003
224 * @APPLE_LICENSE_HEADER_END@
226 -#if defined(__MWERKS__) && !defined(__private_extern__)
227 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
228 #define __private_extern__ __declspec(private_extern)
229 +#elif ( defined(__linux__) && !defined(__private_extern__) )
230 +#define __private_extern__ extern
233 #include <mach/machine.h>
234 diff -rub ./include/stuff/breakout.h ./include/stuff/breakout.h
235 --- ./include/stuff/breakout.h Mon May 6 14:03:46 2002
236 +++ ./include/stuff/breakout.h Mon Aug 25 13:10:12 2003
239 * @APPLE_LICENSE_HEADER_END@
241 -#if defined(__MWERKS__) && !defined(__private_extern__)
242 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
243 #define __private_extern__ __declspec(private_extern)
244 +#elif ( defined(__linux__) && !defined(__private_extern__) )
245 +#define __private_extern__ extern
248 -#import "stuff/ofile.h"
249 +#include "stuff/ofile.h"
252 * The input files are broken out in to their object files and then placed in
253 diff -rub ./include/stuff/bytesex.h ./include/stuff/bytesex.h
254 --- ./include/stuff/bytesex.h Mon Nov 19 12:09:42 2001
255 +++ ./include/stuff/bytesex.h Mon Aug 25 13:10:10 2003
257 #ifndef _STUFF_BYTESEX_H_
258 #define _STUFF_BYTESEX_H_
260 -#if defined(__MWERKS__) && !defined(__private_extern__)
261 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
262 #define __private_extern__ __declspec(private_extern)
263 +#elif ( defined(__linux__) && !defined(__private_extern__) )
264 +#define __private_extern__ extern
267 -#import <mach-o/fat.h>
268 -#import <mach-o/loader.h>
269 -#import <mach/m68k/thread_status.h>
270 -#import <mach/ppc/thread_status.h>
271 -#import <mach/m88k/thread_status.h>
272 -#import <mach/i860/thread_status.h>
273 -#import <mach/i386/thread_status.h>
274 -#import <mach/hppa/thread_status.h>
275 -#import <mach/sparc/thread_status.h>
276 -#import <mach-o/nlist.h>
277 -#import <mach-o/reloc.h>
278 -#import <mach-o/ranlib.h>
279 -#import "stuff/bool.h"
280 +#include <mach-o/fat.h>
281 +#include <mach-o/loader.h>
282 +#include <mach/m68k/thread_status.h>
283 +#include <mach/ppc/thread_status.h>
284 +#include <mach/m88k/thread_status.h>
285 +#include <mach/i860/thread_status.h>
286 +#include <mach/i386/thread_status.h>
287 +#include <mach/hppa/thread_status.h>
288 +#include <mach/sparc/thread_status.h>
289 +#include <mach-o/nlist.h>
290 +#include <mach-o/reloc.h>
291 +#include <mach-o/ranlib.h>
292 +#include "stuff/bool.h"
296 diff -rub ./include/stuff/errors.h ./include/stuff/errors.h
297 --- ./include/stuff/errors.h Thu May 6 19:26:40 1999
298 +++ ./include/stuff/errors.h Mon Aug 25 13:09:00 2003
301 * @APPLE_LICENSE_HEADER_END@
303 -#if defined(__MWERKS__) && !defined(__private_extern__)
304 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
305 #define __private_extern__ __declspec(private_extern)
306 +#elif ( defined(__linux__) && !defined(__private_extern__) )
307 +#define __private_extern__ extern
310 -#import "mach/mach.h"
311 +#include "mach/mach.h"
313 /* user defined (imported) */
314 __private_extern__ char *progname;
315 diff -rub ./include/stuff/execute.h ./include/stuff/execute.h
316 --- ./include/stuff/execute.h Thu May 6 19:26:42 1999
317 +++ ./include/stuff/execute.h Mon Aug 25 13:10:04 2003
320 * @APPLE_LICENSE_HEADER_END@
322 -#if defined(__MWERKS__) && !defined(__private_extern__)
323 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
324 #define __private_extern__ __declspec(private_extern)
325 +#elif ( defined(__linux__) && !defined(__private_extern__) )
326 +#define __private_extern__ extern
330 diff -rub ./include/stuff/hash_string.h ./include/stuff/hash_string.h
331 --- ./include/stuff/hash_string.h Thu May 6 19:26:45 1999
332 +++ ./include/stuff/hash_string.h Mon Aug 25 13:10:32 2003
335 * @APPLE_LICENSE_HEADER_END@
337 -#if defined(__MWERKS__) && !defined(__private_extern__)
338 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
339 #define __private_extern__ __declspec(private_extern)
340 +#elif ( defined(__linux__) && !defined(__private_extern__) )
341 +#define __private_extern__ extern
344 __private_extern__ long hash_string(
345 diff -rub ./include/stuff/hppa.h ./include/stuff/hppa.h
346 --- ./include/stuff/hppa.h Thu May 6 19:26:47 1999
347 +++ ./include/stuff/hppa.h Mon Aug 25 13:10:40 2003
350 * @APPLE_LICENSE_HEADER_END@
352 -#if defined(__MWERKS__) && !defined(__private_extern__)
353 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
354 #define __private_extern__ __declspec(private_extern)
355 +#elif ( defined(__linux__) && !defined(__private_extern__) )
356 +#define __private_extern__ extern
359 __private_extern__ void calc_hppa_HILO(
360 diff -rub ./include/stuff/ofile.h ./include/stuff/ofile.h
361 --- ./include/stuff/ofile.h Mon Feb 10 19:52:33 2003
362 +++ ./include/stuff/ofile.h Mon Aug 25 13:10:51 2003
364 #ifndef _STUFF_OFILE_H_
365 #define _STUFF_OFILE_H_
367 -#if defined(__MWERKS__) && !defined(__private_extern__)
368 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
369 #define __private_extern__ __declspec(private_extern)
370 +#elif ( defined(__linux__) && !defined(__private_extern__) )
371 +#define __private_extern__ extern
377 #define AR_EFMT1 "#1/" /* extended format #1 */
379 -#import <mach-o/loader.h>
380 +#include <mach-o/loader.h>
382 -#import <mach-o/dyld.h>
383 +#include <mach-o/dyld.h>
385 -#import "stuff/bytesex.h"
386 -#import "stuff/bool.h"
387 -#import "stuff/arch.h"
388 +#include "stuff/bytesex.h"
389 +#include "stuff/bool.h"
390 +#include "stuff/arch.h"
394 diff -rub ./include/stuff/print.h ./include/stuff/print.h
395 --- ./include/stuff/print.h Thu May 6 19:26:55 1999
396 +++ ./include/stuff/print.h Mon Aug 25 13:10:58 2003
399 * @APPLE_LICENSE_HEADER_END@
401 -#if defined(__MWERKS__) && !defined(__private_extern__)
402 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
403 #define __private_extern__ __declspec(private_extern)
404 +#elif ( defined(__linux__) && !defined(__private_extern__) )
405 +#define __private_extern__ extern
411 __private_extern__ void print(
412 const char *format, ...)
413 diff -rub ./include/stuff/reloc.h ./include/stuff/reloc.h
414 --- ./include/stuff/reloc.h Thu May 6 19:26:57 1999
415 +++ ./include/stuff/reloc.h Mon Aug 25 13:11:02 2003
418 * @APPLE_LICENSE_HEADER_END@
420 -#if defined(__MWERKS__) && !defined(__private_extern__)
421 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
422 #define __private_extern__ __declspec(private_extern)
423 +#elif ( defined(__linux__) && !defined(__private_extern__) )
424 +#define __private_extern__ extern
427 -#import <mach/machine.h>
428 -#import "stuff/bool.h"
429 +#include <mach/machine.h>
430 +#include "stuff/bool.h"
432 __private_extern__ unsigned long reloc_pair_r_type(
434 diff -rub ./include/stuff/round.h ./include/stuff/round.h
435 --- ./include/stuff/round.h Fri Mar 14 18:18:29 2003
436 +++ ./include/stuff/round.h Mon Aug 25 13:11:06 2003
439 * @APPLE_LICENSE_HEADER_END@
441 -#if defined(__MWERKS__) && !defined(__private_extern__)
442 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
443 #define __private_extern__ __declspec(private_extern)
444 +#elif ( defined(__linux__) && !defined(__private_extern__) )
445 +#define __private_extern__ extern
449 diff -rub ./include/stuff/symbol_list.h ./include/stuff/symbol_list.h
450 --- ./include/stuff/symbol_list.h Thu Oct 24 17:04:30 2002
451 +++ ./include/stuff/symbol_list.h Mon Aug 25 13:19:46 2003
453 #include <mach-o/nlist.h>
454 #include <stuff/bool.h>
456 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
457 +#define __private_extern__ __declspec(private_extern)
458 +#elif ( defined(__linux__) && !defined(__private_extern__) )
459 +#define __private_extern__ extern
463 * Data structures to perform selective stripping of symbol table entries.
465 diff -rub ./include/stuff/vm_flush_cache.h ./include/stuff/vm_flush_cache.h
466 --- ./include/stuff/vm_flush_cache.h Thu May 6 19:27:05 1999
467 +++ ./include/stuff/vm_flush_cache.h Mon Aug 25 13:11:15 2003
470 * @APPLE_LICENSE_HEADER_END@
472 -#if defined(__MWERKS__) && !defined(__private_extern__)
473 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
474 #define __private_extern__ __declspec(private_extern)
475 +#elif ( defined(__linux__) && !defined(__private_extern__) )
476 +#define __private_extern__ extern
479 -#import <mach/mach.h>
480 +#include <mach/mach.h>
481 __private_extern__ kern_return_t vm_flush_cache(
482 mach_port_t target_task,
483 vm_address_t address,
484 diff -rub ./ld/Makefile ./ld/Makefile
485 --- ./ld/Makefile Fri Mar 14 18:18:29 2003
486 +++ ./ld/Makefile Sat Sep 6 20:17:46 2003
488 -DKERNEL -DKERNEL_PRIVATE -DAPPLE -DNeXT -DLIBSA_PRIVATE
491 -MIG = $(NEXT_ROOT)/usr/bin/mig
494 ifeq "macos" "$(RC_OS)"
495 - X_CFLAGS := $(shell if [ "$(RC_RELEASE)" != "Beaker" ] && \
496 + X_CFLAGS := $(shell if [ `uname` != "Linux" ] && [ "$(RC_RELEASE)" != "Beaker" ] && \
497 [ "$(RC_RELEASE)" != "Bunsen" ] && \
498 [ "$(RC_RELEASE)" != "Gonzo" ] && \
499 [ "$(RC_RELEASE)" != "Kodiak" ]; then \
503 ifneq "mwccppc" "$(notdir $(CC))"
504 + ifeq "Linux" "$(shell uname)"
505 + GCC_FLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../../macosx-include
507 GCC_FLAGS = -Wall $(X_CFLAGS)
511 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
512 +# Hack: Add ../misc to the path because it contains seg_hack and ver_string
513 +ifneq ($(findstring ../misc,$(PATH)),../misc)
514 + PATH:=../misc:../../misc:$(PATH)
517 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
518 echo YES ; else echo NO ; \
522 fvmlibs.c layout.c specs.c pass2.c generic_reloc.c rld.c sets.c \
523 4byte_literals.c 8byte_literals.c literal_pointers.c dylibs.c \
524 indirect_sections.c mod_sections.c i860_reloc.c ppc_reloc.c \
525 - m88k_reloc.c hppa_reloc.c sparc_reloc.c coalesced_sections.c
526 + m88k_reloc.c hppa_reloc.c sparc_reloc.c coalesced_sections.c fake-mach.c
527 OBJS = $(CFILES:.c=.o)
528 INSTALL_FILES = $(CFILES) $(HFILES) Makefile notes \
529 make.defs make_defs.h librld.ofileList
531 makeUser.c ld.c: make.h
533 make.h makeUser.c: make.defs
534 - $(MIG) $(MIG_FLAGS) $(SRCROOT)/make.defs
536 + #~ $(MIG) $(MIG_FLAGS) $(SRCROOT)/make.defs
537 + #~ rm -f makeServer.c
538 + cp $(SRCROOT)/makeUser.c .
541 ifeq "mwccppc" "$(notdir $(CC))"
542 diff -rub ./ld/layout.c ./ld/layout.c
543 --- ./ld/layout.c Wed May 28 18:29:27 2003
544 +++ ./ld/layout.c Mon Aug 25 23:22:05 2003
546 #include "stuff/openstep_mach.h"
547 #include <mach-o/fat.h>
548 #include <mach-o/loader.h>
549 -#import <mach/m68k/thread_status.h>
550 -#import <mach/ppc/thread_status.h>
551 -#import <mach/m88k/thread_status.h>
552 -#import <mach/i860/thread_status.h>
553 -#import <mach/i386/thread_status.h>
554 -#import <mach/hppa/thread_status.h>
555 -#import <mach/sparc/thread_status.h>
556 +#include <mach/m68k/thread_status.h>
557 +#include <mach/ppc/thread_status.h>
558 +#include <mach/m88k/thread_status.h>
559 +#include <mach/i860/thread_status.h>
560 +#include <mach/i386/thread_status.h>
561 +#include <mach/hppa/thread_status.h>
562 +#include <mach/sparc/thread_status.h>
563 #include <mach-o/nlist.h>
564 #include <mach-o/reloc.h>
566 +#include <mach/kern_return.h>
568 #if defined(RLD) && !defined(SA_RLD) && !(defined(KLD) && defined(__STATIC__))
569 +typedef void NXStream;
570 #include <mach-o/rld.h>
571 -#include <streams/streams.h>
572 +//~ #include <streams/streams.h>
573 #endif /* defined(RLD) && !defined(SA_RLD) &&
574 !(defined(KLD) && defined(__STATIC__)) */
575 #include "stuff/arch.h"
578 #include "mach-o/sarld.h"
579 #include "indirect_sections.h"
581 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
582 +#define __private_extern__ __declspec(private_extern)
583 +#elif ( defined(__linux__) && !defined(__private_extern__) )
584 +#define __private_extern__ extern
587 +/** gcc on Linux defines powerpc, if we are compiling on a powerpc. */
591 __private_extern__ long RLD_DEBUG_OUTPUT_FILENAME_flag;
592 diff -rub ./ld/rld.c ./ld/rld.c
593 --- ./ld/rld.c Wed May 28 18:29:32 2003
594 +++ ./ld/rld.c Mon Aug 25 22:11:47 2003
596 #include "stuff/openstep_mach.h"
597 #include <mach-o/fat.h>
598 #include <mach-o/nlist.h>
601 #include <mach-o/kld.h>
602 -#else /* !defined(KLD) */
604 +//~ #else /* !defined(KLD) */
605 +typedef void NXStream;
606 #include <mach-o/rld.h>
607 -#include <streams/streams.h>
608 +//~ #include <streams/streams.h>
609 #include <objc/zone.h>
611 #include <mach-o/rld_state.h>
612 diff -rub ./libstuff/Makefile ./libstuff/Makefile
613 --- ./libstuff/Makefile Fri Mar 14 18:18:30 2003
614 +++ ./libstuff/Makefile Sat Sep 6 20:12:21 2003
618 ifeq "macos" "$(RC_OS)"
619 - X_CFLAGS := $(shell if [ "$(RC_RELEASE)" != "Beaker" ] && \
620 + X_CFLAGS := $(shell if [ `uname` != "Linux" ] && [ "$(RC_RELEASE)" != "Beaker" ] && \
621 [ "$(RC_RELEASE)" != "Bunsen" ] && \
622 [ "$(RC_RELEASE)" != "Gonzo" ] && \
623 [ "$(RC_RELEASE)" != "Kodiak" ]; then \
628 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
629 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
630 echo YES ; else echo NO ; \
633 ifeq "mwccppc" "$(notdir $(CC))"
634 CFLAGS = $(OFLAG) -g -gccinc -I$(SRCROOT)/../include
636 + ifeq "Linux" "$(shell uname)"
637 + CFLAGS = $(OFLAG) -g -I$(SRCROOT)/../include -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../../macosx-include
639 CFLAGS = $(OFLAG) -g -I$(SRCROOT)/../include -Wall $(X_CFLAGS)
643 ifneq "" "$(wildcard /bin/mkdirs)"
645 breakout.c writeout.c checkout.c fatal_arch.c ofile_get_word.c \
646 vm_flush_cache.c hash_string.c dylib_roots.c guess_short_name.c \
647 SymLoc.c get_arch_from_host.c crc32.c macosx_deployment_target.c \
649 + symbol_list.c fake-mach.c
650 OBJS = $(CFILES:.c=.o)
651 INSTALL_FILES = $(CFILES) Makefile notes
661 RC_CFLAGS="$(RC_CFLAGS)" \
663 OFILE_DIR=$(OBJROOT)/dynamic_obj \
670 RC_CFLAGS="$(RC_CFLAGS)" \
675 - COPTS="-dynamic -pg" \
678 RC_CFLAGS="$(RC_CFLAGS)" \
679 RC_ARCHS="$(RC_ARCHS)"; \
681 OFILE_DIR=$(OBJROOT)/profile_obj \
684 - COPTS="-dynamic -pg" \
687 RC_CFLAGS="$(RC_CFLAGS)" \
688 RC_ARCHS="$(RC_ARCHS)"; \
692 $(PRODUCT): $(OFILE_DIR) $(SYMROOT) $(OBJS)
693 - libtool -static -o $(SYMROOT)/$(PRODUCT) $(OBJS)
694 + ar r $(SYMROOT)/$(PRODUCT) $(OBJS)
695 + ranlib $(SYMROOT)/$(PRODUCT)
697 ifeq "NO" "$(USE_DEPENDENCY_FILE)"
699 diff -rub ./libstuff/SymLoc.c ./libstuff/SymLoc.c
700 --- ./libstuff/SymLoc.c Thu Oct 24 17:04:50 2002
701 +++ ./libstuff/SymLoc.c Mon Aug 25 13:17:40 2003
705 -#import <sys/types.h>
708 +#include <sys/types.h>
710 #define _POSIX_SOURCE
714 -#import "stuff/bool.h"
715 -#import "stuff/errors.h"
716 -#import "stuff/allocate.h"
717 -#import "stuff/SymLoc.h"
720 +#include "stuff/bool.h"
721 +#include "stuff/errors.h"
722 +#include "stuff/allocate.h"
723 +#include "stuff/SymLoc.h"
726 symLocForDylib(const char *installName, const char *releaseName,
727 diff -rub ./libstuff/bytesex.c ./libstuff/bytesex.c
728 --- ./libstuff/bytesex.c Mon Nov 19 12:10:07 2001
729 +++ ./libstuff/bytesex.c Mon Aug 25 13:17:40 2003
732 #include <mach-o/fat.h>
733 #include <mach-o/loader.h>
734 -#import <mach/m68k/thread_status.h>
735 -#import <mach/ppc/thread_status.h>
736 -#import <mach/m88k/thread_status.h>
737 -#import <mach/i860/thread_status.h>
738 -#import <mach/i386/thread_status.h>
739 -#import <mach/hppa/thread_status.h>
740 -#import <mach/sparc/thread_status.h>
741 +#include <mach/m68k/thread_status.h>
742 +#include <mach/ppc/thread_status.h>
743 +#include <mach/m88k/thread_status.h>
744 +#include <mach/i860/thread_status.h>
745 +#include <mach/i386/thread_status.h>
746 +#include <mach/hppa/thread_status.h>
747 +#include <mach/sparc/thread_status.h>
748 #include <mach-o/nlist.h>
749 #include <mach-o/reloc.h>
750 #include <mach-o/ranlib.h>
751 diff -rub ./libstuff/crc32.c ./libstuff/crc32.c
752 --- ./libstuff/crc32.c Wed Feb 13 17:53:36 2002
753 +++ ./libstuff/crc32.c Mon Aug 25 13:19:21 2003
756 #include <sys/types.h>
758 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
759 +#define __private_extern__ __declspec(private_extern)
760 +#elif ( defined(__linux__) && !defined(__private_extern__) )
761 +#define __private_extern__ extern
764 static const u_int32_t crctab[] = {
766 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
767 diff -rub ./libstuff/ofile.c ./libstuff/ofile.c
768 --- ./libstuff/ofile.c Wed Apr 16 16:15:01 2003
769 +++ ./libstuff/ofile.c Tue Sep 2 20:15:34 2003
772 * @APPLE_LICENSE_HEADER_END@
774 +#include "machine/endian.h"
779 #include <sys/file.h>
780 #include <mach-o/fat.h>
781 #include <mach-o/loader.h>
782 -#import <mach/m68k/thread_status.h>
783 -#import <mach/ppc/thread_status.h>
784 -#import <mach/m88k/thread_status.h>
785 -#import <mach/i860/thread_status.h>
786 -#import <mach/i386/thread_status.h>
787 -#import <mach/sparc/thread_status.h>
788 +#include <mach/m68k/thread_status.h>
789 +#include <mach/ppc/thread_status.h>
790 +#include <mach/m88k/thread_status.h>
791 +#include <mach/i860/thread_status.h>
792 +#include <mach/i386/thread_status.h>
793 +#include <mach/sparc/thread_status.h>
794 #include <mach-o/nlist.h>
795 #include <mach-o/reloc.h>
796 #include "stuff/bool.h"
798 memset(ofile, '\0', sizeof(struct ofile));
800 /* Open the file and map it in */
801 - if((fd = open(file_name, O_RDONLY)) == -1){
802 + if((fd = open(file_name, O_RDWR)) == -1){
804 return(NSObjectFileImageAccess);
810 - /* see if this file is Mach-O file */
812 else if(size >= sizeof(struct mach_header) &&
813 (magic == MH_MAGIC || magic == SWAP_LONG(MH_MAGIC))){
814 ofile->file_type = OFILE_Mach_O;
815 diff -rub ./libstuff/print.c ./libstuff/print.c
816 --- ./libstuff/print.c Thu May 6 19:30:58 1999
817 +++ ./libstuff/print.c Mon Aug 25 13:17:40 2003
820 * @APPLE_LICENSE_HEADER_END@
823 -#import "stuff/print.h"
825 +#include "stuff/print.h"
828 * All printing of all messages for ofile functions goes through this function.
829 diff -rub ./libstuff/swap_headers.c ./libstuff/swap_headers.c
830 --- ./libstuff/swap_headers.c Fri Oct 4 17:54:48 2002
831 +++ ./libstuff/swap_headers.c Mon Aug 25 13:17:40 2003
833 * @APPLE_LICENSE_HEADER_END@
835 #include <mach-o/loader.h>
836 -#import <mach/m68k/thread_status.h>
837 -#import <mach/ppc/thread_status.h>
838 -#import <mach/m88k/thread_status.h>
839 -#import <mach/i860/thread_status.h>
840 -#import <mach/i386/thread_status.h>
841 -#import <mach/hppa/thread_status.h>
842 -#import <mach/sparc/thread_status.h>
843 +#include <mach/m68k/thread_status.h>
844 +#include <mach/ppc/thread_status.h>
845 +#include <mach/m88k/thread_status.h>
846 +#include <mach/i860/thread_status.h>
847 +#include <mach/i386/thread_status.h>
848 +#include <mach/hppa/thread_status.h>
849 +#include <mach/sparc/thread_status.h>
850 #include "stuff/bool.h"
851 #include "stuff/bytesex.h"
852 #include "stuff/errors.h"
853 diff -rub ./misc/Makefile ./misc/Makefile
854 --- ./misc/Makefile Fri Mar 14 18:18:30 2003
855 +++ ./misc/Makefile Sat Sep 6 20:17:36 2003
859 ifeq "macos" "$(RC_OS)"
860 - X_CFLAGS := $(shell if [ "$(RC_RELEASE)" != "Beaker" ] && \
861 + X_CFLAGS := $(shell if [ `uname` != "Linux" ] && [ "$(RC_RELEASE)" != "Beaker" ] && \
862 [ "$(RC_RELEASE)" != "Bunsen" ] && \
863 [ "$(RC_RELEASE)" != "Gonzo" ] && \
864 [ "$(RC_RELEASE)" != "Kodiak" ]; then \
865 - echo -Wno-long-double -no-cpp-precomp; \
866 + echo -Wno-long-double -no-cpp-precomp ; \
871 CFLAGS = $(OFLAG) -g \
872 -I$(SRCROOT) -I$(SRCROOT)/../include -I$(OFILE_DIR)
874 + ifeq "Linux" "$(shell uname)"
875 + CFLAGS = $(OFLAG) -g -Wall $(X_CFLAGS) \
876 + -I$(SRCROOT) -I$(SRCROOT)/../include -I$(OFILE_DIR) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../macosx-include
878 CFLAGS = $(OFLAG) -g -Wall $(X_CFLAGS) \
879 -I$(SRCROOT) -I$(SRCROOT)/../include -I$(OFILE_DIR)
883 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
884 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
885 echo YES ; else echo NO ; \
889 LOCLIBDIR = /usr/local/lib
892 -CFILES2 = main.c lipo.c size.c strings.c nm.c checksyms.c inout.c \
893 - indr.c strip.c atom.c segedit.c kern_tool.c cmpdylib.c \
894 - dylib_pcsampler.c pagestuff.c redo_prebinding.c seg_addr_table.c \
895 - check_dylib.c seg_hack.c check_hints.c install_name_tool.c
896 +CFILES2 = seg_hack.c strip.c
897 ifeq "nextstep" "$(RC_OS)"
898 CFILES3 = file.c ar.c
904 -PROGS = lipo.NEW size.NEW strings.NEW nm.NEW \
905 - libtool.NEW checksyms.NEW indr.NEW strip.NEW nmedit.NEW \
906 - segedit.NEW kern_tool.NEW cmpdylib.NEW \
907 - dylib_pcsampler.NEW pagestuff.NEW redo_prebinding.NEW \
908 - seg_addr_table.NEW check_dylib.NEW seg_hack.NEW install_name_tool.NEW
909 +PROGS = seg_hack.NEW strip.NEW
911 teflon_all macos_all: $(PROGS)
914 lib_ofiles: $(OFILE_DIR) $(SYMROOT) libredo_prebinding.a
917 - vers_string -c $(VERS_STRING_FLAGS) cctools_misc > $(OFILE_DIR)/$@
918 + ./vers_string -c $(VERS_STRING_FLAGS) cctools_misc > $(OFILE_DIR)/$@
920 ifeq "NO" "$(USE_DEPENDENCY_FILE)"
923 $(OFILE_DIR)/seg_hack.o $(OFILE_DIR)/vers.o $(LIBSTUFF)
924 $(CC) $(CFLAGS) $(RC_CFLAGS) -o $(SYMROOT)/seg_hack.NEW \
925 $(OFILE_DIR)/seg_hack.private.o
926 + cp $(SYMROOT)/seg_hack.NEW $(SYMROOT)/seg_hack
928 install_name_tool.NEW: install_name_tool.o vers.o
929 $(CC) $(CFLAGS) $(RC_CFLAGS) -nostdlib -r \
931 $(SYMROOT)/redo_prebinding.NEW \
932 $(SYMROOT)/libredo_prebinding.a \
933 $(SYMROOT)/kern_tool.NEW \
934 - $(SYMROOT)/cmpdylib.NEW
935 + $(SYMROOT)/cmpdylib.NEW \
936 + $(SYMROOT)/seg_hack