unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* update-game-score
@ 2002-04-06  8:18 Eli Zaretskii
  2002-04-06  9:32 ` update-game-score Jason Rumney
  2002-04-07  0:18 ` update-game-score Colin Walters
  0 siblings, 2 replies; 12+ messages in thread
From: Eli Zaretskii @ 2002-04-06  8:18 UTC (permalink / raw)
  Cc: emacs-devel

IMHO, this code needs to take non-Posix platforms into consideration,
unless the intent is to run it only on Unix and GNU/Linux systems.

If non-Posix systems are relevant, you should be aware that <pwd.h>
and the getpwuid function are not universally available.  In fact,
AFAIK, getpwuid wasn't even part of Posix until very recently, so some
older Posix systems might not have it as well.  So some
autoconfiscation or system-dependent ifdef's are in order.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-06  8:18 update-game-score Eli Zaretskii
@ 2002-04-06  9:32 ` Jason Rumney
  2002-04-06 14:52   ` update-game-score Andrew Choi
  2002-04-06 17:03   ` update-game-score Eli Zaretskii
  2002-04-07  0:18 ` update-game-score Colin Walters
  1 sibling, 2 replies; 12+ messages in thread
From: Jason Rumney @ 2002-04-06  9:32 UTC (permalink / raw)
  Cc: Colin Walters, emacs-devel

"Eli Zaretskii" <eliz@is.elta.co.il> writes:

> IMHO, this code needs to take non-Posix platforms into consideration,
> unless the intent is to run it only on Unix and GNU/Linux systems.
> 
> If non-Posix systems are relevant, you should be aware that <pwd.h>
> and the getpwuid function are not universally available.

Can getpwuid etc be emulated on MSDOS and Mac as they are on Windows?


-- 
Jason Rumney

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-06  9:32 ` update-game-score Jason Rumney
@ 2002-04-06 14:52   ` Andrew Choi
  2002-04-06 15:06     ` update-game-score Jason Rumney
  2002-04-06 17:03   ` update-game-score Eli Zaretskii
  1 sibling, 1 reply; 12+ messages in thread
From: Andrew Choi @ 2002-04-06 14:52 UTC (permalink / raw)
  Cc: eliz, walters, emacs-devel

> > IMHO, this code needs to take non-Posix platforms into consideration,
> > unless the intent is to run it only on Unix and GNU/Linux systems.
> > 
> > If non-Posix systems are relevant, you should be aware that <pwd.h>
> > and the getpwuid function are not universally available.
> 
> Can getpwuid etc be emulated on MSDOS and Mac as they are on Windows?

Getpwuid is certainly available on Mac OS X.  Mac OS 9 implements a
limited form of multiple user support, so getpwuid can probably be
emulated on it.  Mac OS 8 does not have multiple user support.  I
suppose one can still emulate getpwuid with a little more effort.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-06 14:52   ` update-game-score Andrew Choi
@ 2002-04-06 15:06     ` Jason Rumney
  0 siblings, 0 replies; 12+ messages in thread
From: Jason Rumney @ 2002-04-06 15:06 UTC (permalink / raw)
  Cc: eliz, walters, emacs-devel

Andrew Choi <akochoi@shaw.ca> writes:

> Getpwuid is certainly available on Mac OS X.  Mac OS 9 implements a
> limited form of multiple user support, so getpwuid can probably be
> emulated on it.  Mac OS 8 does not have multiple user support.  I
> suppose one can still emulate getpwuid with a little more effort.

If there is no multiple user support, then getpwuid only needs to
emulate one user.  The Windows port also needs to deal with this for
Windows 9x, since only a subset of multi-user functionality is there.

-- 
Jason Rumney

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-06  9:32 ` update-game-score Jason Rumney
  2002-04-06 14:52   ` update-game-score Andrew Choi
@ 2002-04-06 17:03   ` Eli Zaretskii
  1 sibling, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2002-04-06 17:03 UTC (permalink / raw)
  Cc: walters, emacs-devel

> From: Jason Rumney <jasonr@gnu.org>
> Date: 06 Apr 2002 10:32:23 +0100
> 
> "Eli Zaretskii" <eliz@is.elta.co.il> writes:
> 
> > IMHO, this code needs to take non-Posix platforms into consideration,
> > unless the intent is to run it only on Unix and GNU/Linux systems.
> > 
> > If non-Posix systems are relevant, you should be aware that <pwd.h>
> > and the getpwuid function are not universally available.
> 
> Can getpwuid etc be emulated on MSDOS and Mac as they are on Windows?

DJGPP already has getpwuid in its library, so the problem doesn't
exist in the MS-DOS port.

If Windows doesn't have this problem, then I guess we only need to
worry about Unix systems that don't have this function.  I don't know
whether this is a practical consideration, just that the previous
Posix standard didn't define it.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-06  8:18 update-game-score Eli Zaretskii
  2002-04-06  9:32 ` update-game-score Jason Rumney
@ 2002-04-07  0:18 ` Colin Walters
  2002-04-11  7:06   ` update-game-score Colin Walters
  1 sibling, 1 reply; 12+ messages in thread
From: Colin Walters @ 2002-04-07  0:18 UTC (permalink / raw)


[ No need to CC me, by the way, since I read this list ]

On Sat, 2002-04-06 at 03:18, Eli Zaretskii wrote:
> IMHO, this code needs to take non-Posix platforms into consideration,
> unless the intent is to run it only on Unix and GNU/Linux systems.

Well, ok.  But I personally don't have (superuser) access to anything
besides Debian GNU/Linux, which makes testing it elsewhere difficult.

> If non-Posix systems are relevant, you should be aware that <pwd.h>
> and the getpwuid function are not universally available.  In fact,
> AFAIK, getpwuid wasn't even part of Posix until very recently, so some
> older Posix systems might not have it as well.  So some
> autoconfiscation or system-dependent ifdef's are in order.

Yeah. I imagine some system-dependent ifdefs will sneak in there.  But
at this point, it's still very much a work in progress...

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-07  0:18 ` update-game-score Colin Walters
@ 2002-04-11  7:06   ` Colin Walters
  2002-04-12 12:43     ` update-game-score Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Colin Walters @ 2002-04-11  7:06 UTC (permalink / raw)


On Sat, 2002-04-06 at 19:18, Colin Walters wrote:

> Yeah. I imagine some system-dependent ifdefs will sneak in there.  But
> at this point, it's still very much a work in progress...

Ok, I've committed the changes necessary to use it, and it seems to
work.  I'm not particularly satisfied with the implementation at this
point; the lib-src/Makefile has the names of the game score files
hardcoded, and "~/.emacs.d/games" is known to both gamegrid.el and
update-game-score.c.  

The former could probably be fixed by doing something like:

touch $(../src/emacs -batch -l ../lisp/play/tetris.el --eval '(princ
tetris-score-file)')

But doing that kind of makes me uncomfortable, because it's just sort of
hardcoding it a little bit less.  Any suggestions appreciated.

I think I know how to fix the latter correctly; will do so soon, but I
at least wanted to have something working in CVS.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-11  7:06   ` update-game-score Colin Walters
@ 2002-04-12 12:43     ` Eli Zaretskii
  2002-04-12 19:05       ` update-game-score Colin Walters
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2002-04-12 12:43 UTC (permalink / raw)
  Cc: emacs-devel

> From: Colin Walters <walters@verbum.org>
> Date: 11 Apr 2002 03:06:30 -0400
> 
> On Sat, 2002-04-06 at 19:18, Colin Walters wrote:
> 
> > Yeah. I imagine some system-dependent ifdefs will sneak in there.  But
> > at this point, it's still very much a work in progress...
> 
> Ok, I've committed the changes necessary to use it, and it seems to
> work.  I'm not particularly satisfied with the implementation at this
> point; the lib-src/Makefile has the names of the game score files
> hardcoded, and "~/.emacs.d/games" is known to both gamegrid.el and
> update-game-score.c.  

How about keeping the old code, both in gamegrid.el and in games that
use it, for non-Posix platforms that don't care about security
(Windows and MS-DOS)?  That would avoid the need to figure out where
to put the score files on systems where ${prefix}/var/games/emacs
cannot be taken for granted (and therefore creating files there at
"make install" time might not succeed).

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-12 12:43     ` update-game-score Eli Zaretskii
@ 2002-04-12 19:05       ` Colin Walters
  2002-04-13  9:40         ` update-game-score Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Colin Walters @ 2002-04-12 19:05 UTC (permalink / raw)


On Fri, 2002-04-12 at 08:43, Eli Zaretskii wrote:

> How about keeping the old code, both in gamegrid.el and in games that
> use it, for non-Posix platforms that don't care about security
> (Windows and MS-DOS)?  

Admittedly I haven't really used Windows in several years, but I thought
recent versions were multiuser-capable?  

But, I really don't know how to make update-game-score work on Windows,
so if no one else wants to do it, then I think we can just make a
conditional on system-type inside `gamegrid-add-score'.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2002-04-12 19:05       ` update-game-score Colin Walters
@ 2002-04-13  9:40         ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2002-04-13  9:40 UTC (permalink / raw)
  Cc: emacs-devel

> From: Colin Walters <walters@verbum.org>
> Date: 12 Apr 2002 15:05:15 -0400
> 
> On Fri, 2002-04-12 at 08:43, Eli Zaretskii wrote:
> 
> > How about keeping the old code, both in gamegrid.el and in games that
> > use it, for non-Posix platforms that don't care about security
> > (Windows and MS-DOS)?  
> 
> Admittedly I haven't really used Windows in several years, but I thought
> recent versions were multiuser-capable?  

They are; but the security support is (IIRC) nowhere as serious and
versatile as in Unix and GNU systems.

> But, I really don't know how to make update-game-score work on Windows,

I think it will work as-is on Windows, but the nuisance with finding a
place for the score file is something that needs to be resolved
regardless.

> I think we can just make a conditional on system-type inside
> `gamegrid-add-score'.

That's what I meant.  Please include ms-dos in that conditional; I'll
leave it up to Jason to say what should be done for the Windows port.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* update-game-score
@ 2003-04-03 10:36 Richard Stallman
  2003-04-07 16:53 ` update-game-score Benjamin Riefenstahl
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Stallman @ 2003-04-03 10:36 UTC (permalink / raw)


update-game-score uses the POSIX functions strerror and difftime
and seems to have no way to do without them.

Would someone like to make it work even if those functions are
missing?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: update-game-score
  2003-04-03 10:36 update-game-score Richard Stallman
@ 2003-04-07 16:53 ` Benjamin Riefenstahl
  0 siblings, 0 replies; 12+ messages in thread
From: Benjamin Riefenstahl @ 2003-04-07 16:53 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:
> update-game-score uses the POSIX functions strerror and difftime and
> seems to have no way to do without them.

Just a note: These two are in C89 also.  I am not sure if that makes a
difference for you.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2003-04-07 16:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-06  8:18 update-game-score Eli Zaretskii
2002-04-06  9:32 ` update-game-score Jason Rumney
2002-04-06 14:52   ` update-game-score Andrew Choi
2002-04-06 15:06     ` update-game-score Jason Rumney
2002-04-06 17:03   ` update-game-score Eli Zaretskii
2002-04-07  0:18 ` update-game-score Colin Walters
2002-04-11  7:06   ` update-game-score Colin Walters
2002-04-12 12:43     ` update-game-score Eli Zaretskii
2002-04-12 19:05       ` update-game-score Colin Walters
2002-04-13  9:40         ` update-game-score Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2003-04-03 10:36 update-game-score Richard Stallman
2003-04-07 16:53 ` update-game-score Benjamin Riefenstahl

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).