bug-coreutils
[Top][All Lists]
Advanced

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

porting coreutils 5.2.1 to Interix


From: Mark Funkenhauser
Subject: porting coreutils 5.2.1 to Interix
Date: Sat, 27 Mar 2004 19:42:16 -0500

I've ported the coreutils to Interix.
Here are some of the problems I encountered:

configure:
  - around line 27329 - you exit if not getmntent/getmntinfo api is
found.
    There's a "FIXME" comment here.
    Interix doesn't provide any of these routines in their distribution
libraries.
    So configure exits.

    All I did was comment out the exit statements.
    I did not find any problems by doing this.  
    (although I didn't look too closely at the build output)


src/stat.c:
   [ see the attached  stat.c.diff file ]

   You assume (in configure - see HAVE_STRUCT_STATVFS_F_BASETYPE)
   that the struct statvfs contains the f_basetype member.
   This would be incorrect.

   You assume that all OS's have the statfs() function.
   This is incorrect. Interix only supports  statvfs().


src/mknod.c:
  - Interix defines a mkdev() macro, not a makedev() macro.
    The diff output is:

        193a194,197
        > #ifdef __INTERIX
        > #define makedev mkdev
        > #endif
        >

src/uname.c:
  - Interix has the processor name as a member of the struct utsname
    So I moved the declaration of 'name' into a more global scope
    so that is is accessible around line 266.

    The diff is:

        $ diff uname.c.orig uname.c
        151a152
        >   struct utsname name;
        224c225,230
        <         | PRINT_KERNEL_VERSION | PRINT_MACHINE))
        ---
        >         | PRINT_KERNEL_VERSION | PRINT_MACHINE
        > #ifdef __INTERIX
        >         | PRINT_PROCESSOR
        > #endif
        >
        >         ))
        226d231
        <       struct utsname name;
        261a267,271
        > #endif
        > #ifdef __INTERIX
        >       {
        >       element = name.processor;
        >       }

mark

Attachment: stat.c.diff
Description: Binary data


reply via email to

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