From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: implement Solaris support for system-process-attributes and list-system-processes Date: Fri, 19 Dec 2008 11:51:09 -0800 (PST) Message-ID: <200812191951.mBJJp9oi016720@mothra.ics.uci.edu> References: <200812180916.mBI9GJtr012310@mothra.ics.uci.edu> <200812190745.mBJ7jWVe015085@mothra.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1229716305 27642 80.91.229.12 (19 Dec 2008 19:51:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 19 Dec 2008 19:51:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 19 20:52:50 2008 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 1LDlOo-0006pe-HI for ged-emacs-devel@m.gmane.org; Fri, 19 Dec 2008 20:52:38 +0100 Original-Received: from localhost ([127.0.0.1]:35752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDlNc-0001JE-5g for ged-emacs-devel@m.gmane.org; Fri, 19 Dec 2008 14:51:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDlNX-0001Hs-Ey for emacs-devel@gnu.org; Fri, 19 Dec 2008 14:51:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDlNX-0001HZ-0E for emacs-devel@gnu.org; Fri, 19 Dec 2008 14:51:19 -0500 Original-Received: from [199.232.76.173] (port=59765 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDlNW-0001HW-Rb for emacs-devel@gnu.org; Fri, 19 Dec 2008 14:51:18 -0500 Original-Received: from sallyv2.ics.uci.edu ([128.195.1.120]:36626) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1LDlNU-0000PY-6d; Fri, 19 Dec 2008 14:51:16 -0500 Original-Received: from mothra.ics.uci.edu (mothra.ics.uci.edu [128.195.6.93]) by sallyv2.ics.uci.edu (8.13.7+Sun/8.13.7) with ESMTP id mBJJpAq6012615; Fri, 19 Dec 2008 11:51:10 -0800 (PST) Original-Received: (from dann@localhost) by mothra.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id mBJJp9oi016720; Fri, 19 Dec 2008 11:51:09 -0800 (PST) In-Reply-To: (Eli Zaretskii's message of "Fri, 19 Dec 2008 10:35:48 +0200") Original-Lines: 56 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: mBJJpAq6012615 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.363, required 5, autolearn=disabled, ALL_TRUSTED -1.44, TW_OC 0.08) X-ICS-MailScanner-From: dann@mothra.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) 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:107073 Archived-At: Eli Zaretskii writes: > > Date: Thu, 18 Dec 2008 23:45:32 -0800 (PST) > > From: Dan Nicolaescu > > Cc: emacs-devel@gnu.org > > > > Eli Zaretskii writes: > > > > > > Date: Thu, 18 Dec 2008 01:16:19 -0800 (PST) > > > > From: Dan Nicolaescu > > > > > > > > #ifdef SOLARIS2 > > > > #if !defined (_LP64) && defined (_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64) > > > > #define PROCFS_FILE_OFFSET_BITS_HACK 1 > > > > #undef _FILE_OFFSET_BITS > > > > #else > > > > #define PROCFS_FILE_OFFSET_BITS_HACK 0 > > > > #endif > > > > #include > > > > #if PROCFS_FILE_OFFSET_BITS_HACK == 1 > > > > #define _FILE_OFFSET_BITS 64 > > > > #endif > > > > #endif /* SOLARIS2 */ > > > > > > > > procfs.h is the header file that contains the proc data structures, but > > > > it has an #error if compiled in 32 bit mode and _FILE_OFFSET_BITS is > > > > 64. > > > > emacs/src/config.in will define _FILE_OFFSET_BITS to 64 when compiled on > > > > a 32 bit solaris system. Hence the above hackery. > > > > > > Can this hackery be moved to a Solaris-specific header file in src/s/ ? > > > > That file is included everywhere, so it might not be a good idea at this point. > > It's just too ugly, so if there's a good place to hide it out of > sight, I'd be happier. I'll put it in sysdep.c just before the Solaris specific system_process_attributes implementation. > > How does this sound: > > - move the procfs_list_system_processes and procfs_system_process_attributes to sysdep.c > > - remove the procfs_ prefix > > - add the proper #defines (HAVE_PROCFS can probably be used by a few OSes) > > - the default implementations just return Qnil > > - make Fsystem_process_attributes and Flist_system_processes just call > > list_system_processes and system_process_attributes > > - rename the w32 versions to system_process_attributes and list_system_processes > > - remove the PROCATTR and LISTPROC macros > > ? > > Sounds good to me. Thanks. Done. I can't test on MSWindows, but hopefully didn't break anything. I'll add the Solaris changes in the next step.