SGI: Development

getopt_long for IRIX

Hi guys!!

I was playing with my SGI and needed an Irix implementation of getopt_long(), so I got source code from NetBSD and OpenBSD and created a SGI version of it.

I tested an example program of getopt_long() I found in google and all seems works flawlessly :) , except by a one line change. However the behavior is same than gnu's getopt_long().

I got a tar with sources, header, Makefile and test program, it builds with MipsPro in Irix 6.5. If anybody interested, I would like to share this.
__Zacatito__ Image 600 MHZ R14000; 17GBytes HD
__Nopalito__ Image 200 MHZ R5000; 9GBytes HD
Guadalajara, Jal and Aguascalientes, Ags
Mexico
BSDero wrote: Hi guys!!

I was playing with my SGI and needed an Irix implementation of getopt_long(), so I got source code from NetBSD and OpenBSD and created a SGI version of it.

I tested an example program of getopt_long() I found in google and all seems works flawlessly :) , except by a one line change. However the behavior is same than gnu's getopt_long().

I got a tar with sources, header, Makefile and test program, it builds with MipsPro in Irix 6.5. If anybody interested, I would like to share this.


From memory there is/was something about this on the MIPS Pro nekochan wiki page.. if not I intended to put something on there at the same time I wrote the section on work arounds or porting or something like that..

EDIT
oh, wait nup.. that was the senenv/putenv thing .. I did have a solution for getopt_long() which I intended to put in a section after ..
http://www.nekochan.net/wiki/MIPS_Pro#s ... ng_in_IRIX

I think I did this when porting hercules IBM mainframe emulator to IRIX.. years ago..

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

Twitter @PymbleSoftware
Current Apps (iOS) -> https://itunes.apple.com/au/artist/pymb ... d553990081
(Android) https://play.google.com/store/apps/deve ... +Ltd&hl=en
(Onyx2) Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
(0300s) Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
An Implementation of getopt_long is part of gnulib http://www.gnu.org/software/gnulib/MODULES.html#module=getopt-posix . I usually just copy the source files into a suitable directory and add them to the list of .c-Files in the Makefile.
Updated to the wiki to point back here.... http://www.nekochan.net/wiki/MIPSpro#ge ... ng_in_IRIX

R.
死の神はりんごだけ食べる

開いた括弧は必ず閉じる -- あるプログラマー

:Tezro: :Tezro: :Onyx2R: :Onyx2RE: :Onyx2: :O3x04R: :O3x0: :O200: :Octane: :Octane2: :O2: :O2: :Indigo2IMP: :PI: :PI: :1600SW: :1600SW: :Indy: :Indy: :Indy: :Indy: :Indy:
:hpserv: J5600, 2 x Mac, 3 x SUN, Alpha DS20E, Alpha 800 5/550, 3 x RS/6000, Amiga 4000 VideoToaster, Amiga4000 -030, 733MHz Sam440 AmigaOS 4.1 update 1.

Sold: :Indy: :Indy: :Indy: :Indigo: Tandem Himalaya S-Series Nonstop S72000 ServerNet.

Twitter @PymbleSoftware
Current Apps (iOS) -> https://itunes.apple.com/au/artist/pymb ... d553990081
(Android) https://play.google.com/store/apps/deve ... +Ltd&hl=en
(Onyx2) Cortex ---> http://www.facebook.com/pages/Cortex-th ... 11?sk=info
(0300s) Minnie ---> http://www.facebook.com/pages/Minnie-th ... 02?sk=info
Github ---> https://github.com/pymblesoftware
In those GCC-isms related issues I've found *bsd source code easier to port and maintain witrhout all that flags and thinks like that. Source code is way easier to port, clear and maintain.
__Zacatito__ Image 600 MHZ R14000; 17GBytes HD
__Nopalito__ Image 200 MHZ R5000; 9GBytes HD
Guadalajara, Jal and Aguascalientes, Ags
Mexico