1 diff -rub ./include/architecture/i386/frame.h ./include/architecture/i386/frame.h
2 --- ./include/architecture/i386/frame.h Thu May 6 19:24:33 1999
3 +++ ./include/architecture/i386/frame.h Mon Aug 25 12:56:22 2003
8 -#import <architecture/i386/sel.h>
9 +#include <architecture/i386/sel.h>
12 * The actual hardware exception frame
13 diff -rub ./include/architecture/m88k/fp_regs.h ./include/architecture/m88k/fp_regs.h
14 --- ./include/architecture/m88k/fp_regs.h Wed Oct 9 18:47:37 2002
15 +++ ./include/architecture/m88k/fp_regs.h Mon Aug 25 12:56:22 2003
17 #ifndef _ARCH_M88K_FP_REGS_H_
18 #define _ARCH_M88K_FP_REGS_H_
20 -#import <architecture/m88k/reg_help.h>
21 +#include <architecture/m88k/reg_help.h>
24 * m88k_xrf_t -- data types that MAY be in extended register file
25 diff -rub ./include/architecture/m88k/reg_help.h ./include/architecture/m88k/reg_help.h
26 --- ./include/architecture/m88k/reg_help.h Wed Oct 9 18:47:39 2002
27 +++ ./include/architecture/m88k/reg_help.h Mon Aug 25 12:56:22 2003
29 #ifndef _ARCH_M88K_REG_HELP_H_
30 #define _ARCH_M88K_REG_HELP_H_
32 -#import <architecture/nrw/reg_help.h>
33 +#include <architecture/nrw/reg_help.h>
35 /* Stack pointer must always be a multiple of 16 */
37 diff -rub ./include/mach/m88k/thread_status.h ./include/mach/m88k/thread_status.h
38 --- ./include/mach/m88k/thread_status.h Wed Oct 9 18:48:16 2002
39 +++ ./include/mach/m88k/thread_status.h Mon Aug 25 12:56:22 2003
41 #ifndef _MACH_M88K_THREAD_STATE_
42 #define _MACH_M88K_THREAD_STATE_
44 -#import <architecture/m88k/fp_regs.h>
45 -#import <architecture/m88k/reg_help.h>
46 +#include <architecture/m88k/fp_regs.h>
47 +#include <architecture/m88k/reg_help.h>
49 /**************************************************************************
50 * Data Typedefs used by thread_getstatus() and thread_setstatus() *
51 diff -rub ./include/mach/machine.h ./include/mach/machine.h
52 --- ./include/mach/machine.h Mon Feb 10 19:52:25 2003
53 +++ ./include/mach/machine.h Mon Aug 25 12:56:22 2003
55 #ifndef _MACH_MACHINE_H_
56 #define _MACH_MACHINE_H_
58 -#import <mach/machine/vm_types.h>
59 -#import <mach/boolean.h>
60 +#include <mach/machine/vm_types.h>
61 +#include <mach/boolean.h>
64 * For each host, there is a maximum possible number of
65 diff -rub ./include/mach-o/hppa/swap.h ./include/mach-o/hppa/swap.h
66 --- ./include/mach-o/hppa/swap.h Thu May 6 19:25:11 1999
67 +++ ./include/mach-o/hppa/swap.h Mon Aug 25 12:56:22 2003
70 * @APPLE_LICENSE_HEADER_END@
72 -#import <architecture/byte_order.h>
73 -#import <mach/hppa/thread_status.h>
74 +#include <architecture/byte_order.h>
75 +#include <mach/hppa/thread_status.h>
77 extern void swap_hppa_integer_thread_state(
78 struct hp_pa_integer_thread_state *regs,
79 diff -rub ./include/mach-o/i860/swap.h ./include/mach-o/i860/swap.h
80 --- ./include/mach-o/i860/swap.h Thu May 6 19:25:19 1999
81 +++ ./include/mach-o/i860/swap.h Mon Aug 25 12:56:22 2003
84 * @APPLE_LICENSE_HEADER_END@
86 -#import <architecture/byte_order.h>
87 -#import <mach/i860/thread_status.h>
88 +#include <architecture/byte_order.h>
89 +#include <mach/i860/thread_status.h>
91 extern void swap_i860_thread_state_regs(
92 struct i860_thread_state_regs *cpu,
93 diff -rub ./include/mach-o/m68k/swap.h ./include/mach-o/m68k/swap.h
94 --- ./include/mach-o/m68k/swap.h Thu May 6 19:25:26 1999
95 +++ ./include/mach-o/m68k/swap.h Mon Aug 25 12:56:22 2003
98 * @APPLE_LICENSE_HEADER_END@
100 -#import <architecture/byte_order.h>
101 -#import <mach/m68k/thread_status.h>
102 +#include <architecture/byte_order.h>
103 +#include <mach/m68k/thread_status.h>
105 extern void swap_m68k_thread_state_regs(
106 struct m68k_thread_state_regs *cpu,
107 diff -rub ./include/mach-o/m88k/swap.h ./include/mach-o/m88k/swap.h
108 --- ./include/mach-o/m88k/swap.h Thu May 6 19:25:31 1999
109 +++ ./include/mach-o/m88k/swap.h Mon Aug 25 12:56:22 2003
112 * @APPLE_LICENSE_HEADER_END@
114 -#import <architecture/byte_order.h>
115 -#import <mach/m88k/thread_status.h>
116 +#include <architecture/byte_order.h>
117 +#include <mach/m88k/thread_status.h>
119 extern void swap_m88k_thread_state_grf_t(
120 m88k_thread_state_grf_t *cpu,
121 diff -rub ./include/mach-o/rld.h ./include/mach-o/rld.h
122 --- ./include/mach-o/rld.h Tue Oct 2 15:19:03 2001
123 +++ ./include/mach-o/rld.h Mon Aug 25 12:56:22 2003
125 #ifndef _MACHO_RLD_H_
126 #define _MACHO_RLD_H_
128 -#include <streams/streams.h>
129 +//~ #include <streams/streams.h>
130 #include <mach-o/loader.h>
132 extern long rld_load(
133 diff -rub ./include/mach-o/sparc/swap.h ./include/mach-o/sparc/swap.h
134 --- ./include/mach-o/sparc/swap.h Thu May 6 19:25:56 1999
135 +++ ./include/mach-o/sparc/swap.h Mon Aug 25 12:56:22 2003
138 * @APPLE_LICENSE_HEADER_END@
140 -#import <architecture/byte_order.h>
141 -#import <mach/sparc/thread_status.h>
142 +#include <architecture/byte_order.h>
143 +#include <mach/sparc/thread_status.h>
145 void swap_sparc_thread_state_regs(
146 struct sparc_thread_state_regs *cpu,
147 diff -rub ./include/standalone/libsa.h ./include/standalone/libsa.h
148 --- ./include/standalone/libsa.h Mon Sep 11 15:03:00 2000
149 +++ ./include/standalone/libsa.h Mon Aug 25 12:56:22 2003
152 /* Exported API for standalone library */
153 #if !(defined(KLD) && defined(__STATIC__))
154 -#import <mach/mach.h>
155 +#include <mach/mach.h>
156 #else /* defined(KLD) && defined(__STATIC__) */
157 #include <mach/kern_return.h>
158 #endif /* !(defined(KLD) && defined(__STATIC__)) */
159 -#import <mach-o/loader.h>
162 +#include <mach-o/loader.h>
168 diff -rub ./include/stuff/allocate.h ./include/stuff/allocate.h
169 --- ./include/stuff/allocate.h Thu May 6 19:26:24 1999
170 +++ ./include/stuff/allocate.h Mon Aug 25 13:08:44 2003
173 * @APPLE_LICENSE_HEADER_END@
175 -#if defined(__MWERKS__) && !defined(__private_extern__)
176 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
177 #define __private_extern__ __declspec(private_extern)
178 +#elif ( defined(__linux__) && !defined(__private_extern__) )
179 +#define __private_extern__ extern
182 /* defined in allocate.c */
183 diff -rub ./include/stuff/arch.h ./include/stuff/arch.h
184 --- ./include/stuff/arch.h Mon Nov 19 12:09:40 2001
185 +++ ./include/stuff/arch.h Mon Aug 25 13:10:15 2003
187 #ifndef _STUFF_ARCH_H_
188 #define _STUFF_ARCH_H_
190 -#if defined(__MWERKS__) && !defined(__private_extern__)
191 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
192 #define __private_extern__ __declspec(private_extern)
193 +#elif ( defined(__linux__) && !defined(__private_extern__) )
194 +#define __private_extern__ extern
197 * This file contains the current known set of flags and constants for the
198 * known architectures.
200 -#import <mach/machine.h>
201 -#import <stuff/bytesex.h>
202 +#include <mach/machine.h>
203 +#include <stuff/bytesex.h>
206 * The structure describing an architecture flag with the string of the flag
207 diff -rub ./include/stuff/best_arch.h ./include/stuff/best_arch.h
208 --- ./include/stuff/best_arch.h Thu May 6 19:26:29 1999
209 +++ ./include/stuff/best_arch.h Mon Aug 25 13:10:13 2003
212 * @APPLE_LICENSE_HEADER_END@
214 -#if defined(__MWERKS__) && !defined(__private_extern__)
215 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
216 #define __private_extern__ __declspec(private_extern)
217 +#elif ( defined(__linux__) && !defined(__private_extern__) )
218 +#define __private_extern__ extern
221 #include <mach/machine.h>
222 diff -rub ./include/stuff/breakout.h ./include/stuff/breakout.h
223 --- ./include/stuff/breakout.h Mon May 6 14:03:46 2002
224 +++ ./include/stuff/breakout.h Mon Aug 25 13:10:12 2003
227 * @APPLE_LICENSE_HEADER_END@
229 -#if defined(__MWERKS__) && !defined(__private_extern__)
230 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
231 #define __private_extern__ __declspec(private_extern)
232 +#elif ( defined(__linux__) && !defined(__private_extern__) )
233 +#define __private_extern__ extern
236 -#import "stuff/ofile.h"
237 +#include "stuff/ofile.h"
240 * The input files are broken out in to their object files and then placed in
241 diff -rub ./include/stuff/bytesex.h ./include/stuff/bytesex.h
242 --- ./include/stuff/bytesex.h Mon Nov 19 12:09:42 2001
243 +++ ./include/stuff/bytesex.h Mon Aug 25 13:10:10 2003
245 #ifndef _STUFF_BYTESEX_H_
246 #define _STUFF_BYTESEX_H_
248 -#if defined(__MWERKS__) && !defined(__private_extern__)
249 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
250 #define __private_extern__ __declspec(private_extern)
251 +#elif ( defined(__linux__) && !defined(__private_extern__) )
252 +#define __private_extern__ extern
255 -#import <mach-o/fat.h>
256 -#import <mach-o/loader.h>
257 -#import <mach/m68k/thread_status.h>
258 -#import <mach/ppc/thread_status.h>
259 -#import <mach/m88k/thread_status.h>
260 -#import <mach/i860/thread_status.h>
261 -#import <mach/i386/thread_status.h>
262 -#import <mach/hppa/thread_status.h>
263 -#import <mach/sparc/thread_status.h>
264 -#import <mach-o/nlist.h>
265 -#import <mach-o/reloc.h>
266 -#import <mach-o/ranlib.h>
267 -#import "stuff/bool.h"
268 +#include <mach-o/fat.h>
269 +#include <mach-o/loader.h>
270 +#include <mach/m68k/thread_status.h>
271 +#include <mach/ppc/thread_status.h>
272 +#include <mach/m88k/thread_status.h>
273 +#include <mach/i860/thread_status.h>
274 +#include <mach/i386/thread_status.h>
275 +#include <mach/hppa/thread_status.h>
276 +#include <mach/sparc/thread_status.h>
277 +#include <mach-o/nlist.h>
278 +#include <mach-o/reloc.h>
279 +#include <mach-o/ranlib.h>
280 +#include "stuff/bool.h"
284 diff -rub ./include/stuff/errors.h ./include/stuff/errors.h
285 --- ./include/stuff/errors.h Thu May 6 19:26:40 1999
286 +++ ./include/stuff/errors.h Mon Aug 25 13:09:00 2003
289 * @APPLE_LICENSE_HEADER_END@
291 -#if defined(__MWERKS__) && !defined(__private_extern__)
292 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
293 #define __private_extern__ __declspec(private_extern)
294 +#elif ( defined(__linux__) && !defined(__private_extern__) )
295 +#define __private_extern__ extern
298 -#import "mach/mach.h"
299 +#include "mach/mach.h"
301 /* user defined (imported) */
302 __private_extern__ char *progname;
303 diff -rub ./include/stuff/execute.h ./include/stuff/execute.h
304 --- ./include/stuff/execute.h Thu May 6 19:26:42 1999
305 +++ ./include/stuff/execute.h Mon Aug 25 13:10:04 2003
308 * @APPLE_LICENSE_HEADER_END@
310 -#if defined(__MWERKS__) && !defined(__private_extern__)
311 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
312 #define __private_extern__ __declspec(private_extern)
313 +#elif ( defined(__linux__) && !defined(__private_extern__) )
314 +#define __private_extern__ extern
318 diff -rub ./include/stuff/hash_string.h ./include/stuff/hash_string.h
319 --- ./include/stuff/hash_string.h Thu May 6 19:26:45 1999
320 +++ ./include/stuff/hash_string.h Mon Aug 25 13:10:32 2003
323 * @APPLE_LICENSE_HEADER_END@
325 -#if defined(__MWERKS__) && !defined(__private_extern__)
326 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
327 #define __private_extern__ __declspec(private_extern)
328 +#elif ( defined(__linux__) && !defined(__private_extern__) )
329 +#define __private_extern__ extern
332 __private_extern__ long hash_string(
333 diff -rub ./include/stuff/hppa.h ./include/stuff/hppa.h
334 --- ./include/stuff/hppa.h Thu May 6 19:26:47 1999
335 +++ ./include/stuff/hppa.h Mon Aug 25 13:10:40 2003
338 * @APPLE_LICENSE_HEADER_END@
340 -#if defined(__MWERKS__) && !defined(__private_extern__)
341 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
342 #define __private_extern__ __declspec(private_extern)
343 +#elif ( defined(__linux__) && !defined(__private_extern__) )
344 +#define __private_extern__ extern
347 __private_extern__ void calc_hppa_HILO(
348 diff -rub ./include/stuff/ofile.h ./include/stuff/ofile.h
349 --- ./include/stuff/ofile.h Mon Feb 10 19:52:33 2003
350 +++ ./include/stuff/ofile.h Mon Aug 25 13:10:51 2003
352 #ifndef _STUFF_OFILE_H_
353 #define _STUFF_OFILE_H_
355 -#if defined(__MWERKS__) && !defined(__private_extern__)
356 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
357 #define __private_extern__ __declspec(private_extern)
358 +#elif ( defined(__linux__) && !defined(__private_extern__) )
359 +#define __private_extern__ extern
365 #define AR_EFMT1 "#1/" /* extended format #1 */
367 -#import <mach-o/loader.h>
368 +#include <mach-o/loader.h>
370 -#import <mach-o/dyld.h>
371 +#include <mach-o/dyld.h>
373 -#import "stuff/bytesex.h"
374 -#import "stuff/bool.h"
375 -#import "stuff/arch.h"
376 +#include "stuff/bytesex.h"
377 +#include "stuff/bool.h"
378 +#include "stuff/arch.h"
382 diff -rub ./include/stuff/print.h ./include/stuff/print.h
383 --- ./include/stuff/print.h Thu May 6 19:26:55 1999
384 +++ ./include/stuff/print.h Mon Aug 25 13:10:58 2003
387 * @APPLE_LICENSE_HEADER_END@
389 -#if defined(__MWERKS__) && !defined(__private_extern__)
390 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
391 #define __private_extern__ __declspec(private_extern)
392 +#elif ( defined(__linux__) && !defined(__private_extern__) )
393 +#define __private_extern__ extern
399 __private_extern__ void print(
400 const char *format, ...)
401 diff -rub ./include/stuff/reloc.h ./include/stuff/reloc.h
402 --- ./include/stuff/reloc.h Thu May 6 19:26:57 1999
403 +++ ./include/stuff/reloc.h Mon Aug 25 13:11:02 2003
406 * @APPLE_LICENSE_HEADER_END@
408 -#if defined(__MWERKS__) && !defined(__private_extern__)
409 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
410 #define __private_extern__ __declspec(private_extern)
411 +#elif ( defined(__linux__) && !defined(__private_extern__) )
412 +#define __private_extern__ extern
415 -#import <mach/machine.h>
416 -#import "stuff/bool.h"
417 +#include <mach/machine.h>
418 +#include "stuff/bool.h"
420 __private_extern__ unsigned long reloc_pair_r_type(
422 diff -rub ./include/stuff/round.h ./include/stuff/round.h
423 --- ./include/stuff/round.h Fri Mar 14 18:18:29 2003
424 +++ ./include/stuff/round.h Mon Aug 25 13:11:06 2003
427 * @APPLE_LICENSE_HEADER_END@
429 -#if defined(__MWERKS__) && !defined(__private_extern__)
430 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
431 #define __private_extern__ __declspec(private_extern)
432 +#elif ( defined(__linux__) && !defined(__private_extern__) )
433 +#define __private_extern__ extern
437 diff -rub ./include/stuff/symbol_list.h ./include/stuff/symbol_list.h
438 --- ./include/stuff/symbol_list.h Thu Oct 24 17:04:30 2002
439 +++ ./include/stuff/symbol_list.h Mon Aug 25 13:19:46 2003
441 #include <mach-o/nlist.h>
442 #include <stuff/bool.h>
444 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
445 +#define __private_extern__ __declspec(private_extern)
446 +#elif ( defined(__linux__) && !defined(__private_extern__) )
447 +#define __private_extern__ extern
451 * Data structures to perform selective stripping of symbol table entries.
453 diff -rub ./include/stuff/vm_flush_cache.h ./include/stuff/vm_flush_cache.h
454 --- ./include/stuff/vm_flush_cache.h Thu May 6 19:27:05 1999
455 +++ ./include/stuff/vm_flush_cache.h Mon Aug 25 13:11:15 2003
458 * @APPLE_LICENSE_HEADER_END@
460 -#if defined(__MWERKS__) && !defined(__private_extern__)
461 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
462 #define __private_extern__ __declspec(private_extern)
463 +#elif ( defined(__linux__) && !defined(__private_extern__) )
464 +#define __private_extern__ extern
467 -#import <mach/mach.h>
468 +#include <mach/mach.h>
469 __private_extern__ kern_return_t vm_flush_cache(
470 mach_port_t target_task,
471 vm_address_t address,
472 diff -rub ./ld/Makefile ./ld/Makefile
473 --- ./ld/Makefile Fri Mar 14 18:18:29 2003
474 +++ ./ld/Makefile Sat Sep 6 20:17:46 2003
476 -DKERNEL -DKERNEL_PRIVATE -DAPPLE -DNeXT -DLIBSA_PRIVATE
479 -MIG = $(NEXT_ROOT)/usr/bin/mig
482 ifeq "macos" "$(RC_OS)"
483 - X_CFLAGS := $(shell if [ "$(RC_RELEASE)" != "Beaker" ] && \
484 + X_CFLAGS := $(shell if [ `uname` != "Linux" ] && [ "$(RC_RELEASE)" != "Beaker" ] && \
485 [ "$(RC_RELEASE)" != "Bunsen" ] && \
486 [ "$(RC_RELEASE)" != "Gonzo" ] && \
487 [ "$(RC_RELEASE)" != "Kodiak" ]; then \
491 ifneq "mwccppc" "$(notdir $(CC))"
492 + ifeq "Linux" "$(shell uname)"
493 + GCC_FLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../../macosx-include
495 GCC_FLAGS = -Wall $(X_CFLAGS)
499 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
500 +# Hack: Add ../misc to the path because it contains seg_hack and ver_string
501 +ifneq ($(findstring ../misc,$(PATH)),../misc)
502 + PATH:=../misc:../../misc:$(PATH)
505 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
506 echo YES ; else echo NO ; \
510 fvmlibs.c layout.c specs.c pass2.c generic_reloc.c rld.c sets.c \
511 4byte_literals.c 8byte_literals.c literal_pointers.c dylibs.c \
512 indirect_sections.c mod_sections.c i860_reloc.c ppc_reloc.c \
513 - m88k_reloc.c hppa_reloc.c sparc_reloc.c coalesced_sections.c
514 + m88k_reloc.c hppa_reloc.c sparc_reloc.c coalesced_sections.c fake-mach.c
515 OBJS = $(CFILES:.c=.o)
516 INSTALL_FILES = $(CFILES) $(HFILES) Makefile notes \
517 make.defs make_defs.h librld.ofileList
519 makeUser.c ld.c: make.h
521 make.h makeUser.c: make.defs
522 - $(MIG) $(MIG_FLAGS) $(SRCROOT)/make.defs
524 + #~ $(MIG) $(MIG_FLAGS) $(SRCROOT)/make.defs
525 + #~ rm -f makeServer.c
526 + cp $(SRCROOT)/makeUser.c .
529 ifeq "mwccppc" "$(notdir $(CC))"
530 diff -rub ./ld/layout.c ./ld/layout.c
531 --- ./ld/layout.c Wed May 28 18:29:27 2003
532 +++ ./ld/layout.c Mon Aug 25 23:22:05 2003
534 #include "stuff/openstep_mach.h"
535 #include <mach-o/fat.h>
536 #include <mach-o/loader.h>
537 -#import <mach/m68k/thread_status.h>
538 -#import <mach/ppc/thread_status.h>
539 -#import <mach/m88k/thread_status.h>
540 -#import <mach/i860/thread_status.h>
541 -#import <mach/i386/thread_status.h>
542 -#import <mach/hppa/thread_status.h>
543 -#import <mach/sparc/thread_status.h>
544 +#include <mach/m68k/thread_status.h>
545 +#include <mach/ppc/thread_status.h>
546 +#include <mach/m88k/thread_status.h>
547 +#include <mach/i860/thread_status.h>
548 +#include <mach/i386/thread_status.h>
549 +#include <mach/hppa/thread_status.h>
550 +#include <mach/sparc/thread_status.h>
551 #include <mach-o/nlist.h>
552 #include <mach-o/reloc.h>
554 +#include <mach/kern_return.h>
556 #if defined(RLD) && !defined(SA_RLD) && !(defined(KLD) && defined(__STATIC__))
557 +typedef void NXStream;
558 #include <mach-o/rld.h>
559 -#include <streams/streams.h>
560 +//~ #include <streams/streams.h>
561 #endif /* defined(RLD) && !defined(SA_RLD) &&
562 !(defined(KLD) && defined(__STATIC__)) */
563 #include "stuff/arch.h"
566 #include "mach-o/sarld.h"
567 #include "indirect_sections.h"
569 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
570 +#define __private_extern__ __declspec(private_extern)
571 +#elif ( defined(__linux__) && !defined(__private_extern__) )
572 +#define __private_extern__ extern
575 +/** gcc on Linux defines powerpc, if we are compiling on a powerpc. */
579 __private_extern__ long RLD_DEBUG_OUTPUT_FILENAME_flag;
580 diff -rub ./ld/rld.c ./ld/rld.c
581 --- ./ld/rld.c Wed May 28 18:29:32 2003
582 +++ ./ld/rld.c Mon Aug 25 22:11:47 2003
584 #include "stuff/openstep_mach.h"
585 #include <mach-o/fat.h>
586 #include <mach-o/nlist.h>
589 #include <mach-o/kld.h>
590 -#else /* !defined(KLD) */
592 +//~ #else /* !defined(KLD) */
593 +typedef void NXStream;
594 #include <mach-o/rld.h>
595 -#include <streams/streams.h>
596 +//~ #include <streams/streams.h>
597 #include <objc/zone.h>
599 #include <mach-o/rld_state.h>
600 diff -rub ./libstuff/Makefile ./libstuff/Makefile
601 --- ./libstuff/Makefile Fri Mar 14 18:18:30 2003
602 +++ ./libstuff/Makefile Sat Sep 6 20:12:21 2003
606 ifeq "macos" "$(RC_OS)"
607 - X_CFLAGS := $(shell if [ "$(RC_RELEASE)" != "Beaker" ] && \
608 + X_CFLAGS := $(shell if [ `uname` != "Linux" ] && [ "$(RC_RELEASE)" != "Beaker" ] && \
609 [ "$(RC_RELEASE)" != "Bunsen" ] && \
610 [ "$(RC_RELEASE)" != "Gonzo" ] && \
611 [ "$(RC_RELEASE)" != "Kodiak" ]; then \
616 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
617 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
618 echo YES ; else echo NO ; \
621 ifeq "mwccppc" "$(notdir $(CC))"
622 CFLAGS = $(OFLAG) -g -gccinc -I$(SRCROOT)/../include
624 + ifeq "Linux" "$(shell uname)"
625 + CFLAGS = $(OFLAG) -g -I$(SRCROOT)/../include -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../../macosx-include
627 CFLAGS = $(OFLAG) -g -I$(SRCROOT)/../include -Wall $(X_CFLAGS)
631 ifneq "" "$(wildcard /bin/mkdirs)"
633 breakout.c writeout.c checkout.c fatal_arch.c ofile_get_word.c \
634 vm_flush_cache.c hash_string.c dylib_roots.c guess_short_name.c \
635 SymLoc.c get_arch_from_host.c crc32.c macosx_deployment_target.c \
637 + symbol_list.c fake-mach.c
638 OBJS = $(CFILES:.c=.o)
639 INSTALL_FILES = $(CFILES) Makefile notes
649 RC_CFLAGS="$(RC_CFLAGS)" \
651 OFILE_DIR=$(OBJROOT)/dynamic_obj \
658 RC_CFLAGS="$(RC_CFLAGS)" \
663 - COPTS="-dynamic -pg" \
666 RC_CFLAGS="$(RC_CFLAGS)" \
667 RC_ARCHS="$(RC_ARCHS)"; \
669 OFILE_DIR=$(OBJROOT)/profile_obj \
672 - COPTS="-dynamic -pg" \
675 RC_CFLAGS="$(RC_CFLAGS)" \
676 RC_ARCHS="$(RC_ARCHS)"; \
680 $(PRODUCT): $(OFILE_DIR) $(SYMROOT) $(OBJS)
681 - libtool -static -o $(SYMROOT)/$(PRODUCT) $(OBJS)
682 + ar r $(SYMROOT)/$(PRODUCT) $(OBJS)
683 + ranlib $(SYMROOT)/$(PRODUCT)
685 ifeq "NO" "$(USE_DEPENDENCY_FILE)"
687 diff -rub ./libstuff/SymLoc.c ./libstuff/SymLoc.c
688 --- ./libstuff/SymLoc.c Thu Oct 24 17:04:50 2002
689 +++ ./libstuff/SymLoc.c Mon Aug 25 13:17:40 2003
693 -#import <sys/types.h>
696 +#include <sys/types.h>
698 #define _POSIX_SOURCE
702 -#import "stuff/bool.h"
703 -#import "stuff/errors.h"
704 -#import "stuff/allocate.h"
705 -#import "stuff/SymLoc.h"
708 +#include "stuff/bool.h"
709 +#include "stuff/errors.h"
710 +#include "stuff/allocate.h"
711 +#include "stuff/SymLoc.h"
714 symLocForDylib(const char *installName, const char *releaseName,
715 diff -rub ./libstuff/bytesex.c ./libstuff/bytesex.c
716 --- ./libstuff/bytesex.c Mon Nov 19 12:10:07 2001
717 +++ ./libstuff/bytesex.c Mon Aug 25 13:17:40 2003
720 #include <mach-o/fat.h>
721 #include <mach-o/loader.h>
722 -#import <mach/m68k/thread_status.h>
723 -#import <mach/ppc/thread_status.h>
724 -#import <mach/m88k/thread_status.h>
725 -#import <mach/i860/thread_status.h>
726 -#import <mach/i386/thread_status.h>
727 -#import <mach/hppa/thread_status.h>
728 -#import <mach/sparc/thread_status.h>
729 +#include <mach/m68k/thread_status.h>
730 +#include <mach/ppc/thread_status.h>
731 +#include <mach/m88k/thread_status.h>
732 +#include <mach/i860/thread_status.h>
733 +#include <mach/i386/thread_status.h>
734 +#include <mach/hppa/thread_status.h>
735 +#include <mach/sparc/thread_status.h>
736 #include <mach-o/nlist.h>
737 #include <mach-o/reloc.h>
738 #include <mach-o/ranlib.h>
739 diff -rub ./libstuff/crc32.c ./libstuff/crc32.c
740 --- ./libstuff/crc32.c Wed Feb 13 17:53:36 2002
741 +++ ./libstuff/crc32.c Mon Aug 25 13:19:21 2003
744 #include <sys/types.h>
746 +#if ( defined(__MWERKS__) && !defined(__private_extern__) )
747 +#define __private_extern__ __declspec(private_extern)
748 +#elif ( defined(__linux__) && !defined(__private_extern__) )
749 +#define __private_extern__ extern
752 static const u_int32_t crctab[] = {
754 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
755 diff -rub ./libstuff/ofile.c ./libstuff/ofile.c
756 --- ./libstuff/ofile.c Wed Apr 16 16:15:01 2003
757 +++ ./libstuff/ofile.c Tue Sep 2 20:15:34 2003
760 * @APPLE_LICENSE_HEADER_END@
762 +#include "machine/endian.h"
767 #include <sys/file.h>
768 #include <mach-o/fat.h>
769 #include <mach-o/loader.h>
770 -#import <mach/m68k/thread_status.h>
771 -#import <mach/ppc/thread_status.h>
772 -#import <mach/m88k/thread_status.h>
773 -#import <mach/i860/thread_status.h>
774 -#import <mach/i386/thread_status.h>
775 -#import <mach/sparc/thread_status.h>
776 +#include <mach/m68k/thread_status.h>
777 +#include <mach/ppc/thread_status.h>
778 +#include <mach/m88k/thread_status.h>
779 +#include <mach/i860/thread_status.h>
780 +#include <mach/i386/thread_status.h>
781 +#include <mach/sparc/thread_status.h>
782 #include <mach-o/nlist.h>
783 #include <mach-o/reloc.h>
784 #include "stuff/bool.h"
786 memset(ofile, '\0', sizeof(struct ofile));
788 /* Open the file and map it in */
789 - if((fd = open(file_name, O_RDONLY)) == -1){
790 + if((fd = open(file_name, O_RDWR)) == -1){
792 return(NSObjectFileImageAccess);
798 - /* see if this file is Mach-O file */
800 else if(size >= sizeof(struct mach_header) &&
801 (magic == MH_MAGIC || magic == SWAP_LONG(MH_MAGIC))){
802 ofile->file_type = OFILE_Mach_O;
803 diff -rub ./libstuff/print.c ./libstuff/print.c
804 --- ./libstuff/print.c Thu May 6 19:30:58 1999
805 +++ ./libstuff/print.c Mon Aug 25 13:17:40 2003
808 * @APPLE_LICENSE_HEADER_END@
811 -#import "stuff/print.h"
813 +#include "stuff/print.h"
816 * All printing of all messages for ofile functions goes through this function.
817 diff -rub ./libstuff/swap_headers.c ./libstuff/swap_headers.c
818 --- ./libstuff/swap_headers.c Fri Oct 4 17:54:48 2002
819 +++ ./libstuff/swap_headers.c Mon Aug 25 13:17:40 2003
821 * @APPLE_LICENSE_HEADER_END@
823 #include <mach-o/loader.h>
824 -#import <mach/m68k/thread_status.h>
825 -#import <mach/ppc/thread_status.h>
826 -#import <mach/m88k/thread_status.h>
827 -#import <mach/i860/thread_status.h>
828 -#import <mach/i386/thread_status.h>
829 -#import <mach/hppa/thread_status.h>
830 -#import <mach/sparc/thread_status.h>
831 +#include <mach/m68k/thread_status.h>
832 +#include <mach/ppc/thread_status.h>
833 +#include <mach/m88k/thread_status.h>
834 +#include <mach/i860/thread_status.h>
835 +#include <mach/i386/thread_status.h>
836 +#include <mach/hppa/thread_status.h>
837 +#include <mach/sparc/thread_status.h>
838 #include "stuff/bool.h"
839 #include "stuff/bytesex.h"
840 #include "stuff/errors.h"
841 diff -rub ./misc/Makefile ./misc/Makefile
842 --- ./misc/Makefile Fri Mar 14 18:18:30 2003
843 +++ ./misc/Makefile Sat Sep 6 20:17:36 2003
847 ifeq "macos" "$(RC_OS)"
848 - X_CFLAGS := $(shell if [ "$(RC_RELEASE)" != "Beaker" ] && \
849 + X_CFLAGS := $(shell if [ `uname` != "Linux" ] && [ "$(RC_RELEASE)" != "Beaker" ] && \
850 [ "$(RC_RELEASE)" != "Bunsen" ] && \
851 [ "$(RC_RELEASE)" != "Gonzo" ] && \
852 [ "$(RC_RELEASE)" != "Kodiak" ]; then \
853 - echo -Wno-long-double -no-cpp-precomp; \
854 + echo -Wno-long-double -no-cpp-precomp ; \
859 CFLAGS = $(OFLAG) -g \
860 -I$(SRCROOT) -I$(SRCROOT)/../include -I$(OFILE_DIR)
862 + ifeq "Linux" "$(shell uname)"
863 + CFLAGS = $(OFLAG) -g -Wall $(X_CFLAGS) \
864 + -I$(SRCROOT) -I$(SRCROOT)/../include -I$(OFILE_DIR) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../macosx-include
866 CFLAGS = $(OFLAG) -g -Wall $(X_CFLAGS) \
867 -I$(SRCROOT) -I$(SRCROOT)/../include -I$(OFILE_DIR)
871 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
872 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
873 echo YES ; else echo NO ; \
877 LOCLIBDIR = /usr/local/lib
880 -CFILES2 = main.c lipo.c size.c strings.c nm.c checksyms.c inout.c \
881 - indr.c strip.c atom.c segedit.c kern_tool.c cmpdylib.c \
882 - dylib_pcsampler.c pagestuff.c redo_prebinding.c seg_addr_table.c \
883 - check_dylib.c seg_hack.c check_hints.c install_name_tool.c
884 +CFILES2 = seg_hack.c strip.c
885 ifeq "nextstep" "$(RC_OS)"
886 CFILES3 = file.c ar.c
892 -PROGS = lipo.NEW size.NEW strings.NEW nm.NEW \
893 - libtool.NEW checksyms.NEW indr.NEW strip.NEW nmedit.NEW \
894 - segedit.NEW kern_tool.NEW cmpdylib.NEW \
895 - dylib_pcsampler.NEW pagestuff.NEW redo_prebinding.NEW \
896 - seg_addr_table.NEW check_dylib.NEW seg_hack.NEW install_name_tool.NEW
897 +PROGS = seg_hack.NEW strip.NEW
899 teflon_all macos_all: $(PROGS)
902 lib_ofiles: $(OFILE_DIR) $(SYMROOT) libredo_prebinding.a
905 - vers_string -c $(VERS_STRING_FLAGS) cctools_misc > $(OFILE_DIR)/$@
906 + ./vers_string -c $(VERS_STRING_FLAGS) cctools_misc > $(OFILE_DIR)/$@
908 ifeq "NO" "$(USE_DEPENDENCY_FILE)"
911 $(OFILE_DIR)/seg_hack.o $(OFILE_DIR)/vers.o $(LIBSTUFF)
912 $(CC) $(CFLAGS) $(RC_CFLAGS) -o $(SYMROOT)/seg_hack.NEW \
913 $(OFILE_DIR)/seg_hack.private.o
914 + cp $(SYMROOT)/seg_hack.NEW $(SYMROOT)/seg_hack
916 install_name_tool.NEW: install_name_tool.o vers.o
917 $(CC) $(CFLAGS) $(RC_CFLAGS) -nostdlib -r \
919 $(SYMROOT)/redo_prebinding.NEW \
920 $(SYMROOT)/libredo_prebinding.a \
921 $(SYMROOT)/kern_tool.NEW \
922 - $(SYMROOT)/cmpdylib.NEW
923 + $(SYMROOT)/cmpdylib.NEW \
924 + $(SYMROOT)/seg_hack
928 --- ld/makeUser.c Sat Sep 6 21:52:24 2003
929 +++ ld/makeUser.c Mon Aug 25 22:54:46 2003
933 + * stub generated Mon Aug 25 15:06:30 2003
934 + * with a MiG generated Tue Nov 5 01:17:50 PST 2002 by root@brixen
940 +#ifndef mig_internal
941 +#define mig_internal static
942 +#endif /* mig_internal */
944 +#ifndef mig_external
945 +#define mig_external
946 +#endif /* mig_external */
950 +#endif /* TypeCheck */
953 +#define LimitCheck 0
954 +#endif /* LimitCheck */
957 +#define min(a,b) ( ((a) < (b))? (a): (b) )
960 +#ifndef UseStaticTemplates
961 +#define UseStaticTemplates 0
962 +#endif /* UseStaticTemplates */
964 +#define _WALIGN_(x) (((x) + 3) & ~3)
965 +#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
966 +#ifndef __MachMsgErrorWithTimeout
967 +#define __MachMsgErrorWithTimeout(_R_) { \
969 + case MACH_SEND_INVALID_REPLY: \
970 + case MACH_RCV_INVALID_NAME: \
971 + case MACH_RCV_PORT_DIED: \
972 + case MACH_RCV_PORT_CHANGED: \
973 + case MACH_RCV_TIMED_OUT: \
974 + mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
977 + mig_put_reply_port(InP->Head.msgh_reply_port); \
980 +#endif /* __MachMsgErrorWithTimeout */
982 +#ifndef __MachMsgErrorWithoutTimeout
983 +#define __MachMsgErrorWithoutTimeout(_R_) { \
985 + case MACH_SEND_INVALID_REPLY: \
986 + case MACH_RCV_INVALID_NAME: \
987 + case MACH_RCV_PORT_DIED: \
988 + case MACH_RCV_PORT_CHANGED: \
989 + mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
992 + mig_put_reply_port(InP->Head.msgh_reply_port); \
995 +#endif /* __MachMsgErrorWithoutTimeout */
997 +#ifndef __DeclareSendRpc
998 +#define __DeclareSendRpc(_NUM_, _NAME_)
999 +#endif /* __DeclareSendRpc */
1001 +#ifndef __BeforeSendRpc
1002 +#define __BeforeSendRpc(_NUM_, _NAME_)
1003 +#endif /* __BeforeSendRpc */
1005 +#ifndef __AfterSendRpc
1006 +#define __AfterSendRpc(_NUM_, _NAME_)
1007 +#endif /* __AfterSendRpc */
1009 +#ifndef __DeclareSendSimple
1010 +#define __DeclareSendSimple(_NUM_, _NAME_)
1011 +#endif /* __DeclareSendSimple */
1013 +#ifndef __BeforeSendSimple
1014 +#define __BeforeSendSimple(_NUM_, _NAME_)
1015 +#endif /* __BeforeSendSimple */
1017 +#ifndef __AfterSendSimple
1018 +#define __AfterSendSimple(_NUM_, _NAME_)
1019 +#endif /* __AfterSendSimple */
1021 +#define msgh_request_port msgh_remote_port
1022 +#define msgh_reply_port msgh_local_port
1026 +/* SimpleRoutine alert_old */
1027 +mig_external kern_return_t make_alert_old
1029 + mach_port_t makePort,
1031 + make_string_t functionName,
1032 + mach_msg_type_number_t functionNameCnt,
1033 + make_string_t fileName,
1034 + mach_msg_type_number_t fileNameCnt,
1036 + make_string_t message,
1037 + mach_msg_type_number_t messageCnt
1042 + mach_msg_header_t Head;
1045 + mach_msg_type_number_t functionNameCnt;
1046 + char functionName[1024];
1047 + mach_msg_type_number_t fileNameCnt;
1048 + char fileName[1024];
1050 + mach_msg_type_number_t messageCnt;
1051 + char message[1024];
1055 + * typedef struct {
1056 + * mach_msg_header_t Head;
1057 + * NDR_record_t NDR;
1058 + * kern_return_t RetCode;
1059 + * } mig_reply_error_t;
1066 + register Request *InP = &Mess.In;
1068 + mach_msg_return_t msg_result;
1069 + unsigned int msgh_size;
1070 + unsigned int msgh_size_delta;
1071 + __DeclareSendSimple(100, "alert_old")
1073 + InP->NDR = NDR_record;
1075 + InP->eventType = eventType;
1077 + if (functionNameCnt > 1024) {
1078 + { return MIG_ARRAY_TOO_LARGE; }
1080 + (void)memcpy((char *) InP->functionName, (const char *) functionName, functionNameCnt);
1082 + InP->functionNameCnt = functionNameCnt;
1084 + msgh_size_delta = _WALIGN_(functionNameCnt);
1085 + msgh_size = (sizeof(Request) - 3072) + msgh_size_delta;
1086 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1088 + if (fileNameCnt > 1024) {
1089 + { return MIG_ARRAY_TOO_LARGE; }
1091 + (void)memcpy((char *) InP->fileName, (const char *) fileName, fileNameCnt);
1093 + InP->fileNameCnt = fileNameCnt;
1095 + msgh_size_delta = _WALIGN_(fileNameCnt);
1096 + msgh_size += msgh_size_delta;
1097 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1101 + if (messageCnt > 1024) {
1102 + { return MIG_ARRAY_TOO_LARGE; }
1104 + (void)memcpy((char *) InP->message, (const char *) message, messageCnt);
1106 + InP->messageCnt = messageCnt;
1108 + msgh_size += _WALIGN_(messageCnt);
1110 + InP->Head.msgh_bits =
1111 + MACH_MSGH_BITS(19, 0);
1112 + /* msgh_size passed as argument */
1113 + InP->Head.msgh_request_port = makePort;
1114 + InP->Head.msgh_reply_port = MACH_PORT_NULL;
1115 + InP->Head.msgh_id = 100;
1117 + __BeforeSendSimple(100, "alert_old")
1118 + msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1119 + __AfterSendSimple(100, "alert_old")
1120 + return msg_result;
1124 +/* SimpleRoutine alert */
1125 +mig_external kern_return_t make_alert
1127 + mach_port_t makePort,
1129 + make_string_t functionName,
1130 + mach_msg_type_number_t functionNameCnt,
1131 + make_string_t fileName,
1132 + mach_msg_type_number_t fileNameCnt,
1133 + make_string_t directory,
1134 + mach_msg_type_number_t directoryCnt,
1136 + make_string_t message,
1137 + mach_msg_type_number_t messageCnt
1142 + mach_msg_header_t Head;
1145 + mach_msg_type_number_t functionNameCnt;
1146 + char functionName[1024];
1147 + mach_msg_type_number_t fileNameCnt;
1148 + char fileName[1024];
1149 + mach_msg_type_number_t directoryCnt;
1150 + char directory[1024];
1152 + mach_msg_type_number_t messageCnt;
1153 + char message[1024];
1157 + * typedef struct {
1158 + * mach_msg_header_t Head;
1159 + * NDR_record_t NDR;
1160 + * kern_return_t RetCode;
1161 + * } mig_reply_error_t;
1168 + register Request *InP = &Mess.In;
1170 + mach_msg_return_t msg_result;
1171 + unsigned int msgh_size;
1172 + unsigned int msgh_size_delta;
1173 + __DeclareSendSimple(101, "alert")
1175 + InP->NDR = NDR_record;
1177 + InP->eventType = eventType;
1179 + if (functionNameCnt > 1024) {
1180 + { return MIG_ARRAY_TOO_LARGE; }
1182 + (void)memcpy((char *) InP->functionName, (const char *) functionName, functionNameCnt);
1184 + InP->functionNameCnt = functionNameCnt;
1186 + msgh_size_delta = _WALIGN_(functionNameCnt);
1187 + msgh_size = (sizeof(Request) - 4096) + msgh_size_delta;
1188 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1190 + if (fileNameCnt > 1024) {
1191 + { return MIG_ARRAY_TOO_LARGE; }
1193 + (void)memcpy((char *) InP->fileName, (const char *) fileName, fileNameCnt);
1195 + InP->fileNameCnt = fileNameCnt;
1197 + msgh_size_delta = _WALIGN_(fileNameCnt);
1198 + msgh_size += msgh_size_delta;
1199 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1201 + if (directoryCnt > 1024) {
1202 + { return MIG_ARRAY_TOO_LARGE; }
1204 + (void)memcpy((char *) InP->directory, (const char *) directory, directoryCnt);
1206 + InP->directoryCnt = directoryCnt;
1208 + msgh_size_delta = _WALIGN_(directoryCnt);
1209 + msgh_size += msgh_size_delta;
1210 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1214 + if (messageCnt > 1024) {
1215 + { return MIG_ARRAY_TOO_LARGE; }
1217 + (void)memcpy((char *) InP->message, (const char *) message, messageCnt);
1219 + InP->messageCnt = messageCnt;
1221 + msgh_size += _WALIGN_(messageCnt);
1223 + InP->Head.msgh_bits =
1224 + MACH_MSGH_BITS(19, 0);
1225 + /* msgh_size passed as argument */
1226 + InP->Head.msgh_request_port = makePort;
1227 + InP->Head.msgh_reply_port = MACH_PORT_NULL;
1228 + InP->Head.msgh_id = 101;
1230 + __BeforeSendSimple(101, "alert")
1231 + msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1232 + __AfterSendSimple(101, "alert")
1233 + return msg_result;
1236 diff -bur ./Makefile /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/Makefile
1237 --- as/Makefile Fri Sep 6 18:27:10 2002
1238 +++ as/Makefile Sat Sep 6 23:52:22 2003
1240 export USE_APPLE_PB_SUPPORT = all
1242 ifeq "macos" "$(RC_OS)"
1243 - X_CFLAGS := $(shell if [ "$(RC_RELEASE)" != "Beaker" ] && \
1244 + X_CFLAGS := $(shell if [ `uname` != "Linux" ] && [ "$(RC_RELEASE)" != "Beaker" ] && \
1245 [ "$(RC_RELEASE)" != "Bunsen" ] && \
1246 [ "$(RC_RELEASE)" != "Gonzo" ] && \
1247 [ "$(RC_RELEASE)" != "Kodiak" ]; then \
1251 ifneq "mwccppc" "$(notdir $(CC))"
1252 + ifeq "Linux" "$(shell uname)"
1253 + GCC_FLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../../macosx-include
1255 GCC_FLAGS = -Wall -Wno-precomp $(X_CFLAGS)
1259 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
1260 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
1261 echo YES ; else echo NO ; \
1264 diff -bur ./app.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/app.h
1265 --- as/app.h Tue Apr 30 00:37:17 2002
1266 +++ as/app.h Sat Sep 6 23:49:28 2003
1271 extern FILE *scrub_file;
1272 extern char *scrub_string;
1273 diff -bur ./as.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/as.h
1274 --- as/as.h Tue Apr 30 00:37:17 2002
1275 +++ as/as.h Sat Sep 6 23:49:28 2003
1280 -/* These #imports are for type definitions etc. */
1283 -#import <mach/machine.h>
1284 +/* These #includes are for type definitions etc. */
1286 +#include <assert.h>
1287 +#include <mach/machine.h>
1289 /* These defines are potentially useful */
1291 Only in /home/megacz/xwt/upstream/darwin-linker/src/cctools/as: asparc_dir
1292 diff -bur ./atof-ieee.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/atof-ieee.h
1293 --- as/atof-ieee.h Tue Apr 30 00:37:17 2002
1294 +++ as/atof-ieee.h Sat Sep 6 23:49:28 2003
1297 +#include "flonum.h"
1299 extern char *atof_ieee(
1301 diff -bur ./bignum.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/bignum.h
1302 --- as/bignum.h Tue Apr 30 00:37:17 2002
1303 +++ as/bignum.h Sat Sep 6 23:53:27 2003
1305 * Bignums are >= 0. *
1307 \***********************************************************************/
1308 +#ifndef __BIGNUM_H__
1309 +#define __BIGNUM_H__
1311 #define LITTLENUM_NUMBER_OF_BITS (16)
1312 #define LITTLENUM_RADIX (1 << LITTLENUM_NUMBER_OF_BITS)
1314 /* JF truncated this to get around a problem with GCC */
1315 #define LOG_TO_BASE_2_OF_10 (3.3219280948873623478703194294893901758651)
1316 /* WARNING: I haven't checked that the trailing digits are correct! */
1318 diff -bur ./expr.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/expr.h
1319 --- as/expr.h Fri Sep 6 18:27:10 2002
1320 +++ as/expr.h Sat Sep 6 23:49:28 2003
1322 along with GAS; see the file COPYING. If not, write to
1323 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
1325 -#import "struc-symbol.h"
1328 +#include "struc-symbol.h"
1329 +#include "bignum.h"
1330 +#include "flonum.h"
1333 * This table describes the use of segments as EXPRESSION types.
1334 diff -bur ./flonum.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/flonum.h
1335 --- as/flonum.h Fri Sep 6 18:27:10 2002
1336 +++ as/flonum.h Sat Sep 6 23:49:28 2003
1339 \***********************************************************************/
1342 +#include "bignum.h"
1344 /***********************************************************************\
1346 diff -bur ./frags.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/frags.h
1347 --- as/frags.h Tue Jan 14 23:35:18 2003
1348 +++ as/frags.h Sat Sep 6 23:49:28 2003
1350 along with GAS; see the file COPYING. If not, write to
1351 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
1354 -#import "struc-symbol.h"
1356 +#include "struc-symbol.h"
1359 * A code fragment (frag) is some known number of chars, followed by some
1360 diff -bur ./md.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/md.h
1361 --- as/md.h Tue Apr 30 00:37:17 2002
1362 +++ as/md.h Sat Sep 6 23:49:29 2003
1364 in a file named COPYING. Among other things, the copyright
1365 notice and this notice must be preserved on all copies. */
1367 -#import <mach/machine.h>
1368 -#import "stuff/bytesex.h"
1371 -#import "struc-symbol.h"
1374 +#include <mach/machine.h>
1375 +#include "stuff/bytesex.h"
1378 +#include "struc-symbol.h"
1382 /* These are the default cputype and cpusubtype for this target MACHINE */
1383 extern const cpu_type_t md_cputype;
1384 diff -bur ./read.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/read.h
1385 --- as/read.h Fri Sep 6 18:27:13 2002
1386 +++ as/read.h Sat Sep 6 23:49:29 2003
1388 along with GAS; see the file COPYING. If not, write to
1389 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
1394 #define PERMIT_WHITESPACE /* Define to make whitespace be allowed in */
1395 /* many syntactically unnecessary places. */
1396 diff -bur ./relax.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/relax.h
1397 --- as/relax.h Tue Apr 30 00:37:17 2002
1398 +++ as/relax.h Sat Sep 6 23:53:35 2003
1400 +#ifndef __RELAX_H__
1401 +#define __RELAX_H__
1402 /* The type used for a target address */
1403 typedef unsigned long relax_addressT;
1406 relax_substateT rlx_more; /* Next longer relax-state. */
1407 /* 0 means there is no 'next' relax-state. */
1410 diff -bur ./sections.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sections.h
1411 --- as/sections.h Tue Apr 30 00:37:17 2002
1412 +++ as/sections.h Sat Sep 6 23:49:29 2003
1414 along with GAS; see the file COPYING. If not, write to
1415 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
1417 -#import <mach-o/loader.h>
1418 -#import "struc-symbol.h"
1419 +#include <mach-o/loader.h>
1420 +#include "struc-symbol.h"
1423 * For every section the user mentions in the assembley program, we make one
1424 diff -bur ./struc-symbol.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/struc-symbol.h
1425 --- as/struc-symbol.h Fri Sep 6 18:27:14 2002
1426 +++ as/struc-symbol.h Sat Sep 6 23:49:29 2003
1428 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
1431 -#import <mach-o/nlist.h>
1432 +#include <mach-o/nlist.h>
1433 #else /* !defined(NeXT_MOD) */
1435 #include "a.out.h" /* Needed to define struct nlist. Sigh. */
1436 diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/symbols.h
1437 --- as/symbols.h Tue Apr 30 00:37:17 2002
1438 +++ as/symbols.h Sat Sep 6 23:49:29 2003
1440 along with GAS; see the file COPYING. If not, write to
1441 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
1443 -#import "struc-symbol.h"
1445 +#include "struc-symbol.h"
1448 extern struct hash_control *sy_hash;
1449 extern struct obstack notes;
1450 --- as/make.h Sun Sep 7 00:01:26 2003
1451 +++ as/make.h Sat Sep 6 23:55:11 2003
1453 +#ifndef _make_user_
1454 +#define _make_user_
1458 +#include <string.h>
1459 +#include <mach/ndr.h>
1460 +#include <mach/boolean.h>
1461 +#include <mach/kern_return.h>
1462 +#include <mach/notify.h>
1463 +#include <mach/mach_types.h>
1464 +#include <mach/message.h>
1465 +#include <mach/mig_errors.h>
1466 +#include <mach/port.h>
1469 +#ifndef FUNCTION_PTR_T
1470 +#define FUNCTION_PTR_T
1471 +typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t);
1474 + function_ptr_t function;
1475 +} function_table_entry;
1476 +typedef function_table_entry *function_table_t;
1477 +#endif /* FUNCTION_PTR_T */
1478 +#endif /* AUTOTEST */
1480 +#ifndef make_MSG_COUNT
1481 +#define make_MSG_COUNT 2
1482 +#endif /* make_MSG_COUNT */
1484 +#include <mach/std_types.h>
1485 +#include <mach/mig.h>
1486 +#include "make_defs.h"
1488 +#ifdef __BeforeMigUserHeader
1489 +__BeforeMigUserHeader
1490 +#endif /* __BeforeMigUserHeader */
1493 +/* SimpleRoutine alert_old */
1494 +#ifdef mig_external
1498 +#endif /* mig_external */
1499 +kern_return_t make_alert_old
1501 + mach_port_t makePort,
1503 + make_string_t functionName,
1504 + mach_msg_type_number_t functionNameCnt,
1505 + make_string_t fileName,
1506 + mach_msg_type_number_t fileNameCnt,
1508 + make_string_t message,
1509 + mach_msg_type_number_t messageCnt
1512 +/* SimpleRoutine alert */
1513 +#ifdef mig_external
1517 +#endif /* mig_external */
1518 +kern_return_t make_alert
1520 + mach_port_t makePort,
1522 + make_string_t functionName,
1523 + mach_msg_type_number_t functionNameCnt,
1524 + make_string_t fileName,
1525 + mach_msg_type_number_t fileNameCnt,
1526 + make_string_t directory,
1527 + mach_msg_type_number_t directoryCnt,
1529 + make_string_t message,
1530 + mach_msg_type_number_t messageCnt
1532 +/* typedefs for all requests */
1534 +#ifndef __Request__make_subsystem__defined
1535 +#define __Request__make_subsystem__defined
1537 + mach_msg_header_t Head;
1540 + mach_msg_type_number_t functionNameCnt;
1541 + char functionName[1024];
1542 + mach_msg_type_number_t fileNameCnt;
1543 + char fileName[1024];
1545 + mach_msg_type_number_t messageCnt;
1546 + char message[1024];
1547 + } __Request__alert_old_t;
1550 + mach_msg_header_t Head;
1553 + mach_msg_type_number_t functionNameCnt;
1554 + char functionName[1024];
1555 + mach_msg_type_number_t fileNameCnt;
1556 + char fileName[1024];
1557 + mach_msg_type_number_t directoryCnt;
1558 + char directory[1024];
1560 + mach_msg_type_number_t messageCnt;
1561 + char message[1024];
1562 + } __Request__alert_t;
1564 +#endif /* !__Request__make_subsystem__defined */
1566 +/* union of all requests */
1568 +#ifndef __RequestUnion__make_make_subsystem__defined
1569 +#define __RequestUnion__make_make_subsystem__defined
1570 +union __RequestUnion__make_make_subsystem {
1571 + __Request__alert_old_t Request_make_alert_old;
1572 + __Request__alert_t Request_make_alert;
1574 +#endif /* !__RequestUnion__make_make_subsystem__defined */
1575 +/* typedefs for all replies */
1577 +#ifndef __Reply__make_subsystem__defined
1578 +#define __Reply__make_subsystem__defined
1580 + mach_msg_header_t Head;
1582 + kern_return_t RetCode;
1583 + } __Reply__alert_old_t;
1586 + mach_msg_header_t Head;
1588 + kern_return_t RetCode;
1589 + } __Reply__alert_t;
1591 +#endif /* !__Reply__make_subsystem__defined */
1593 +/* union of all replies */
1595 +#ifndef __ReplyUnion__make_make_subsystem__defined
1596 +#define __ReplyUnion__make_make_subsystem__defined
1597 +union __ReplyUnion__make_make_subsystem {
1598 + __Reply__alert_old_t Reply_make_alert_old;
1599 + __Reply__alert_t Reply_make_alert;
1601 +#endif /* !__RequestUnion__make_make_subsystem__defined */
1603 +#ifndef subsystem_to_name_map_make
1604 +#define subsystem_to_name_map_make \
1605 + { "alert_old", 100 },\
1609 +#ifdef __AfterMigUserHeader
1610 +__AfterMigUserHeader
1611 +#endif /* __AfterMigUserHeader */
1613 +#endif /* _make_user_ */
1614 --- as/makeUser.c Sun Sep 7 00:01:26 2003
1615 +++ as/makeUser.c Sat Sep 6 23:55:11 2003
1619 + * stub generated Sat Sep 6 23:50:34 2003
1620 + * with a MiG generated Tue Nov 5 01:17:50 PST 2002 by root@brixen
1626 +#ifndef mig_internal
1627 +#define mig_internal static
1628 +#endif /* mig_internal */
1630 +#ifndef mig_external
1631 +#define mig_external
1632 +#endif /* mig_external */
1635 +#define TypeCheck 0
1636 +#endif /* TypeCheck */
1639 +#define LimitCheck 0
1640 +#endif /* LimitCheck */
1643 +#define min(a,b) ( ((a) < (b))? (a): (b) )
1646 +#ifndef UseStaticTemplates
1647 +#define UseStaticTemplates 0
1648 +#endif /* UseStaticTemplates */
1650 +#define _WALIGN_(x) (((x) + 3) & ~3)
1651 +#define _WALIGNSZ_(x) _WALIGN_(sizeof(x))
1652 +#ifndef __MachMsgErrorWithTimeout
1653 +#define __MachMsgErrorWithTimeout(_R_) { \
1655 + case MACH_SEND_INVALID_REPLY: \
1656 + case MACH_RCV_INVALID_NAME: \
1657 + case MACH_RCV_PORT_DIED: \
1658 + case MACH_RCV_PORT_CHANGED: \
1659 + case MACH_RCV_TIMED_OUT: \
1660 + mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
1663 + mig_put_reply_port(InP->Head.msgh_reply_port); \
1666 +#endif /* __MachMsgErrorWithTimeout */
1668 +#ifndef __MachMsgErrorWithoutTimeout
1669 +#define __MachMsgErrorWithoutTimeout(_R_) { \
1671 + case MACH_SEND_INVALID_REPLY: \
1672 + case MACH_RCV_INVALID_NAME: \
1673 + case MACH_RCV_PORT_DIED: \
1674 + case MACH_RCV_PORT_CHANGED: \
1675 + mig_dealloc_reply_port(InP->Head.msgh_reply_port); \
1678 + mig_put_reply_port(InP->Head.msgh_reply_port); \
1681 +#endif /* __MachMsgErrorWithoutTimeout */
1683 +#ifndef __DeclareSendRpc
1684 +#define __DeclareSendRpc(_NUM_, _NAME_)
1685 +#endif /* __DeclareSendRpc */
1687 +#ifndef __BeforeSendRpc
1688 +#define __BeforeSendRpc(_NUM_, _NAME_)
1689 +#endif /* __BeforeSendRpc */
1691 +#ifndef __AfterSendRpc
1692 +#define __AfterSendRpc(_NUM_, _NAME_)
1693 +#endif /* __AfterSendRpc */
1695 +#ifndef __DeclareSendSimple
1696 +#define __DeclareSendSimple(_NUM_, _NAME_)
1697 +#endif /* __DeclareSendSimple */
1699 +#ifndef __BeforeSendSimple
1700 +#define __BeforeSendSimple(_NUM_, _NAME_)
1701 +#endif /* __BeforeSendSimple */
1703 +#ifndef __AfterSendSimple
1704 +#define __AfterSendSimple(_NUM_, _NAME_)
1705 +#endif /* __AfterSendSimple */
1707 +#define msgh_request_port msgh_remote_port
1708 +#define msgh_reply_port msgh_local_port
1712 +/* SimpleRoutine alert_old */
1713 +mig_external kern_return_t make_alert_old
1715 + mach_port_t makePort,
1717 + make_string_t functionName,
1718 + mach_msg_type_number_t functionNameCnt,
1719 + make_string_t fileName,
1720 + mach_msg_type_number_t fileNameCnt,
1722 + make_string_t message,
1723 + mach_msg_type_number_t messageCnt
1728 + mach_msg_header_t Head;
1731 + mach_msg_type_number_t functionNameCnt;
1732 + char functionName[1024];
1733 + mach_msg_type_number_t fileNameCnt;
1734 + char fileName[1024];
1736 + mach_msg_type_number_t messageCnt;
1737 + char message[1024];
1741 + * typedef struct {
1742 + * mach_msg_header_t Head;
1743 + * NDR_record_t NDR;
1744 + * kern_return_t RetCode;
1745 + * } mig_reply_error_t;
1752 + register Request *InP = &Mess.In;
1754 + mach_msg_return_t msg_result;
1755 + unsigned int msgh_size;
1756 + unsigned int msgh_size_delta;
1757 + __DeclareSendSimple(100, "alert_old")
1759 + InP->NDR = NDR_record;
1761 + InP->eventType = eventType;
1763 + if (functionNameCnt > 1024) {
1764 + { return MIG_ARRAY_TOO_LARGE; }
1766 + (void)memcpy((char *) InP->functionName, (const char *) functionName, functionNameCnt);
1768 + InP->functionNameCnt = functionNameCnt;
1770 + msgh_size_delta = _WALIGN_(functionNameCnt);
1771 + msgh_size = (sizeof(Request) - 3072) + msgh_size_delta;
1772 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1774 + if (fileNameCnt > 1024) {
1775 + { return MIG_ARRAY_TOO_LARGE; }
1777 + (void)memcpy((char *) InP->fileName, (const char *) fileName, fileNameCnt);
1779 + InP->fileNameCnt = fileNameCnt;
1781 + msgh_size_delta = _WALIGN_(fileNameCnt);
1782 + msgh_size += msgh_size_delta;
1783 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1787 + if (messageCnt > 1024) {
1788 + { return MIG_ARRAY_TOO_LARGE; }
1790 + (void)memcpy((char *) InP->message, (const char *) message, messageCnt);
1792 + InP->messageCnt = messageCnt;
1794 + msgh_size += _WALIGN_(messageCnt);
1796 + InP->Head.msgh_bits =
1797 + MACH_MSGH_BITS(19, 0);
1798 + /* msgh_size passed as argument */
1799 + InP->Head.msgh_request_port = makePort;
1800 + InP->Head.msgh_reply_port = MACH_PORT_NULL;
1801 + InP->Head.msgh_id = 100;
1803 + __BeforeSendSimple(100, "alert_old")
1804 + msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1805 + __AfterSendSimple(100, "alert_old")
1806 + return msg_result;
1810 +/* SimpleRoutine alert */
1811 +mig_external kern_return_t make_alert
1813 + mach_port_t makePort,
1815 + make_string_t functionName,
1816 + mach_msg_type_number_t functionNameCnt,
1817 + make_string_t fileName,
1818 + mach_msg_type_number_t fileNameCnt,
1819 + make_string_t directory,
1820 + mach_msg_type_number_t directoryCnt,
1822 + make_string_t message,
1823 + mach_msg_type_number_t messageCnt
1828 + mach_msg_header_t Head;
1831 + mach_msg_type_number_t functionNameCnt;
1832 + char functionName[1024];
1833 + mach_msg_type_number_t fileNameCnt;
1834 + char fileName[1024];
1835 + mach_msg_type_number_t directoryCnt;
1836 + char directory[1024];
1838 + mach_msg_type_number_t messageCnt;
1839 + char message[1024];
1843 + * typedef struct {
1844 + * mach_msg_header_t Head;
1845 + * NDR_record_t NDR;
1846 + * kern_return_t RetCode;
1847 + * } mig_reply_error_t;
1854 + register Request *InP = &Mess.In;
1856 + mach_msg_return_t msg_result;
1857 + unsigned int msgh_size;
1858 + unsigned int msgh_size_delta;
1859 + __DeclareSendSimple(101, "alert")
1861 + InP->NDR = NDR_record;
1863 + InP->eventType = eventType;
1865 + if (functionNameCnt > 1024) {
1866 + { return MIG_ARRAY_TOO_LARGE; }
1868 + (void)memcpy((char *) InP->functionName, (const char *) functionName, functionNameCnt);
1870 + InP->functionNameCnt = functionNameCnt;
1872 + msgh_size_delta = _WALIGN_(functionNameCnt);
1873 + msgh_size = (sizeof(Request) - 4096) + msgh_size_delta;
1874 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1876 + if (fileNameCnt > 1024) {
1877 + { return MIG_ARRAY_TOO_LARGE; }
1879 + (void)memcpy((char *) InP->fileName, (const char *) fileName, fileNameCnt);
1881 + InP->fileNameCnt = fileNameCnt;
1883 + msgh_size_delta = _WALIGN_(fileNameCnt);
1884 + msgh_size += msgh_size_delta;
1885 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1887 + if (directoryCnt > 1024) {
1888 + { return MIG_ARRAY_TOO_LARGE; }
1890 + (void)memcpy((char *) InP->directory, (const char *) directory, directoryCnt);
1892 + InP->directoryCnt = directoryCnt;
1894 + msgh_size_delta = _WALIGN_(directoryCnt);
1895 + msgh_size += msgh_size_delta;
1896 + InP = (Request *) ((pointer_t) InP + msgh_size_delta - 1024);
1900 + if (messageCnt > 1024) {
1901 + { return MIG_ARRAY_TOO_LARGE; }
1903 + (void)memcpy((char *) InP->message, (const char *) message, messageCnt);
1905 + InP->messageCnt = messageCnt;
1907 + msgh_size += _WALIGN_(messageCnt);
1909 + InP->Head.msgh_bits =
1910 + MACH_MSGH_BITS(19, 0);
1911 + /* msgh_size passed as argument */
1912 + InP->Head.msgh_request_port = makePort;
1913 + InP->Head.msgh_reply_port = MACH_PORT_NULL;
1914 + InP->Head.msgh_id = 101;
1916 + __BeforeSendSimple(101, "alert")
1917 + msg_result = mach_msg(&InP->Head, MACH_SEND_MSG|MACH_MSG_OPTION_NONE, msgh_size, 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1918 + __AfterSendSimple(101, "alert")
1919 + return msg_result;
1922 --- ar/contents.c 30 Apr 2002 07:37:17 -0000 1.1.1.1
1923 +++ ar/contents.c 7 Sep 2003 08:55:11 -0000
1928 -#include <tzfile.h>
1931 #include "archive.h"
1932 @@ -103,12 +102,14 @@
1933 else if (!(file = files(argv)))
1935 if (options & AR_V) {
1937 (void)strmode(chdr.mode, buf);
1938 (void)printf("%s %6d/%-6d %8qd ",
1939 buf + 1, chdr.uid, chdr.gid, chdr.size);
1940 tp = localtime(&chdr.date);
1941 (void)strftime(buf, sizeof(buf), "%b %e %H:%M %Y", tp);
1942 (void)printf("%s %s\n", buf, file);
1945 (void)printf("%s\n", file);
1947 --- ar/misc.c 30 Apr 2002 07:37:17 -0000 1.1.1.1
1948 +++ ar/misc.c 7 Sep 2003 08:55:11 -0000
1950 #endif /* not lint */
1952 #include <sys/param.h>
1953 +#define EFTYPE 79 /* Inappropriate file type or format */
1957 --- ar/vers_string Sun Sep 7 01:55:10 2003
1958 +++ ar/vers_string Sun Sep 7 01:53:23 2003
1962 +# Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
1964 +# @APPLE_LICENSE_HEADER_START@
1966 +# "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
1967 +# Reserved. This file contains Original Code and/or Modifications of
1968 +# Original Code as defined in and that are subject to the Apple Public
1969 +# Source License Version 1.0 (the 'License'). You may not use this file
1970 +# except in compliance with the License. Please obtain a copy of the
1971 +# License at http://www.apple.com/publicsource and read it before using
1974 +# The Original Code and all software distributed under the License are
1975 +# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1976 +# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
1977 +# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
1978 +# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
1979 +# License for the specific language governing rights and limitations
1980 +# under the License."
1982 +# @APPLE_LICENSE_HEADER_END@
1985 +# vers_string PROGRAM [STAMPED_NAME]
1987 +# Output a string suitable for use as a version identifier
1994 +program=$(basename $0);
1998 + echo "Usage: ${program} [<options>] <program> [<stamped_name>]";
1999 + echo " <program>: ???";
2000 + echo " <stamped_name>: ???";
2001 + echo "Options: ???";
2005 +# Handle command line
2009 +Format=''\''PROGRAM:'\''"${Program}"'\'' PROJECT:'\''"${Version}"'\'' DEVELOPER:'\''"${USER}"'\'' BUILT:'\''"${Date}"'\'''\''';
2011 +if ! args=$(getopt cflBn $*); then usage; fi;
2014 + case "${option}" in
2016 + Format=''\''#include <sys/cdefs.h>
2018 +#define __IDSTRING(name,string) \
2019 + static const char name[] __attribute__((__unused__)) = string
2021 +__IDSTRING(SGS_VERS,"@(#)PROGRAM:'\''"${Program}"'\'' PROJECT:'\''"${Version}"'\'' DEVELOPER:'\''"${USER}"'\'' BUILT:'\''"${Date}"'\''\n");
2022 +__IDSTRING(VERS_NUM,"'\''${Revision}'\''");'\''';
2026 + Format='"${Program}"'\''-'\''"${Revision}"';
2030 + Format=''\''#include <sys/cdefs.h>
2032 +#define __IDSTRING(name,string) \
2033 + const char name[] __attribute__((__unused__)) = string
2035 +__IDSTRING(SGS_VERS,"@(#)LIBRARY:'\''"${Program}"'\'' PROJECT:'\''"${Version}"'\'' DEVELOPER:'\''"${USER}"'\'' BUILT:'\''"${Date}"'\''\n");'\''';
2039 + date="NO DATE SET (-B used)";
2043 + Format='"${Revision}"';
2053 +Program=$1; if [ $# != 0 ]; then shift; fi;
2054 +Version=$1; if [ $# != 0 ]; then shift; fi;
2056 +if [ $# != 0 ]; then usage; fi;
2058 +if [ -z "${Program}" ]; then Program="Unknown"; fi;
2060 +if [ -n "${Version}" ]; then
2061 + if ! Revision=$(expr "${Version}" : '.*-\(.*\)'); then
2062 + echo "${program}: No hyphen in project root ${Version}" >&2
2066 + CurrentDir=$(/bin/pwd);
2067 + Version=$(basename "${CurrentDir}");
2068 + while [ "${Version}" != "${CurrentDir}" ]; do
2069 + if Revision=$(expr "${Version}" : '.*-\(.*\)'); then break; fi;
2070 + CurrentDir=$(dirname "${CurrentDir}");
2071 + Version=$(basename "${CurrentDir}");
2073 + if [ "${Version}" = "${CurrentDir}" ]; then
2074 + CurrentDir=$(/bin/pwd);
2075 + echo "${program}: No hyphen in project root ${CurrentDir}" >&2
2076 + echo "${program}: Could not determine version" >&2
2077 + Version="Unknown";
2082 +if [ -z "${USER}" ]; then USER=$(whoami); fi;
2084 +echo "$(eval echo "${Format}")";
2085 --- ar/Makefile 7 Sep 2002 01:27:09 -0000 1.1.1.2
2086 +++ ar/Makefile 7 Sep 2003 09:03:52 -0000
2088 ifeq "mwccppc" "$(notdir $(CC))"
2089 CFLAGS = -g $(OFLAG) -I$(SRCROOT)/../include
2091 - CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include
2092 + ifeq "Linux" "$(shell uname)"
2093 + CFLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../macosx-include -I../include
2095 + CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include
2099 LIBSTUFF = -L$(SYMROOT)/../libstuff -lstuff
2101 -USE_DEPENDENCY_FILE := $(shell if [ "$(notdir $(CC))" != "mwccppc" ]; then \
2102 +USE_DEPENDENCY_FILE := $(shell if [ `uname` != "Linux" ] && [ "$(notdir $(CC))" != "mwccppc" ]; then \
2103 echo YES ; else echo NO ; \
2107 $(CC) $(CFLAGS) $(RC_CFLAGS) -o $(SYMROOT)/$@ $(OBJS) $(LIBSTUFF)
2110 - vers_string -c $(VERS_STRING_FLAGS) $(PRODUCT) > $(OFILE_DIR)/$@
2111 + chmod +x vers_string
2112 + ./vers_string -c $(VERS_STRING_FLAGS) $(PRODUCT) > $(OFILE_DIR)/$@
2114 ifeq "NO" "$(USE_DEPENDENCY_FILE)"
2116 --- ld/fake-mach.c Sun Sep 7 14:13:57 2003
2117 +++ ld/fake-mach.c Sun Sep 7 14:13:50 2003
2119 +/** fake-mach.c - A half baked implementation of mach kernel functions using the POSIX UNIX API.
2121 +* This was used to port Apple's Darwin linker (ld) to Linux. This allows Mac OS X applications to
2122 +* be cross complied on Linux. */
2124 +#include <stdlib.h>
2125 +#include <assert.h>
2126 +#include <sys/types.h>
2127 +#include <sys/uio.h>
2128 +#include <unistd.h>
2132 +#include <sys/mman.h>
2134 +// Mach include files for typedefs, return values, etc
2135 +//~ #include <mach/mach.h>
2136 +#include <mach/kern_return.h>
2137 +#include <mach/vm_types.h>
2138 +#include <mach/mach_types.h>
2139 +#include <mach/message.h>
2140 +#include <servers/bootstrap_defs.h>
2142 +/** The port for the current task. Ignored in this implementation. */
2143 +mach_port_t mach_task_self_ = 0;
2145 +/** The bootstrap port. Ignored in this implementation. */
2146 +mach_port_t bootstrap_port = 0;
2148 +#include <mach/ppc/ndr_def.h>
2150 +/** Maps the file descriptor into memory. Free the memory using vm_deallocate. Ignores findspace and offset. */
2151 +kern_return_t map_fd( int fd, vm_offset_t offset, vm_offset_t *va, boolean_t findspace, vm_size_t size)
2153 + void* space = NULL;
2157 + assert( offset == 0 );
2158 + //~ assert( *va == 0 );
2159 + assert( findspace == TRUE );
2161 + // Allocate memory
2162 + space = malloc( size );
2163 + assert( space != NULL );
2165 + // Read file into space
2166 + while(bytes < size) bytes += read( fd, ((char*)space) + bytes, size - bytes);
2167 + assert( bytes == size );
2170 + space = mmap( (void*) offset, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0 );
2171 + // No permission: try to make it read only
2172 + if ( space == (void*) -1 && errno == EACCES )
2174 + space = mmap( (void*) offset, size, PROT_READ, MAP_SHARED, fd, 0 );
2176 + assert( space != NULL && space != (void*) -1 );
2179 + // Copy back the pointer
2180 + *va = (vm_offset_t) space;
2183 + return KERN_SUCCESS;
2186 +/** Returns a string appropriate to the error argument given. */
2187 +char* mach_error_string( int error_value )
2189 + char *errorString = "Some fake mach error string.";
2191 + return errorString;
2194 +/** Returns the mach port for the current host. We fake it by returning zero. */
2195 +mach_port_t mach_host_self( void )
2200 +/** Returns the mach port for the current task. We fake it by returning zero. */
2201 +//~ mach_port_t mach_task_self( void )
2206 +/**The function vm_allocate allocates a region of virtual memory, placing it in the specified task's address space. Anywhere must be true, as the memory will be allocated anywhere. */
2207 +extern kern_return_t vm_allocate( mach_port_t target_task, vm_address_t *address, vm_size_t size, boolean_t anywhere )
2209 + assert( anywhere == TRUE );
2211 + // Anonymous memory map
2212 + *address = (vm_address_t) mmap( NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANON, 0, 0 );
2213 + //~ *address = (vm_address_t) malloc( size );
2214 + assert( address != (vm_address_t) NULL );
2216 + return KERN_SUCCESS;
2219 +/**vm_deallocate relinquishes access to a region of a task's address space, causing further access to that memory to fail. This memory must have been allocated with vm_allocate. size is ignored. */
2220 +kern_return_t vm_deallocate( mach_port_t target_task, vm_address_t address, vm_size_t size )
2224 + assert( address != (vm_address_t) NULL );
2226 + // Free the memory
2227 + ret = munmap( (void*) address, size );
2228 + assert( ret == 0 );
2230 + //~ free( (void*) address );
2232 + return KERN_SUCCESS;
2235 +/** The function mach_port_allocate_name creates a new right in the specified task, with a specified name for the new right. In this implementation it does nothing. */
2236 +kern_return_t mach_port_allocate_name (mach_port_t task, mach_port_right_t right, mach_port_t name)
2238 + return KERN_SUCCESS;
2241 +/** The function mach_port_deallocate releases a user reference for a right in task's IPC name space. In this implementation it does nothing. */
2242 +kern_return_t mach_port_deallocate (mach_port_t task, mach_port_t name)
2244 + return KERN_SUCCESS;
2247 +/** host_info returns information about the host. It is not implemented in this implementation. */
2248 +kern_return_t host_info( host_t host, host_flavor_t flavor, host_info_t host_info_out, mach_msg_type_number_t *host_info_outCnt )
2251 + return KERN_FAILURE;
2254 +/** vm_msync unimplemented: It does nothing. */
2255 +kern_return_t vm_msync ( vm_map_t target_task, vm_address_t address, vm_size_t size, vm_sync_t sync_flags )
2257 + //~ assert( address != (vm_address_t) NULL );
2259 + //~ ret = msync( (void*) address, size, int flags);
2261 + return KERN_SUCCESS;
2264 +/** bootstrap_look_up unimplemented. */
2265 +kern_return_t bootstrap_look_up( mach_port_t bootstrap_port, name_t service_name, mach_port_t *service_port )
2268 + return KERN_FAILURE;
2271 +/** mach_msg unimplemented. Send and/or receive a message. If the message operation
2272 + * is interrupted, and the user did not request an indication
2273 + * of that fact, then restart the appropriate parts of the
2274 + * operation silently (trap version does not restart).
2276 +mach_msg_return_t mach_msg( mach_msg_header_t *msg, mach_msg_option_t option, mach_msg_size_t send_size,
2277 + mach_msg_size_t rcv_size, mach_port_name_t rcv_name, mach_msg_timeout_t timeout, mach_port_name_t notify)
2280 + return KERN_SUCCESS;
2282 --- ar/archive.c 30 Apr 2002 07:37:17 -0000 1.1.1.1
2283 +++ ar/archive.c 8 Sep 2003 01:51:24 -0000
2286 #include <sys/param.h>
2287 #include <sys/stat.h>
2288 +#include <stuff/ofile.h>
2295 typedef struct ar_hdr HDR;
2296 -static char hb[sizeof(HDR) + 1]; /* real header */
2297 +static char hb[61]; /* real header */
2301 @@ -262,30 +263,40 @@
2303 lname = strlen(name);
2304 if (options & AR_TR) {
2307 + for(i=0; i<15; i++) buf[i] = ' ';
2309 if (lname > OLDARMAXNAME) {
2310 (void)fflush(stdout);
2311 warnx("warning: %s truncated to %.*s",
2312 name, OLDARMAXNAME, name);
2313 (void)fflush(stderr);
2315 - (void)sprintf(hb, HDR3, name, (long int)sb->st_mtimespec.tv_sec,
2316 + strncpy(buf, name, 15);
2317 + (void)sprintf(hb, HDR3, buf, (long int)sb->st_mtime,
2318 (unsigned int)(u_short)sb->st_uid,
2319 (unsigned int)(u_short)sb->st_gid,
2320 - sb->st_mode, sb->st_size, ARFMAG);
2321 + sb->st_mode, (long long)sb->st_size, ARFMAG);
2323 - } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
2324 + } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) {
2325 (void)sprintf(hb, HDR1, AR_EFMT1, (lname + 3) & ~3,
2326 - (long int)sb->st_mtimespec.tv_sec,
2327 + (long int)sb->st_mtime,
2328 (unsigned int)(u_short)sb->st_uid,
2329 (unsigned int)(u_short)sb->st_gid,
2330 - sb->st_mode, sb->st_size + ((lname + 3) & ~3),
2331 + sb->st_mode, (long long)(sb->st_size + ((lname + 3) & ~3)),
2337 + for(i=0; i<16; i++) buf[i] = ' ';
2339 + strncpy(buf, name, 16);
2341 - (void)sprintf(hb, HDR2, name, (long int)sb->st_mtimespec.tv_sec,
2342 + (void)sprintf(hb, HDR2, buf, (long int)sb->st_mtime,
2343 (unsigned int)(u_short)sb->st_uid,
2344 (unsigned int)(u_short)sb->st_gid,
2345 - sb->st_mode, sb->st_size, ARFMAG);
2346 + sb->st_mode, (long long)sb->st_size, ARFMAG);
2350 --- misc/libtool.c Wed Apr 23 15:44:51 2003
2351 +++ misc/libtool.c Sun Sep 7 18:58:16 2003
2352 @@ -2177,14 +2177,15 @@
2354 strcpy(message_buf, message);
2355 strcat(message_buf, arch_name);
2358 make_alert(ProjectBuilder_port,
2360 - NULL, 0, /* functionName, not used by ProjectBuilder */
2362 fileName, strlen(fileName)+1 > 1024 ? 1024 : strlen(fileName)+1,
2365 message_buf, strlen(message_buf) + 1);