From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Erik Charlebois Newsgroups: gmane.emacs.devel Subject: Re: Fixes for 64-bit Emacs on Snow Leopard Date: Wed, 9 Sep 2009 00:32:59 -0700 Message-ID: <8203EB83-DB17-415C-9621-9EA453F107BB@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1075.2) Content-Type: multipart/mixed; boundary=Apple-Mail-2--703527204 X-Trace: ger.gmane.org 1252481640 3269 80.91.229.12 (9 Sep 2009 07:34:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Sep 2009 07:34:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 09 09:33:53 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MlHgX-0001Pc-UI for ged-emacs-devel@m.gmane.org; Wed, 09 Sep 2009 09:33:53 +0200 Original-Received: from localhost ([127.0.0.1]:43992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlHgX-0000wx-9Q for ged-emacs-devel@m.gmane.org; Wed, 09 Sep 2009 03:33:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlHfx-0000bW-Gq for emacs-devel@gnu.org; Wed, 09 Sep 2009 03:33:09 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlHfs-0000XW-SJ for emacs-devel@gnu.org; Wed, 09 Sep 2009 03:33:08 -0400 Original-Received: from [199.232.76.173] (port=39333 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlHfs-0000XG-MU for emacs-devel@gnu.org; Wed, 09 Sep 2009 03:33:04 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:8835) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MlHfr-00009h-PZ for emacs-devel@gnu.org; Wed, 09 Sep 2009 03:33:04 -0400 Original-Received: from mail-px0-f175.google.com ([209.85.216.175]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlHfq-00014I-OJ for emacs-devel@gnu.org; Wed, 09 Sep 2009 03:33:03 -0400 Original-Received: by pxi5 with SMTP id 5so3963014pxi.6 for ; Wed, 09 Sep 2009 00:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:mime-version :content-type:subject:date:in-reply-to:to:references:message-id :x-mailer; bh=AwH60L0p7aFDC+uVMn00KwtiLJtsred93Uk0JeWaf5c=; b=T1HK640qF/T80JwDpOkX7yPBHGSzO7bvhzWaJTQBVQzw4X8MK4ZsoqvrnZP/1EpWZK w4NepYrTAEBnAVIHjmnsJFcjMgsGCuTSSzA0jGqxG71s9xqPbp/Z5/q9Lg7SbduP7EzM gCS+KZvTrjvWRf9NU2Z6W64SP4M6YP9ySadRg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=a+ntxkox0QNwUMzn3lTB55GuK4xmFFKR4MwFuRAheWy5UOgu71u3AMS01aQ6LBz1tq QqoCVi6JEfTnuRQHQw2yM4DYEVfkQuyNvtDns48llbUwPe21TT7hASdlzUkPDneZi0W4 /LebD26Ma7wlaNKpl6eGS93AYMZ/aboZEedbU= Original-Received: by 10.115.101.10 with SMTP id d10mr2322920wam.61.1252481581799; Wed, 09 Sep 2009 00:33:01 -0700 (PDT) Original-Received: from ?192.168.123.51? (64-46-22-205.dyn.novuscom.net [64.46.22.205]) by mx.google.com with ESMTPS id 22sm1019790pzk.2.2009.09.09.00.33.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 09 Sep 2009 00:33:01 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.1075.2) X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:115162 Archived-At: --Apple-Mail-2--703527204 Content-Disposition: attachment; filename=0001-Fix-Emacs-64-bit-on-Snow-Leopard.patch Content-Type: application/octet-stream; name="0001-Fix-Emacs-64-bit-on-Snow-Leopard.patch" Content-Transfer-Encoding: quoted-printable =46rom=20caec5991567ba9546ca21b904b1a4824776a835c=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Erik=20Charlebois=20=0A= Date:=20Wed,=209=20Sep=202009=2000:24:37=20-0700=0ASubject:=20[PATCH]=20= Fix=20Emacs=2064-bit=20on=20Snow=20Leopard.=0A=0A---=0A=20= lib-src/ChangeLog=20=20|=20=20=20=204=20++++=0A=20lib-src/movemail.c=20|=20= =20=20=202=20+-=0A=20src/ChangeLog=20=20=20=20=20=20|=20=20=2050=20= ++++++++++++++++++++++++++++++++++++++++++++++++++=0A=20src/emacs.c=20=20= =20=20=20=20=20=20|=20=20=20=202=20+-=0A=20src/font.c=20=20=20=20=20=20=20= =20=20|=20=20=2011=20++++++-----=0A=20src/menu.c=20=20=20=20=20=20=20=20=20= |=20=20=20=202=20+-=0A=20src/nsfns.m=20=20=20=20=20=20=20=20|=20=20=20=20= 6=20++----=0A=20src/nsfont.m=20=20=20=20=20=20=20|=20=20=2044=20= ++++++++++++++++++++++++++++++++------------=0A=20src/nsgui.h=20=20=20=20= =20=20=20=20|=20=20=2018=20+++++++++++++++---=0A=20src/nsimage.m=20=20=20= =20=20=20|=20=20=20=204=20++--=0A=20src/nsmenu.m=20=20=20=20=20=20=20|=20= =20=20=206=20+++---=0A=20src/nsterm.h=20=20=20=20=20=20=20|=20=20=20=207=20= +++++++=0A=20src/nsterm.m=20=20=20=20=20=20=20|=20=20=2031=20= ++++++++++++++++++++++---------=0A=20src/process.c=20=20=20=20=20=20|=20=20= =20=202=20+-=0A=20src/unexmacosx.c=20=20=20|=20=20=20=204=20++--=0A=2015=20= files=20changed,=20149=20insertions(+),=2044=20deletions(-)=0A=0Adiff=20= --git=20a/lib-src/ChangeLog=20b/lib-src/ChangeLog=0Aindex=20= 7970ee5..f2f9144=20100644=0A---=20a/lib-src/ChangeLog=0A+++=20= b/lib-src/ChangeLog=0A@@=20-1,3=20+1,7=20@@=0A+2009-09-09=20=20Erik=20= Charlebois=20=20=0A+=0A+=09*=20movemail.c=20= (error):=20Change=20fprintf=20to=20fputs=20to=20fix=20warning.=0A+=0A=20= 2009-09-09=20=20Glenn=20Morris=20=20=0A=20=0A=20=09*=20= Makefile.in=20($(DESTDIR)${archlibdir}):=20Set=20umask=20to=20= world-readable=0Adiff=20--git=20a/lib-src/movemail.c=20= b/lib-src/movemail.c=0Aindex=20732f8dd..2feaae8=20100644=0A---=20= a/lib-src/movemail.c=0A+++=20b/lib-src/movemail.c=0A@@=20-622,7=20+622,7=20= @@=20error=20(s1,=20s2,=20s3)=0A=20=20=20else=20if=20(s2)=0A=20=20=20=20=20= fprintf=20(stderr,=20s1,=20s2);=0A=20=20=20else=0A-=20=20=20=20fprintf=20= (stderr,=20s1);=0A+=20=20=20=20fputs=20(s1,=20stderr);=0A=20=20=20= fprintf=20(stderr,=20"\n");=0A=20}=0A=20=0Adiff=20--git=20= a/src/ChangeLog=20b/src/ChangeLog=0Aindex=2052ee600..80c487a=20100644=0A= ---=20a/src/ChangeLog=0A+++=20b/src/ChangeLog=0A@@=20-1,3=20+1,53=20@@=0A= +2009-09-09=20=20Erik=20Charlebois=20=20=0A+=0A= +=09*=20emacs.c=20(main):=20Remove=20extra=20format=20specifier=20to=20= fix=20warning.=0A+=0A+=09*=20font.c=20(font_unparse_xlfd):=20Print=20= EMACS_INT=20with=20%ld.=0A+=09(font_unparse_fcname):=20Print=20EMACS_INT=20= with=20%ld.=0A+=0A+=09*=20menu.c=20(find_and_return_menu_selection):=20= Fix=20truncation=20warning.=0A+=0A+=09*=20nsfns.m=20= (x-close-connection):=20Remove=20PSFlush=20call.=20Does=20not=20do=20= anything=0A+=09on=20Cocoa.=20Does=20not=20exist=20in=2064-bit=20Cocoa.=0A= +=09(xw-color-values):=20Use=20CGFloat=20instead=20of=20float.=0A+=0A+=09= *=20nsfont.m=20(ns_char_width):=20Use=20sizeWithAttributes:=20instead=20= of=0A+=09widthOfString:,=20which=20does=20no=20exist=20in=2064-bit=20= Cocoa.=0A+=09(ns_findfonts):=20Print=20EMACS_INT=20with=20%ld.=0A+=09= (nsfont_list_family):=20Print=20EMACS_INT=20with=20%ld.=0A+=09= (nsfont_open):=20Use=20Core=20Text=20for=20OS=20X=2010.5=20and=20later.=0A= +=09(nsfont_close):=20Release=20Core=20Text=20resource.=0A+=09= (ns_uni_to_glyphs):=20Use=20NSUInteger=20when=20calling=20Cocoa=20APIs.=0A= +=09(layoutOptions):=20Use=20NSUInteger=20in=20method=20signature.=0A+=09= (insertGlyphs):=20Use=20NSUIntger=20in=20method=20signature.=0A+=09= (setIntAttribute):=20Use=20NSInteger=20and=20NSUInteger=20in=20method=20= signature.=0A+=0A+=09*=20nsgui.h:=20Add=20typedefs=20for=20NSUInteger,=20= NSInteger=20and=20CGFloat=20for=0A+=09pre-10.5=20OS=20X=20and=20GNUstep.=0A= +=0A+=09*=20nsimage.m=20(setXBMColor):=20Use=20CGFloat=20for=20calls=20= to=20Cocoa.=0A+=09(getPixelAtX):=20Use=20CGFloat=20for=20calls=20to=20= Cocoa.=0A+=0A+=09*=20nsmenu.m=20(addItemWithWidgetValue):=20Use=20= NSInteger=20for=20call=20to=20Cocoa.=0A+=09(fillWithWidgetValue):=20= sizeToFit=20is=20deprecated=20(does=20nothing).=20Remove=0A+=09call=20= for=20OS=20X=2010.5=20and=20later.=0A+=09(initWithContentRect):=20Use=20= NSUInteger=20in=20method=20signature.=0A+=0A+=09*=20nsterm.h:=20Use=20= Core=20Text=20on=20OS=20X=2010.5=20and=20later.=0A+=0A+=09*=20nsterm.m=20= (mouseDown):=20Remove=20redundant=20leading=200s=20in=20format=20= specifier.=0A+=09(ns_query_color):=20Use=20CGFloat=20for=20calls=20to=20= Cocoa.=0A+=09(characterIndexForPoint):=20Use=20NUSInteger=20in=20method=20= signature.=0A+=09(draggingEntered):=20Use=20NSDragOperation=20in=20= method=20signature.=0A+=09(scrollerWidth):=20Use=20CGFloat=20in=20method=20= signature.=0A+=09(setPosition):=20Use=20setDoubleValue:=20and=20= setKnobProportion:=20on=2010.5=20and=0A+=09later=20since=20= setFloatVAlue:knobProportion:=20is=20deprecated.=0A+=09(mouseDown):=20= Use=20%ld=20to=20print=20NSScrollerPart.=0A+=0A+=09*=20process.c=20= (list_processes_1):=20Use=20%ld=20to=20print=20EMACS_INT.=0A+=0A+=09*=20= unexmacosx.c=20(read_load_commands):=20Use=20%ld=20to=20print=20= vm_address_t.=0A+=0A=202009-09-09=20=20Stefan=20Monnier=20=20= =0A=20=0A=20=09*=20keymap.c=20= (where_is_internal):=20Filter=20out=20shadowed=20remappings.=0Adiff=20= --git=20a/src/emacs.c=20b/src/emacs.c=0Aindex=202c14be5..44ed9ce=20= 100644=0A---=20a/src/emacs.c=0A+++=20b/src/emacs.c=0A@@=20-1181,7=20= +1181,7=20@@=20main=20(int=20argc,=20char=20**argv)=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20argv[skip_args]=20=3D=20fdStr;=0A=20=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20execv=20(argv[0],=20argv);=0A-=20=20=20=20=20=20=20=20= =20=20=20=20fprintf=20(stderr,=20"emacs=20daemon:=20exec=20failed:=20= %d\t%d\n",=20errno);=0A+=20=20=20=20=20=20=20=20=20=20=20=20fprintf=20= (stderr,=20"emacs=20daemon:=20exec=20failed:=20%d\n",=20errno);=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20exit=20(1);=0A=20=20=20=20=20=20=20=20=20=20= =20}=0A=20=0Adiff=20--git=20a/src/font.c=20b/src/font.c=0Aindex=20= cfc4852..7571a00=20100644=0A---=20a/src/font.c=0A+++=20b/src/font.c=0A@@=20= -1357,7=20+1357,7=20@@=20font_unparse_xlfd=20(font,=20pixel_size,=20= name,=20nbytes)=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20= f[XLFD_AVGWIDTH_INDEX]=20=3D=20alloca=20(11);=0A=20=20=20=20=20=20=20len=20= +=3D=20sprintf=20(f[XLFD_AVGWIDTH_INDEX],=0A-=09=09=20=20=20=20=20=20= "%d",=20XINT=20(AREF=20(font,=20FONT_AVGWIDTH_INDEX)))=20+=201;=0A+=09=09= =20=20=20=20=20=20"%ld",=20(long)=20XINT=20(AREF=20(font,=20= FONT_AVGWIDTH_INDEX)))=20+=201;=0A=20=20=20=20=20}=0A=20=20=20else=0A=20=20= =20=20=20f[XLFD_AVGWIDTH_INDEX]=20=3D=20"*",=20len=20+=3D=202;=0A@@=20= -1673,7=20+1673,7=20@@=20font_unparse_fcname=20(font,=20pixel_size,=20= name,=20nbytes)=0A=20=20=20=20=20}=0A=20=0A=20=20=20if=20(INTEGERP=20= (AREF=20(font,=20FONT_DPI_INDEX)))=0A-=20=20=20=20len=20+=3D=20sprintf=20= (work,=20":dpi=3D%d",=20XINT=20(AREF=20(font,=20FONT_DPI_INDEX)));=0A+=20= =20=20=20len=20+=3D=20sprintf=20(work,=20":dpi=3D%ld",=20(long)=20XINT=20= (AREF=20(font,=20FONT_DPI_INDEX)));=0A=20=20=20if=20(INTEGERP=20(AREF=20= (font,=20FONT_SPACING_INDEX)))=0A=20=20=20=20=20len=20+=3D=20strlen=20= (":spacing=3D100");=0A=20=20=20if=20(INTEGERP=20(AREF=20(font,=20= FONT_AVGWIDTH_INDEX)))=0A@@=20-1686,7=20+1686,7=20@@=20= font_unparse_fcname=20(font,=20pixel_size,=20name,=20nbytes)=0A=20=20=20=20= =20=20=20if=20(STRINGP=20(val))=0A=20=09len=20+=3D=20SBYTES=20(val);=0A=20= =20=20=20=20=20=20else=20if=20(INTEGERP=20(val))=0A-=09len=20+=3D=20= sprintf=20(work,=20"%d",=20XINT=20(val));=0A+=09len=20+=3D=20sprintf=20= (work,=20"%ld",=20(long)=20XINT=20(val));=0A=20=20=20=20=20=20=20else=20= if=20(SYMBOLP=20(val))=0A=20=09len=20+=3D=20(NILP=20(val)=20?=205=20:=20= 4);=20/*=20for=20"false"=20or=20"true"=20*/=0A=20=20=20=20=20}=0A@@=20= -1713,9=20+1713,10=20@@=20font_unparse_fcname=20(font,=20pixel_size,=20= name,=20nbytes)=0A=20=20=20=20=20=20=20p=20+=3D=20sprintf=20(p,=20= ":%s=3D%s",=20style_names[i],=0A=20=09=09=20=20=20=20SDATA=20= (SYMBOL_NAME=20(styles[i])));=0A=20=20=20if=20(INTEGERP=20(AREF=20(font,=20= FONT_DPI_INDEX)))=0A-=20=20=20=20p=20+=3D=20sprintf=20(p,=20":dpi=3D%d",=20= XINT=20(AREF=20(font,=20FONT_DPI_INDEX)));=0A+=20=20=20=20p=20+=3D=20= sprintf=20(p,=20":dpi=3D%ld",=20(long)=20XINT=20(AREF=20(font,=20= FONT_DPI_INDEX)));=0A=20=20=20if=20(INTEGERP=20(AREF=20(font,=20= FONT_SPACING_INDEX)))=0A-=20=20=20=20p=20+=3D=20sprintf=20(p,=20= ":spacing=3D%d",=20XINT=20(AREF=20(font,=20FONT_SPACING_INDEX)));=0A+=20=20= =20=20p=20+=3D=20sprintf=20(p,=20":spacing=3D%ld",=0A+=20=20=20=20=20=20=20= =20=20=20=20=20(long)=20XINT=20(AREF=20(font,=20FONT_SPACING_INDEX)));=0A= =20=20=20if=20(INTEGERP=20(AREF=20(font,=20FONT_AVGWIDTH_INDEX)))=0A=20=20= =20=20=20{=0A=20=20=20=20=20=20=20if=20(XINT=20(AREF=20(font,=20= FONT_AVGWIDTH_INDEX))=20=3D=3D=200)=0Adiff=20--git=20a/src/menu.c=20= b/src/menu.c=0Aindex=20940986f..23a7013=20100644=0A---=20a/src/menu.c=0A= +++=20b/src/menu.c=0A@@=20-1005,7=20+1005,7=20@@=20= find_and_return_menu_selection=20(FRAME_PTR=20f,=20int=20keymaps,=20void=20= *client_data)=0A=20=20=20=20=20=20=20=20=20{=0A=20=20=20=20=20=20=20=20=20= =20=20entry=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=3D=20XVECTOR=20= (menu_items)->contents[i=20+=20MENU_ITEMS_ITEM_VALUE];=0A-=20=20=20=20=20= =20=20=20=20=20if=20((int)=20(EMACS_INT)client_data=20=3D=3D=20=20= (int)(&XVECTOR=20(menu_items)->contents[i]))=0A+=20=20=20=20=20=20=20=20=20= =20if=20((EMACS_INT)client_data=20=3D=3D=20(EMACS_INT)(&XVECTOR=20= (menu_items)->contents[i]))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20{=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20if=20(keymaps=20!=3D=200)=0A= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20{=0Adiff=20--git=20= a/src/nsfns.m=20b/src/nsfns.m=0Aindex=20136ae03..8375109=20100644=0A---=20= a/src/nsfns.m=0A+++=20b/src/nsfns.m=0A@@=20-1771,9=20+1771,7=20@@=20The=20= argument=20DISPLAY=20is=20currently=20ignored.=20=20*/)=0A=20=20=20=20=20= =20Lisp_Object=20display;=0A=20{=0A=20=20=20check_ns=20();=0A-#ifdef=20= NS_IMPL_COCOA=0A-=20=20PSFlush=20();=0A-#endif=0A+=0A=20=20=20= /*ns_delete_terminal=20(dpyinfo->terminal);=20*/=0A=20=20=20[NSApp=20= terminate:=20NSApp];=0A=20=20=20return=20Qnil;=0A@@=20-2237,7=20+2235,7=20= @@=20DEFUN=20("xw-color-values",=20Fxw_color_values,=20Sxw_color_values,=20= 1,=202,=200,=0A=20=20=20=20=20=20Lisp_Object=20color,=20frame;=0A=20{=0A=20= =20=20NSColor=20*=20col;=0A-=20=20float=20red,=20green,=20blue,=20alpha;=0A= +=20=20CGFloat=20red,=20green,=20blue,=20alpha;=0A=20=0A=20=20=20= check_ns=20();=0A=20=20=20CHECK_STRING=20(color);=0Adiff=20--git=20= a/src/nsfont.m=20b/src/nsfont.m=0Aindex=2046c50aa..c141fa4=20100644=0A= ---=20a/src/nsfont.m=0A+++=20b/src/nsfont.m=0A@@=20-245,7=20+245,10=20@@=20= ns_char_width=20(NSFont=20*sfont,=20int=20c)=0A=20=09=20=20=20=20return=20= w;=0A=20=20=20=20=20=20=20}=0A=20#endif=0A-=20=20=20=20w=20=3D=20[sfont=20= widthOfString:=20cstr];=0A+=20=20=20=20NSDictionary=20*attrsDictionary=20= =3D=0A+=20=20=20=20=20=20=20=20[NSDictionary=20dictionaryWithObject:=20= sfont=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= forKey:=20NSFontAttributeName];=0A+=20=20=20=20w=20=3D=20[cstr=20= sizeWithAttributes:=20attrsDictionary].width;=0A=20=20=20=20=20return=20= max=20(w,=202.0);=0A=20}=0A=20=0A@@=20-517,7=20+520,8=20@@=20= ns_findfonts=20(Lisp_Object=20font_spec,=20BOOL=20isMatch)=0A=20=20=20=20= =20=20=20return=20ns_fallback_entity=20();=0A=20=0A=20=20=20=20=20if=20= (NSFONT_TRACE)=0A-=09fprintf=20(stderr,=20"=20=20=20=20Returning=20%d=20= entities.\n",=20XINT=20(Flength=20(list)));=0A+=09fprintf=20(stderr,=20"=20= =20=20=20Returning=20%ld=20entities.\n",=0A+=20=20=20=20=20=20=20=20=20=20= =20=20(long)=20XINT=20(Flength=20(list)));=0A=20=0A=20=20=20=20=20return=20= list;=0A=20}=0A@@=20-623,8=20+627,8=20@@=20nsfont_list_family=20= (Lisp_Object=20frame)=0A=20=20=20/*=20FIXME:=20escape=20the=20name?=20*/=0A= =20=0A=20=20=20if=20(NSFONT_TRACE)=0A-=20=20=20=20fprintf=20(stderr,=20= "nsfont:=20list=20families=20returning=20%d=20entries\n",=0A-=20=20=20=20= =20=20=20=20=20=20=20=20XINT=20(Flength=20(list)));=0A+=20=20=20=20= fprintf=20(stderr,=20"nsfont:=20list=20families=20returning=20%ld=20= entries\n",=0A+=20=20=20=20=20=20=20=20=20=20=20=20(long)=20XINT=20= (Flength=20(list)));=0A=20=0A=20=20=20return=20list;=0A=20}=0A@@=20= -843,14=20+847,27=20@@=20nsfont_open=20(FRAME_PTR=20f,=20Lisp_Object=20= font_entity,=20int=20pixel_size)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20((CFStringRef)@"Monaco",=20kATSOptionFlagsDefault);=0A=20=20=20= =20=20=20=20=20=20=20=20=20=20}=0A=20=20=20=20=20=20=20=20=20}=0A+=0A= +#if=20MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20MAC_OS_X_VERSION_10_5=0A+=20= =20=20=20=20=20font_info->ctfont=20=3D=0A+=20=20=20=20=20=20=20=20=20=20= CTFontCreateWithPlatformFont=20(atsFont,=200.0f,=20NULL,=20NULL);=0A+=20=20= =20=20=20=20font_info->cgfont=20=3D=20CTFontCopyGraphicsFont=20= (font_info->ctfont,=20NULL);=0A+#else=0A=20=20=20=20=20=20=20= font_info->cgfont=20=3D=20CGFontCreateWithPlatformFont=20= ((void*)&atsFont);=0A+#endif=0A=20=20=20=20=20}=0A=20#endif=0A=20=0A=20=20= =20=20=20/*=20set=20up=20metrics=20portion=20of=20font=20struct=20*/=0A=20= =20=20=20=20font->ascent=20=3D=20[sfont=20ascender];=0A=20=20=20=20=20= font->descent=20=3D=20-[sfont=20descender];=0A-=20=20=20=20= font->min_width=20=3D=20[sfont=20widthOfString:=20@"|"];=20/*=20FIXME=20= */=0A+=20=0A+=20=20=20=20/*=20FIXME=20*/=0A+=20=20=20=20NSDictionary=20= *attrsDictionary=20=3D=0A+=20=20=20=20=20=20=20=20[NSDictionary=20= dictionaryWithObject:=20sfont=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20forKey:=20NSFontAttributeName];=0A+=20=20=20=20= font->min_width=20=3D=20[@"|"=20sizeWithAttributes:=20= attrsDictionary].width;=0A+=0A=20=20=20=20=20font->space_width=20=3D=20= lrint=20(ns_char_width=20(sfont,=20'=20'));=0A=20=20=20=20=20= font->average_width=20=3D=20lrint=20(font_info->width);=0A=20=20=20=20=20= font->max_width=20=3D=20lrint=20(font_info->max_bounds.width);=0A@@=20= -888,6=20+905,9=20@@=20nsfont_close=20(FRAME_PTR=20f,=20struct=20font=20= *font)=0A=20=20=20[font_info->nsfont=20release];=0A=20#ifdef=20= NS_IMPL_COCOA=0A=20=20=20CGFontRelease=20(font_info->cgfont);=0A+#if=20= MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20MAC_OS_X_VERSION_10_5=0A+=20=20= CFRelease=20(font_info->ctfont);=0A+#endif=0A=20#endif=0A=20=20=20xfree=20= (font_info->name);=0A=20=20=20xfree=20(font_info);=0A@@=20-1308,7=20= +1328,7=20@@=20ns_uni_to_glyphs=20(struct=20nsfont_info=20*font_info,=20= unsigned=20char=20block)=0A=20=20=20=20=20NSGlyphGenerator=20= *glyphGenerator=20=3D=20[NSGlyphGenerator=20sharedGlyphGenerator];=0A=20=20= =20=20=20/*NSCharacterSet=20*coveredChars=20=3D=20[nsfont=20= coveredCharacterSet];=20*/=0A=20=20=20=20=20unsigned=20int=20numGlyphs=20= =3D=20[font_info->nsfont=20numberOfGlyphs];=0A-=20=20=20=20unsigned=20= int=20gInd=20=3D0,=20cInd=20=3D0;=0A+=20=20=20=20NSUInteger=20gInd=20=3D0,= =20cInd=20=3D0;=0A=20=0A=20=20=20=20=20[glyphStorage=20setString:=20= allChars=20font:=20font_info->nsfont];=0A=20=20=20=20=20[glyphGenerator=20= generateGlyphsForGlyphStorage:=20glyphStorage=0A@@=20-1439,7=20+1459,7=20= @@=20ns_glyph_metrics=20(struct=20nsfont_info=20*font_info,=20unsigned=20= char=20block)=0A=20}=0A=20=0A=20/*=20NSGlyphStorage=20protocol=20*/=0A--=20= (unsigned=20int)layoutOptions=0A+-=20(NSUInteger)layoutOptions=0A=20{=0A=20= =20=20return=200;=0A=20}=0A@@=20-1449,9=20+1469,9=20@@=20= ns_glyph_metrics=20(struct=20nsfont_info=20*font_info,=20unsigned=20char=20= block)=0A=20=20=20return=20attrStr;=0A=20}=0A=20=0A--=20= (void)insertGlyphs:=20(const=20NSGlyph=20*)glyphs=20length:=20(unsigned=20= int)length=0A-=20=20=20=20=20=20=20=20forStartingGlyphAtIndex:=20= (unsigned=20int)glyphIndex=0A-=20=20=20=20=20=20=20=20characterIndex:=20= (unsigned=20int)charIndex=0A+-=20(void)insertGlyphs:=20(const=20NSGlyph=20= *)glyphs=20length:=20(NSUInteger)length=0A+=20=20=20=20=20=20=20=20= forStartingGlyphAtIndex:=20(NSUInteger)glyphIndex=0A+=20=20=20=20=20=20=20= =20characterIndex:=20(NSUInteger)charIndex=0A=20{=0A=20=20=20len=20=3D=20= glyphIndex+length;=0A=20=20=20for=20(i=20=3DglyphIndex;=20icall_data];=0A+=20=20=20=20=20=20[item=20= setTag:=20(NSInteger)wv->call_data];=0A=20=20=20=20=20}=0A=20=0A=20=20=20= return=20item;=0A@@=20-708,7=20+708,7=20@@=20name_is_separator=20(name)=0A= =20#ifdef=20NS_IMPL_GNUSTEP=0A=20=20=20if=20([[self=20window]=20= isVisible])=0A=20=20=20=20=20[self=20sizeToFit];=0A-#else=0A+#elif=20= MAC_OS_X_VERSION_MAX_ALLOWED=20<=20MAC_OS_X_VERSION_10_5=0A=20=20=20if=20= ([self=20supermenu]=20=3D=3D=20nil)=0A=20=20=20=20=20[self=20sizeToFit];=0A= =20#endif=0A@@=20-1611,7=20+1611,7=20@@=20ns_popup_dialog=20(Lisp_Object=20= position,=20Lisp_Object=20contents,=20Lisp_Object=20header)=0A=20#define=20= TEXTHEIGHT=0920.0=0A=20#define=20MINCELLWIDTH=0990.0=0A=20=0A--=20= initWithContentRect:=20(NSRect)contentRect=20styleMask:=20(unsigned=20= int)aStyle=0A+-=20initWithContentRect:=20(NSRect)contentRect=20= styleMask:=20(NSUInteger)aStyle=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20backing:=20(NSBackingStoreType)backingType=20defer:=20(BOOL)flag=0A= =20{=0A=20=20=20NSSize=20spacing=20=3D=20{SPACER,=20SPACER};=0Adiff=20= --git=20a/src/nsterm.h=20b/src/nsterm.h=0Aindex=207375e3c..033f757=20= 100644=0A---=20a/src/nsterm.h=0A+++=20b/src/nsterm.h=0A@@=20-420,9=20= +420,16=20@@=20struct=20nsfont_info=0A=20#else=20/*=20GNUstep=20or=20OS=20= X=20<=2010.3=20*/=0A=20=20=20void=20*cgfont;=0A=20#endif=0A+=20=20/*=20= ctFont=20is=20used=20only=20on=20OS=20X=2010.5+=20*/=0A+#if=20defined=20= (NS_IMPL_COCOA)=20&&=20(MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20= MAC_OS_X_VERSION_10_5)=0A+=20=20CTFontRef=20ctfont;=0A+#else=20/*=20= GNUstep=20or=20OS=20X=20<=2010.5=20*/=0A+=20=20void=20*ctfont;=0A+#endif=0A= =20#else=20/*=20!=20OBJC=20*/=0A=20=20=20void=20*nsfont;=0A=20=20=20void=20= *cgfont;=0A+=20=20void=20*ctfont;=0A=20#endif=0A=20=20=20char=20bold,=20= ital;=20=20/*=20convenience=20flags=20*/=0A=20=20=20char=20synthItal;=0A= diff=20--git=20a/src/nsterm.m=20b/src/nsterm.m=0Aindex=20= 5a58f1d..233f699=20100644=0A---=20a/src/nsterm.m=0A+++=20b/src/nsterm.m=0A= @@=20-1481,7=20+1481,7=20@@=20ns_color_to_lisp=20(NSColor=20*col)=0A=20=20= =20=20=20=20Convert=20a=20color=20to=20a=20lisp=20string=20with=20the=20= RGB=20equivalent=0A=20=20=20=20= --------------------------------------------------------------------------= =20*/=0A=20{=0A-=20=20float=20red,=20green,=20blue,=20alpha,=20gray;=0A+=20= =20CGFloat=20red,=20green,=20blue,=20alpha,=20gray;=0A=20=20=20char=20= buf[1024];=0A=20=20=20const=20char=20*str;=0A=20=20=20NSTRACE=20= (ns_color_to_lisp);=0A@@=20-1501,13=20+1501,13=20@@=20ns_color_to_lisp=20= (NSColor=20*col)=0A=20=20=20=20=20{=0A=20=20=20=20=20=20=20[[col=20= colorUsingColorSpaceName:=20NSCalibratedWhiteColorSpace]=0A=20=20=20=20=20= =20=20=20=20=20=20=20=20getWhite:=20&gray=20alpha:=20&alpha];=0A-=20=20=20= =20=20=20snprintf=20(buf,=20sizeof=20(buf),=20"#%02.2lx%02.2lx%02.2lx",=0A= +=20=20=20=20=20=20snprintf=20(buf,=20sizeof=20(buf),=20= "#%2.2lx%2.2lx%2.2lx",=0A=20=09=09lrint=20(gray=20*=200xff),=20lrint=20= (gray=20*=200xff),=20lrint=20(gray=20*=200xff));=0A=20=20=20=20=20=20=20= UNBLOCK_INPUT;=0A=20=20=20=20=20=20=20return=20build_string=20(buf);=0A=20= =20=20=20=20}=0A=20=0A-=20=20snprintf=20(buf,=20sizeof=20(buf),=20= "#%02.2lx%02.2lx%02.2lx",=0A+=20=20snprintf=20(buf,=20sizeof=20(buf),=20= "#%2.2lx%2.2lx%2.2lx",=0A=20=20=20=20=20=20=20=20=20=20=20=20=20lrint=20= (red*0xff),=20lrint=20(green*0xff),=20lrint=20(blue*0xff));=0A=20=0A=20=20= =20UNBLOCK_INPUT;=0A@@=20-1523,7=20+1523,7=20@@=20ns_query_color(void=20= *col,=20XColor=20*color_def,=20int=20setPixel)=0A=20=20=20=20=20=20=20=20= =20=20and=20set=20color_def=20pixel=20to=20the=20resulting=20index.=0A=20= =20=20=20= --------------------------------------------------------------------------= =20*/=0A=20{=0A-=20=20float=20r,=20g,=20b,=20a;=0A+=20=20CGFloat=20r,=20= g,=20b,=20a;=0A=20=0A=20=20=20[((NSColor=20*)col)=20getRed:=20&r=20= green:=20&g=20blue:=20&b=20alpha:=20&a];=0A=20=20=20color_def->red=20=20=20= =3D=20r=20*=2065535;=0A@@=20-4741,7=20+4741,7=20@@=20extern=20void=20= update_window_cursor=20(struct=20window=20*w,=20int=20on);=0A=20=20=20= return=20NSMakeRange=20(NSNotFound,=200);=0A=20}=0A=20=0A--=20(unsigned=20= int)characterIndexForPoint:=20(NSPoint)thePoint=0A+-=20= (NSUInteger)characterIndexForPoint:=20(NSPoint)thePoint=0A=20{=0A=20=20=20= if=20(NS_KEYLOG)=0A=20=20=20=20=20NSLog=20(@"characterIndexForPoint=20= request");=0A@@=20-5418,7=20+5418,7=20@@=20extern=20void=20= update_window_cursor=20(struct=20window=20*w,=20int=20on);=0A=20/*=20= NSDraggingDestination=20protocol=20methods.=20=20Actually=20this=20is=20= not=20really=20a=0A=20=20=20=20protocol,=20but=20a=20category=20of=20= Object.=20=20O=20well...=20=20*/=0A=20=0A--(unsigned=20int)=20= draggingEntered:=20(id=20)=20sender=0A= +-(NSDragOperation)=20draggingEntered:=20(id=20)=20= sender=0A=20{=0A=20=20=20NSTRACE=20(draggingEntered);=0A=20=20=20return=20= NSDragOperationGeneric;=0A@@=20-5703,7=20+5703,7=20@@=20extern=20void=20= update_window_cursor=20(struct=20window=20*w,=20int=20on);=0A=20#define=20= SCROLL_BAR_FIRST_DELAY=200.5=0A=20#define=20SCROLL_BAR_CONTINUOUS_DELAY=20= (1.0=20/=2015)=0A=20=0A-+=20(float)=20scrollerWidth=0A++=20(CGFloat)=20= scrollerWidth=0A=20{=0A=20=20=20/*=20TODO:=20if=20we=20want=20to=20allow=20= variable=20widths,=20this=20is=20the=20place=20to=20do=20it,=0A=20=20=20=20= =20=20=20=20=20=20=20=20however=20neither=20GNUstep=20nor=20Cocoa=20= support=20it=20very=20well=20*/=0A@@=20-5834,14=20+5834,26=20@@=20extern=20= void=20update_window_cursor=20(struct=20window=20*w,=20int=20on);=0A=20=20= =20em_whole=20=3D=20whole;=0A=20=0A=20=20=20if=20(portion=20>=3D=20= whole)=0A-=20=20=20=20[self=20setFloatValue:=200.0=20knobProportion:=20= 1.0];=0A+=20=20=20=20{=0A+#if=20MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20= MAC_OS_X_VERSION_10_5=0A+=20=20=20=20=20=20[self=20setDoubleValue:=20= 0.0];=0A+=20=20=20=20=20=20[self=20setKnobProportion:=201.0];=0A+#else=0A= +=20=20=20=20=20=20[self=20setFloatValue:=200.0=20knobProportion:=20= 1.0];=0A+#endif=0A+=20=20=20=20}=0A=20=20=20else=0A=20=20=20=20=20{=0A=20= =20=20=20=20=20=20float=20pos,=20por;=0A=20=20=20=20=20=20=20portion=20=3D= =20max=20((float)whole*min_portion/pixel_height,=20portion);=0A=20=20=20=20= =20=20=20pos=20=3D=20(float)position=20/=20(whole=20-=20portion);=0A=20=20= =20=20=20=20=20por=20=3D=20(float)portion/whole;=0A+#if=20= MAC_OS_X_VERSION_MAX_ALLOWED=20>=3D=20MAC_OS_X_VERSION_10_5=0A+=20=20=20=20= =20=20[self=20setDoubleValue:=20pos];=0A+=20=20=20=20=20=20[self=20= setKnobProportion:=20por];=0A+#else=0A=20=20=20=20=20=20=20[self=20= setFloatValue:=20pos=20knobProportion:=20por];=0A+#endif=0A=20=20=20=20=20= }=0A=20#ifdef=20NS_IMPL_GNUSTEP=0A=20=20=20[self=20display];=0A@@=20= -5946,7=20+5958,8=20@@=20extern=20void=20update_window_cursor=20(struct=20= window=20*w,=20int=20on);=0A=20=20=20=20=20case=20NSScrollerKnobSlot:=20=20= /*=20GNUstep-only=20*/=0A=20=20=20=20=20=20=20last_hit_part=20=3D=20= scroll_bar_move_ratio;=20break;=0A=20=20=20=20=20default:=20=20/*=20= NSScrollerNoPart?=20*/=0A-=20=20=20=20=20=20fprintf=20(stderr,=20= "EmacsScoller-mouseDown:=20unexpected=20part=20%d\n",=20part);=0A+=20=20=20= =20=20=20fprintf=20(stderr,=20"EmacsScoller-mouseDown:=20unexpected=20= part=20%ld\n",=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20(long)=20part);=0A= =20=20=20=20=20=20=20return;=0A=20=20=20=20=20}=0A=20=0Adiff=20--git=20= a/src/process.c=20b/src/process.c=0Aindex=20e65d495..99f57d3=20100644=0A= ---=20a/src/process.c=0A+++=20b/src/process.c=0A@@=20-1522,7=20+1522,7=20= @@=20list_processes_1=20(query_only)=0A=20=09=20=20=20=20insert_string=20= ("?");=0A=20=09=20=20if=20(INTEGERP=20(speed))=0A=20=09=20=20=20=20{=0A-=09= =20=20=20=20=20=20sprintf=20(tembuf,=20"=20at=20%d=20b/s",=20XINT=20= (speed));=0A+=09=20=20=20=20=20=20sprintf=20(tembuf,=20"=20at=20%ld=20= b/s",=20(long)=20XINT=20(speed));=0A=20=09=20=20=20=20=20=20= insert_string=20(tembuf);=0A=20=09=20=20=20=20}=0A=20=09=20=20= insert_string=20(")\n");=0Adiff=20--git=20a/src/unexmacosx.c=20= b/src/unexmacosx.c=0Aindex=20bb71d8f..489489d=20100644=0A---=20= a/src/unexmacosx.c=0A+++=20b/src/unexmacosx.c=0A@@=20-684,8=20+684,8=20= @@=20read_load_commands=20()=0A=20=09}=0A=20=20=20=20=20}=0A=20=0A-=20=20= printf=20("Highest=20address=20of=20load=20commands=20in=20input=20file:=20= %#8x\n",=0A-=09=20=20infile_lc_highest_addr);=0A+=20=20printf=20= ("Highest=20address=20of=20load=20commands=20in=20input=20file:=20= %#8lx\n",=0A+=09=20=20(long)=20infile_lc_highest_addr);=0A=20=0A=20=20=20= printf=20("Lowest=20offset=20of=20all=20sections=20in=20__TEXT=20= segment:=20%#8lx\n",=0A=20=09=20=20text_seg_lowest_offset);=0A--=20=0A= 1.6.4.1=0A=0A= --Apple-Mail-2--703527204 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Revised patch that fixes 10.5 building (removed the protocol specifications as noted by Eddie Hillenbrand) and removed the PSFlush () call as noted by Cheng Gao. Erik Charlebois erikcharlebois@gmail.com On 2009-09-08, at 1:14 AM, Erik Charlebois wrote: > <0001-Fixes-to-get-a-working-64-bit-Emacs-on-OS-X-10.6.patch><0002- > Fix-Changelogs.patch> > I've attached two patches (sorry about that, first time I used git > and I got the ChangeLogs wrong after committing :). I've tried to > make sure nothing's been introduced that would break pre-10.5 OS X > or GNUstep, but I don't have either of those systems to test with. > The bulk of the changes deal with deprecated Cocoa methods, LP64 > issues (printf specifiers, NSInteger/NSUInteger) and CGFloat being > double on 64-bit Cocoa. I've built/tested on 32- and 64-bit OS X 10.6. > > Erik Charlebois > erikcharlebois@gmail.com > > > > > On 2009-09-07, at 4:26 PM, David Reitter wrote: > >> Hi Erik, >> >> On Sep 7, 2009, at 5:08 PM, Erik Charlebois wrote: >> >>> I've posted the steps/fixes to get a 64-bit NS/Cocoa Emacs 23.1 >>> working for Snow Leopard on my blog at http://blog.fac9.com/index.php/2009/08/30/building-a-64-bit-emacs-on-snow-leopard/ >>> . I've been using it for a week without problems. >> >> Thanks, that's great news. >> >> Regarding your point 5: I did not redefine CGFloat when I tried to >> address these things; I'm not sure if it is necessary. You might >> be right. >> See this file >> >> http://github.com/davidswelt/aquamacs-emacs/blob/874784331f6e1bcfe319823616067bcf2432c29a/src/nsgui.h >> >> Would you be willing to post a patch with all of your changes? >> >> Thanks again >> - David >> > --Apple-Mail-2--703527204--