From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Re: #defines and MacOS X Date: Fri, 28 Oct 2005 11:28:43 +0900 Organization: Faculty of Science, Chiba University Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1130466596 21002 80.91.229.2 (28 Oct 2005 02:29:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2005 02:29:56 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 28 04:29:53 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EVJzN-00054q-34 for ged-emacs-devel@m.gmane.org; Fri, 28 Oct 2005 04:29:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVJzM-0003wA-Ik for ged-emacs-devel@m.gmane.org; Thu, 27 Oct 2005 22:29:04 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EVJz7-0003ui-Fn for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:28:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EVJz6-0003tJ-C5 for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:28:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EVJz6-0003tB-81 for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:28:48 -0400 Original-Received: from [133.82.132.2] (helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EVJz5-00039I-VT for emacs-devel@gnu.org; Thu, 27 Oct 2005 22:28:48 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id CEA6C2CA3; Fri, 28 Oct 2005 11:28:43 +0900 (JST) Original-To: Adrian Robert In-Reply-To: User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/22.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) 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:45003 Archived-At: >>>>> On Thu, 27 Oct 2005 13:18:31 -0400, Adrian Robert said: > One issue that comes up is #ifdef constant naming semantics, because > the both ports have historically assumed they are the only windowing > system port on the Mac, and therefore used constants like "MAC_OS" > to delineate their code. I'm not sure it is a good time to change them for Emacs 22, but their convention is actually inconsistent. > In particular, the Carbon port uses: I think there are some misunderstandings in this part. First, Mac OS Classic has Carbon and non-Carbon ports. The Carbon port is almost a superset of the non-Carbon one, but emulation of synchronous processes is not available on the former. Mac OS X currently has terminal-only, X11, and Carbon ports. Let me clarify the current situation using them. > MAC_OS > - sometimes relevant to all MacOS, but sometimes just relevant to the > Carbon port on 8/9 and X Classic/Carbon || Classic/non-Carbon || OSX/Carbon > MAC_OSX > - sometimes relevant to Darwin and/or OS X, but sometimes just > relevant to Carbon on OS X OSX/terminal || OSX/X11 || OSX/Carbon (Bare Darwin is not included.) > TARGET_API_MAC_CARBON > - relevant to Carbon port on OS X only Classic/Carbon || OSX/Carbon (It is automatically set when Carbon.h or Carbon/Carbon.h is included.) > USE_CARBON_EVENTS > - pertaining to historical use of differing event mechanisms in > Carbon on OS X I think it can be eliminated now (i.e., so that TARGET_API_MAC_CARBON always assumes USE_CARBON_EVENTS). > I want to change the use of MAC_OS and MAC_OSX to indicate the > operating system, not the GUI API used on it. Therefore, we would get: > MAC_OS_8, MAC_OS_9 > - non-graphical code relevant on MacOS 8/9 The current code does not distinguish Mac OS 8 from 9. Maybe MAC_OS_CLASSIC can be used here. > DARWIN > - non-graphical code relevant on MacOS X, as well as other Darwin > BSD distributions `DARWIN' should not be defined on Mac OS X because CoreFoundation.h uses it to distinguish Mac OS X from bare Darwin. > --------- > CLASSIC > - graphical code for MacOS 8/9 only > CARBON > - graphical code for MacOS X only I think the word `CLASSIC' is too general. And CLASSIC and CARBON are not the concepts at the same layer. What we'd like to distinguish is: - Between (Classic/Carbon or OSX/Carbon) and Classic/non-Carbon - Between OSX/Carbon and Classic/Carbon I think they can be achieved using standard macros TARGET_API_MAC_OS8, TARGET_API_MAC_OSX, and TARGET_API_MAC_CARBON. (Note that they can only be used on Classic/non-Carbon, Classic/Carbon and OSX/Carbon after a relevant header file is included). YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp