[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: implement Solaris support for system-process-attributes and list-sys
From: |
Dan Nicolaescu |
Subject: |
Re: implement Solaris support for system-process-attributes and list-system-processes |
Date: |
Thu, 18 Dec 2008 23:45:32 -0800 (PST) |
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.
> > 2. process.c has a function `procfs_list_system_processes' that works on
> > Solaris (and probably on all systems that use a /proc).
> > The problem is that procfs_list_system_processes is inside a #ifdef
HAVE_PROCFS
> > that contains a few other functions (time_from_jiffies, get_up_time)
> > that are Linux specific.
> > Should I move those functions inside a #ifdef LINUX ?
>
> I guess GNU_LINUX would be better, and perhaps move them to sysdep.c
> while at that.
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
?
- implement Solaris support for system-process-attributes and list-system-processes, Dan Nicolaescu, 2008/12/18
- Re: implement Solaris support for system-process-attributes and list-system-processes, Eli Zaretskii, 2008/12/18
- Re: implement Solaris support for system-process-attributes and list-system-processes,
Dan Nicolaescu <=
- Re: implement Solaris support for system-process-attributes and list-system-processes, Miles Bader, 2008/12/19
- Re: implement Solaris support for system-process-attributes and list-system-processes, Dan Nicolaescu, 2008/12/19
- Re: implement Solaris support for system-process-attributes and list-system-processes, Miles Bader, 2008/12/19
- Re: implement Solaris support for system-process-attributes and list-system-processes, Dan Nicolaescu, 2008/12/19