From: Eli Zaretskii <eliz@gnu.org>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org
Subject: Re: implement Solaris support for system-process-attributes and list-system-processes
Date: Fri, 19 Dec 2008 10:35:48 +0200 [thread overview]
Message-ID: <utz90ef4r.fsf@gnu.org> (raw)
In-Reply-To: <200812190745.mBJ7jWVe015085@mothra.ics.uci.edu>
> Date: Thu, 18 Dec 2008 23:45:32 -0800 (PST)
> From: Dan Nicolaescu <dann@ics.uci.edu>
> Cc: emacs-devel@gnu.org
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > > Date: Thu, 18 Dec 2008 01:16:19 -0800 (PST)
> > > From: Dan Nicolaescu <dann@ics.uci.edu>
> > >
> > > #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 <procfs.h>
> > > #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.
> 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.
Btw, it strikes me that the default implementation could return the
Emacs process instead of Qnil, but that can wait for another rainy
day.
next prev parent reply other threads:[~2008-12-19 8:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-18 9:16 implement Solaris support for system-process-attributes and list-system-processes Dan Nicolaescu
2008-12-18 20:22 ` Eli Zaretskii
2008-12-19 7:45 ` Dan Nicolaescu
2008-12-19 8:35 ` Eli Zaretskii [this message]
2008-12-19 19:51 ` Dan Nicolaescu
2008-12-20 12:10 ` Eli Zaretskii
2008-12-19 8:48 ` Miles Bader
2008-12-19 19:51 ` Dan Nicolaescu
2008-12-20 3:40 ` Miles Bader
2008-12-20 3:50 ` Dan Nicolaescu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=utz90ef4r.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.