LCDproc development and user support list

Text archives Help


[Lcdproc] lcdproc (client) completely ported to NetBSD.


Chronological Thread 
  • From: coto AT core.de (Thomas Runge)
  • Subject: [Lcdproc] lcdproc (client) completely ported to NetBSD.
  • Date: Thu Aug 14 10:26:02 2003

On Wed, 13 Aug 2003, Guillaume Filion wrote:

> I guess that would be a good idea. I hoped to have an autoconf style
> "check for features rather than OS," but it doesn't seem easy to do for
> the lcdproc client.

You're right, that will probably not work.

> I'd like to know how you plan for file naming. One way of doing it that
> comes to mind is something like batt-netbsd.h and batt-linux.h and have
> a batt.h including the right one. I can see one problem with this way
> of doing things, if for example macosx and freebsd use the same API for
> battery, do we make two identical files names batt-freebsd.h and
> batt-macosx.h, use one file named batt-freebsd-macsox.h, use
> batt-freebsd.h or something else?

No, a header is a contract about the interface. And the interface
must be the same for all platforms, it's just the implementation
that is different. So we will have something like batt.h and batt.c
that contains machine independent (MI) code (protocol handling etc.)
and one machine dependent (MD) file per supported OS which includes
all functions to get the statistics/values (lets call it
foo_<uname -s>.c). In addition there is a foo.h that defines the
MD functions (gets included by batt.c and MI friends). The
Makefile does the magic of only compiling the relevant
foo_<uname -s>.c file, possibly doing some magic by calling the
systems uname(1), assigning it to a variable and using that for
further processing.

If we have multiple OS's with the same interface, I'd simply copy
the file and use that. The interface of one OS might change in the
future, while the other stays the same or develops into another
direction. It's easy for the port maintainers to keep in sync.
Hmm, maybe we should assign names to the ports to the different
OS's, so we have a central point to send requests, suggestions
and/or complains.

As I was complaining about the current status for years (in the
beginning louder, resigning later), I'd volunteer to do the changes.
But keep in mind, that I have access to NetBSD boxes only. I need
a calm tester with some spare time for every other supported OS
or an account on such machine.

Thank you. :-)

--
Tom





Archive powered by MHonArc 2.6.18.

Top of page