getopt_long for IRIX

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
BSDero
Posts: 217
Joined: Thu Nov 24, 2005 9:11 am
Location: Aguascalientes, Mexico
Contact:

getopt_long for IRIX

Unread postby BSDero » Wed Jul 04, 2012 9:01 pm

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

User avatar
PymbleSoftware
Posts: 1887
Joined: Tue Jul 15, 2008 5:48 pm
Location: P.O. Box 121, Pymble, Sydney, NSW 2073, Australia.
Contact:

Re: getopt_long for IRIX

Unread postby PymbleSoftware » Wed Jul 04, 2012 10:17 pm

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

User avatar
canavan
Posts: 754
Joined: Mon Jul 21, 2003 6:19 am

Re: getopt_long for IRIX

Unread postby canavan » Thu Jul 05, 2012 11:49 am

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.

User avatar
PymbleSoftware
Posts: 1887
Joined: Tue Jul 15, 2008 5:48 pm
Location: P.O. Box 121, Pymble, Sydney, NSW 2073, Australia.
Contact:

Re: getopt_long for IRIX

Unread postby PymbleSoftware » Thu Jul 05, 2012 1:44 pm

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

User avatar
BSDero
Posts: 217
Joined: Thu Nov 24, 2005 9:11 am
Location: Aguascalientes, Mexico
Contact:

Re: getopt_long for IRIX

Unread postby BSDero » Wed Jul 11, 2012 8:08 am

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


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 1 guest