patchPSPP - Patches: patch #5731, Reduce platform dependence

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #5731: Reduce platform dependence

Submitter:  Ben Pfaff <blp>
Submitted:  Thu 08 Feb 2007 11:16:37 PM UTC
   
 
Category:  None Item Group:  None
Status:  Done Assigned to:  None
Open/Closed:  Closed

Mon 12 Feb 2007 02:12:34 AM UTC, comment #4: 

I checked this in, taking account of all the comments.

Ben Pfaff <blp>
Group administrator
Fri 09 Feb 2007 04:44:38 AM UTC, comment #3: 


>This is an improvement, but obviously there is more to be done.


Portability is a process, not a product...

>> Remove `stat-macros' module.
>Why did you do that? It no longer builds, since several files
>include stat-macros.h


stat-macros.h is not useful.  Its functionality has been subsumed by the sys_stat module.

I've now dropped #include "stat-macros.h" from everywhere it was included.

>While we're adjusting gl macros, can we get rid of strstr which no
>longer exists in gnulib ?


OK.

> I think it's easier to read, if you put the function inside the
> #if / #endifs


OK, done.

>I prefer this how it was before.


OK, done.  I changed this to:


/* Returns true iff NAME specifies an absolute file name. */
bool
fn_is_absolute (const char *name)
{
  return name[0] == '/';
}


We could check for \ under windows, but what's the proper test macro for that?  Should it be _WIN32_?

Ben Pfaff <blp>
Group administrator
Fri 09 Feb 2007 12:54:35 AM UTC, comment #2: 

This is an improvement, but obviously there is more to be done.

  Remove `stat-macros' module.

Why did you do that?  It no longer builds, since several files include stat-macros.h

While we're adjusting gl macros, can we get rid of strstr  which no longer exists in gnulib ?


 +/* Spawn an interactive shell process. */
 +static bool
  shell (void)
  {
 +#if HAVE_FORK && HAVE_EXECL
   int pid;
  
I think it's easier to read, if you put the function inside the #if / #endifs


 -  if (fn_is_absolute (name))
 +  if (name[0] == '/')
     return xstrdup (name);
    else
     {

I prefer this how it was before.  Especially, given the purpose of this patch, and that w32 doesn't use '/' to seperate directories.




John Darrington <jmd>
Group administrator
Fri 09 Feb 2007 12:49:55 AM UTC, comment #1: 

Works for me.

Jason H Stover <jstover>
Group Member
Thu 08 Feb 2007 11:16:37 PM UTC, original submission:  

This patch gets rid of the "unix" and "msdos" macros and all dependencies on them.

Ben Pfaff <blp>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #11945:  unix.patch added by blp (24KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jmd (Posted a comment)
  • -email is unavailable- added by jstover (Posted a comment)
  • -email is unavailable- added by blp (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-02-12 blp StatusReady For Test/Review Done
        Open/ClosedOpen Closed
    2007-02-08 blp Attached File- Added unix.patch, #11945

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code