From 2b734c35589fd2b83751c27d70710931d28c98e2 Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 07:05:22 +0000 Subject: [PATCH] 2003/09/07 09:56:09 darcs-hash:20040130070522-2ba56-9449846c5c778a172e54b9e14f2fbdacc24fad1f.gz --- upstream/darwin-linker/patches/cctools.patch | 204 +++++++++++++++++++++++++- 1 file changed, 201 insertions(+), 3 deletions(-) diff --git a/upstream/darwin-linker/patches/cctools.patch b/upstream/darwin-linker/patches/cctools.patch index 49913ce..ef589b5 100644 --- a/upstream/darwin-linker/patches/cctools.patch +++ b/upstream/darwin-linker/patches/cctools.patch @@ -2095,15 +2095,15 @@ diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sym + return msg_result; + } +} ---- ar/Makefile Sun Sep 7 01:35:22 2003 -+++ ar/Makefile Sun Sep 7 01:32:55 2003 +--- ar/Makefile 7 Sep 2002 01:27:09 -0000 1.1.1.2 ++++ ar/Makefile 7 Sep 2003 08:55:11 -0000 @@ -2,12 +2,16 @@ ifeq "mwccppc" "$(notdir $(CC))" CFLAGS = -g $(OFLAG) -I$(SRCROOT)/../include else - CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include + ifeq "Linux" "$(shell uname)" -+ CFLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../../macosx-include -I../include ++ CFLAGS = -Wall $(X_CFLAGS) -D__LITTLE_ENDIAN__ -U__BIG_ENDIAN__ -D__ppc__ -I/usr/include -I../../macosx-include -I../include + else + CFLAGS = -g $(OFLAG) -Wall -Wno-precomp -I$(SRCROOT)/../include + endif @@ -2116,3 +2116,201 @@ diff -bur ./symbols.h /home/megacz/xwt/upstream/darwin-linker/src/cctools/as/sym echo YES ; else echo NO ; \ fi; ) +--- ar/archive.c 30 Apr 2002 07:37:17 -0000 1.1.1.1 ++++ ar/archive.c 7 Sep 2003 08:55:11 -0000 +@@ -69,6 +69,7 @@ + + #include + #include ++#include + + #include + #include +@@ -268,21 +269,21 @@ + name, OLDARMAXNAME, name); + (void)fflush(stderr); + } +- (void)sprintf(hb, HDR3, name, (long int)sb->st_mtimespec.tv_sec, ++ (void)sprintf(hb, HDR3, name, (long int)sb->st_mtime, + (unsigned int)(u_short)sb->st_uid, + (unsigned int)(u_short)sb->st_gid, + sb->st_mode, sb->st_size, ARFMAG); + lname = 0; + } else if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) + (void)sprintf(hb, HDR1, AR_EFMT1, (lname + 3) & ~3, +- (long int)sb->st_mtimespec.tv_sec, ++ (long int)sb->st_mtime, + (unsigned int)(u_short)sb->st_uid, + (unsigned int)(u_short)sb->st_gid, + sb->st_mode, sb->st_size + ((lname + 3) & ~3), + ARFMAG); + else { + lname = 0; +- (void)sprintf(hb, HDR2, name, (long int)sb->st_mtimespec.tv_sec, ++ (void)sprintf(hb, HDR2, name, (long int)sb->st_mtime, + (unsigned int)(u_short)sb->st_uid, + (unsigned int)(u_short)sb->st_gid, + sb->st_mode, sb->st_size, ARFMAG); +--- ar/contents.c 30 Apr 2002 07:37:17 -0000 1.1.1.1 ++++ ar/contents.c 7 Sep 2003 08:55:11 -0000 +@@ -76,7 +76,6 @@ + #include + #include + #include +-#include + #include + + #include "archive.h" +@@ -103,12 +102,14 @@ + else if (!(file = files(argv))) + goto next; + if (options & AR_V) { ++/* + (void)strmode(chdr.mode, buf); + (void)printf("%s %6d/%-6d %8qd ", + buf + 1, chdr.uid, chdr.gid, chdr.size); + tp = localtime(&chdr.date); + (void)strftime(buf, sizeof(buf), "%b %e %H:%M %Y", tp); + (void)printf("%s %s\n", buf, file); ++*/ + } else + (void)printf("%s\n", file); + if (!all && !*argv) +--- ar/misc.c 30 Apr 2002 07:37:17 -0000 1.1.1.1 ++++ ar/misc.c 7 Sep 2003 08:55:11 -0000 +@@ -68,6 +68,7 @@ + #endif /* not lint */ + + #include ++#define EFTYPE 79 /* Inappropriate file type or format */ + + #include + #include +--- ar/vers_string Sun Sep 7 01:55:10 2003 ++++ ar/vers_string Sun Sep 7 01:53:23 2003 +@@ -0,0 +1,125 @@ ++#!/bin/sh ++## ++# Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ++# ++# @APPLE_LICENSE_HEADER_START@ ++# ++# "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ++# Reserved. This file contains Original Code and/or Modifications of ++# Original Code as defined in and that are subject to the Apple Public ++# Source License Version 1.0 (the 'License'). You may not use this file ++# except in compliance with the License. Please obtain a copy of the ++# License at http://www.apple.com/publicsource and read it before using ++# this file. ++# ++# The Original Code and all software distributed under the License are ++# distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER ++# EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ++# INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ++# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ++# License for the specific language governing rights and limitations ++# under the License." ++# ++# @APPLE_LICENSE_HEADER_END@ ++## ++# ++# vers_string PROGRAM [STAMPED_NAME] ++# ++# Output a string suitable for use as a version identifier ++# ++ ++## ++# Usage ++## ++ ++program=$(basename $0); ++ ++usage () ++{ ++ echo "Usage: ${program} [] []"; ++ echo " : ???"; ++ echo " : ???"; ++ echo "Options: ???"; ++} ++ ++## ++# Handle command line ++## ++ ++ Date=$(date); ++Format=''\''PROGRAM:'\''"${Program}"'\'' PROJECT:'\''"${Version}"'\'' DEVELOPER:'\''"${USER}"'\'' BUILT:'\''"${Date}"'\'''\'''; ++ ++if ! args=$(getopt cflBn $*); then usage; fi; ++set -- ${args}; ++for option; do ++ case "${option}" in ++ -c) ++ Format=''\''#include ++#ifndef __IDSTRING ++#define __IDSTRING(name,string) \ ++ static const char name[] __attribute__((__unused__)) = string ++#endif ++__IDSTRING(SGS_VERS,"@(#)PROGRAM:'\''"${Program}"'\'' PROJECT:'\''"${Version}"'\'' DEVELOPER:'\''"${USER}"'\'' BUILT:'\''"${Date}"'\''\n"); ++__IDSTRING(VERS_NUM,"'\''${Revision}'\''");'\'''; ++ shift; ++ ;; ++ -f) ++ Format='"${Program}"'\''-'\''"${Revision}"'; ++ shift; ++ ;; ++ -l) ++ Format=''\''#include ++#ifndef __IDSTRING ++#define __IDSTRING(name,string) \ ++ const char name[] __attribute__((__unused__)) = string ++#endif ++__IDSTRING(SGS_VERS,"@(#)LIBRARY:'\''"${Program}"'\'' PROJECT:'\''"${Version}"'\'' DEVELOPER:'\''"${USER}"'\'' BUILT:'\''"${Date}"'\''\n");'\'''; ++ shift; ++ ;; ++ -B) ++ date="NO DATE SET (-B used)"; ++ shift; ++ ;; ++ -n) ++ Format='"${Revision}"'; ++ shift; ++ ;; ++ --) ++ shift; ++ break; ++ ;; ++ esac; ++done; ++ ++Program=$1; if [ $# != 0 ]; then shift; fi; ++Version=$1; if [ $# != 0 ]; then shift; fi; ++ ++if [ $# != 0 ]; then usage; fi; ++ ++if [ -z "${Program}" ]; then Program="Unknown"; fi; ++ ++if [ -n "${Version}" ]; then ++ if ! Revision=$(expr "${Version}" : '.*-\(.*\)'); then ++ echo "${program}: No hyphen in project root ${Version}" >&2 ++ exit 1; ++ fi; ++else ++ CurrentDir=$(/bin/pwd); ++ Version=$(basename "${CurrentDir}"); ++ while [ "${Version}" != "${CurrentDir}" ]; do ++ if Revision=$(expr "${Version}" : '.*-\(.*\)'); then break; fi; ++ CurrentDir=$(dirname "${CurrentDir}"); ++ Version=$(basename "${CurrentDir}"); ++ done; ++ if [ "${Version}" = "${CurrentDir}" ]; then ++ CurrentDir=$(/bin/pwd); ++ echo "${program}: No hyphen in project root ${CurrentDir}" >&2 ++ echo "${program}: Could not determine version" >&2 ++ Version="Unknown"; ++ Revision=""; ++ fi; ++fi; ++ ++if [ -z "${USER}" ]; then USER=$(whoami); fi; ++ ++echo "$(eval echo "${Format}")"; -- 1.7.10.4