emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: implement Solaris support for system-process-attributes and list-sys


From: Eli Zaretskii
Subject: Re: implement Solaris support for system-process-attributes and list-system-processes
Date: Fri, 19 Dec 2008 10:35:48 +0200

> Date: Thu, 18 Dec 2008 23:45:32 -0800 (PST)
> From: Dan Nicolaescu <address@hidden>
> Cc: address@hidden
> 
> Eli Zaretskii <address@hidden> writes:
> 
>   > > Date: Thu, 18 Dec 2008 01:16:19 -0800 (PST)
>   > > From: Dan Nicolaescu <address@hidden>
>   > > 
>   > > #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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]