f



Unix / Linux Program Port to OS/2 with GCC and LIBC: HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment

Unix / Linux Program Port to OS/2 with GCC and LIBC:

HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment

Introduction by Example of the MPLAYER port

2007-07-16  22.00                                first draft



1. Introduction and Credits


The discussion of the MPlayer port comes up with the above subject.

Thanks to Dave Yeo for the hint to the subject
and the porting of the GNU  Core Utils ( 
http://www.gnu.org/software/coreutils/)

OS/2 port on Hobbes: 
http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutils_5.93



2.1 The Linux symbolic link function ( extract ) is introduced
     by the example of the MPlayer OS/2 port installation


2.2   Here are two of the directories / files  used by MPlayer

       ~/.mplayer          --> %MPLAYER_HOME%

       ~/.mplayer/font/    --> %MPLAYER_HOME%\font


2.3   Symbolic Link  to a file, a directory

       In the Linux implementation "Symbolic Link" can be used
       to define/reference the location / the font to be used for OSD

       Here is a description of the function symbolic link in Linux
       (part of it - excerpt )

       http://linux.about.com/od/commands/l/blcmdl1_ln.htm

         ln [OPTION]... TARGET [LINK_NAME]

       Here with mplayer it is used

         ln -s  TARGET LINK_NAME


       LINK_NAME used here with the example:

       for a file        "subfont"   located at  ~/.mplayer/subfont.fft

       for a directory   "font"      located at  ~/.mplayer/font


2.4  The LIBC Library of the GCC Compiler Project at Netlabs

      The Libc Library - Part of the GCC Compiler Project at Netlabs -
      ports  Linux functions to an OS/2 system.

      The ports take advantage of the OS/2 EA file system function to
      implement Linux file function not supported by the native OS/2 
environment.

      e.g. the file attributes, the symbolic link information of
      the Linux file system are stored in the EA.

      The ported Linux programs running on OS/2  uses the LIBC functions 
for the Linux function.

      The information stored in the EA is totally initializes and 
maintained by the
      LIBC functions.

      If you want to excess and handle this information, you have to use 
LIBC functions.


2.5  The port of the Linux command ln and ls ( part of the GNU Core 
Utils package)

      The GNU Core Utils has been ported with the GCC 3.5.5 and the LIBC 
6.3  Library.

      The ported ln function display the Linux file attributes and link 
formation stored
      in the EAs


      example:

        file:        ~/.mplayer/subfont.fft  --> %MPLAYER_HOME%\subfont.fft

        directory:   ~/.mplayer/font         --> %MPLAYER_HOME%\font


     The special file subfont.fft is an link/reference to the a real 
file with the TrueType font.


2.5.1  LN execution

        The assignment is done with  the ln command


         [S:\mplayer_home]ln -s L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF 
subfont.ttf


         Lets have a look at the results of the function:


2.5.2   dir

         [S:\mplayer_home]dir subfont.ttf

         Datentr�ger, Laufwerk S, hat den Namen VL_S_HPFS.
         Datentr�gernummer ist 298A:7814
         Verzeichnis von S:\mplayer_home

         16.07.07  18.23         36         175  subfont.ttf

             1 Datei(en)         36 Byte belegt
                          206073856 Byte frei

         36 bytes stored in the file and 175 bytes in the EA s of the file!


2.5.3  Type command executed with the special symbolic link file

        [S:\mplayer_home]type subfont.ttf

        L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF         <----------- 
contents of the file


2.5.4  OS/2 command: Type -ea    show the contents of the EA s

        [S:\mplayer_home]type -ea:subfont.ttf

        UID[CRITICAL EA](EAT_BINARY)
           00 00 00 00                                        ....
        GID[CRITICAL EA](EAT_BINARY)
           00 00 00 00                                        ....
        MODE[CRITICAL EA](EAT_BINARY)
           FF A1 00 00                                        ....
        INO[CRITICAL EA](EAT_BINARY)
           F5 82 BF 1C B2 B7 4A 6A                            ......Jj
        RDEV[CRITICAL EA](EAT_BINARY)
           00 00 00 00                                        ....
        GEN[CRITICAL EA](EAT_BINARY)
           00 00 00 00                                        ....
        FLAGS[CRITICAL EA](EAT_BINARY)
           00 00 00 00                                        ....
        SYMLINK[CRITICAL 
EA](EAT_ASCII)="L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF"


2.5.5  ls execution

        [S:\mplayer_home]S:\download\os2\GNU-Core-Utils\V5-93\bin\ls.exe -l

        total 129
        -rw-r--r-- 1 0 0    173 2007-07-13 19:03 config
        lrwxrwxrwx 1 0 0     36 2007-07-16 18:23 subfont.ttf -> 
L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF

        [S:\mplayer_home]


3.0   Conclusio

       With the ln and ls function - part of ported  GNU Core utils

       we have access of the Linux file function at OS/2 command level


4.0   Caveat - usage of the current port GNU Core Utils V5.93 readme.os2

       --> snip

       Most programs seem to work with at least the exceptions of 
touch.exe and du.exe
       unsure why as a previous build with an older version of GCC 3.3.5 
did work.
       Programs such as cp.exe, mv.exe have no EA support. I repeat 
moving files with
       cp or mv etc will see EAs get stripped.
       Of particular interest is symlink support for programs compiled 
with klibc such
       as Mplayer and most of Paul Smedleys ports. Also large files 
support should be
       enabled.

       --> snip




  Feedback??



Rainer



0
Rainer
7/16/2007 7:42:53 PM
comp.os.os2.multimedia 517 articles. 0 followers. Post Follow

8 Replies
2157 Views

Similar Articles

[PageSpeed] 39

Rainer Stroebel wrote:
> Unix / Linux Program Port to OS/2 with GCC and LIBC:
> 
> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
> 
> Introduction by Example of the MPLAYER port
> 
> 2007-07-16  22.00                                first draft
> 
> 
> 
> 1. Introduction and Credits
> 
> 
> The discussion of the MPlayer port comes up with the above subject.
> 
> Thanks to Dave Yeo for the hint to the subject
> and the porting of the GNU  Core Utils ( 
> http://www.gnu.org/software/coreutils/)
> 
> OS/2 port on Hobbes: 
> http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutils_5.93
> 
> 
> 
> 2.1 The Linux symbolic link function ( extract ) is introduced
>     by the example of the MPlayer OS/2 port installation
> 
> 
> 2.2   Here are two of the directories / files  used by MPlayer
> 
>       ~/.mplayer          --> %MPLAYER_HOME%
> 
>       ~/.mplayer/font/    --> %MPLAYER_HOME%\font
> 
> 
> 2.3   Symbolic Link  to a file, a directory
> 
>       In the Linux implementation "Symbolic Link" can be used
>       to define/reference the location / the font to be used for OSD
> 
>       Here is a description of the function symbolic link in Linux
>       (part of it - excerpt )
> 
>       http://linux.about.com/od/commands/l/blcmdl1_ln.htm
> 
>         ln [OPTION]... TARGET [LINK_NAME]
> 
>       Here with mplayer it is used
> 
>         ln -s  TARGET LINK_NAME
> 
> 
>       LINK_NAME used here with the example:
> 
>       for a file        "subfont"   located at  ~/.mplayer/subfont.fft
> 
>       for a directory   "font"      located at  ~/.mplayer/font
> 
> 
> 2.4  The LIBC Library of the GCC Compiler Project at Netlabs
> 
>      The Libc Library - Part of the GCC Compiler Project at Netlabs -
>      ports  Linux functions to an OS/2 system.
> 
>      The ports take advantage of the OS/2 EA file system function to
>      implement Linux file function not supported by the native OS/2 
> environment.
> 
>      e.g. the file attributes, the symbolic link information of
>      the Linux file system are stored in the EA.
> 
>      The ported Linux programs running on OS/2  uses the LIBC functions 
> for the Linux function.
> 
>      The information stored in the EA is totally initializes and 
> maintained by the
>      LIBC functions.
> 
>      If you want to excess and handle this information, you have to use 
> LIBC functions.
> 
> 
> 2.5  The port of the Linux command ln and ls ( part of the GNU Core 
> Utils package)
> 
>      The GNU Core Utils has been ported with the GCC 3.5.5 and the LIBC 
> 6.3  Library.
> 
>      The ported ln function display the Linux file attributes and link 
> formation stored
>      in the EAs
> 
> 
>      example:
> 
>        file:        ~/.mplayer/subfont.fft  --> %MPLAYER_HOME%\subfont.fft
> 
>        directory:   ~/.mplayer/font         --> %MPLAYER_HOME%\font
> 
> 
>     The special file subfont.fft is an link/reference to the a real file 
> with the TrueType font.
> 
> 
> 2.5.1  LN execution
> 
>        The assignment is done with  the ln command
> 
> 
>         [S:\mplayer_home]ln -s L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF 
> subfont.ttf
> 
> 
>         Lets have a look at the results of the function:
> 
> 
> 2.5.2   dir
> 
>         [S:\mplayer_home]dir subfont.ttf
> 
>         Datentr�ger, Laufwerk S, hat den Namen VL_S_HPFS.
>         Datentr�gernummer ist 298A:7814
>         Verzeichnis von S:\mplayer_home
> 
>         16.07.07  18.23         36         175  subfont.ttf
> 
>             1 Datei(en)         36 Byte belegt
>                          206073856 Byte frei
> 
>         36 bytes stored in the file and 175 bytes in the EA s of the file!
> 
> 
> 2.5.3  Type command executed with the special symbolic link file
> 
>        [S:\mplayer_home]type subfont.ttf
> 
>        L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF         <----------- contents 
> of the file
> 
> 
> 2.5.4  OS/2 command: Type -ea    show the contents of the EA s
> 
>        [S:\mplayer_home]type -ea:subfont.ttf
> 
>        UID[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        GID[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        MODE[CRITICAL EA](EAT_BINARY)
>           FF A1 00 00                                        ....
>        INO[CRITICAL EA](EAT_BINARY)
>           F5 82 BF 1C B2 B7 4A 6A                            ......Jj
>        RDEV[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        GEN[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        FLAGS[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        SYMLINK[CRITICAL 
> EA](EAT_ASCII)="L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF"
> 
> 
> 2.5.5  ls execution
> 
>        [S:\mplayer_home]S:\download\os2\GNU-Core-Utils\V5-93\bin\ls.exe -l
> 
>        total 129
>        -rw-r--r-- 1 0 0    173 2007-07-13 19:03 config
>        lrwxrwxrwx 1 0 0     36 2007-07-16 18:23 subfont.ttf -> 
> L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF
> 
>        [S:\mplayer_home]
> 
> 
> 3.0   Conclusio
> 
>       With the ln and ls function - part of ported  GNU Core utils
> 
>       we have access of the Linux file function at OS/2 command level
> 
> 
> 4.0   Caveat - usage of the current port GNU Core Utils V5.93 readme.os2
> 
>       --> snip
> 
>       Most programs seem to work with at least the exceptions of 
> touch.exe and du.exe
>       unsure why as a previous build with an older version of GCC 3.3.5 
> did work.
>       Programs such as cp.exe, mv.exe have no EA support. I repeat 
> moving files with
>       cp or mv etc will see EAs get stripped.
>       Of particular interest is symlink support for programs compiled 
> with klibc such
>       as Mplayer and most of Paul Smedleys ports. Also large files 
> support should be
>       enabled.
> 
>       --> snip
> 
> 
> 
> 
>  Feedback??
> 
> 
> 
> Rainer
> 
> 
> 

Was that a good upload? Hobbes shows a different size then I uploaded 
and being on slow dialup I haven't checked it yet
Dave
0
Dave
7/16/2007 11:28:38 PM
Dave Yeo schrieb:
> Rainer Stroebel wrote:
> 
>> Unix / Linux Program Port to OS/2 with GCC and LIBC:
>>
>> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
>>
>> Introduction by Example of the MPLAYER port
>>
>> 2007-07-16  22.00                                first draft
>>
>>
>>
>> 1. Introduction and Credits
>>
>>
>> The discussion of the MPlayer port comes up with the above subject.
>>
>> Thanks to Dave Yeo for the hint to the subject
>> and the porting of the GNU  Core Utils ( 
>> http://www.gnu.org/software/coreutils/)
>>
>> OS/2 port on Hobbes: 
>> http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutils_5.93
>>
>>

--> snip

> 
> Was that a good upload? Hobbes shows a different size then I uploaded 
> and being on slow dialup I haven't checked it yet
> Dave

Hallo Dave,

the file unziped without any error message.

[S:\download\os2\gnu-core-utils\v5-93]dir  coreutils_5.93.ZIP

  Datentr�ger, Laufwerk S, hat den Namen VL_S_HPFS.
  Datentr�gernummer ist 298A:7814
  Verzeichnis von S:\download\os2\gnu-core-utils\v5-93

16.07.07  16.40    9097305           0  coreutils_5.93.ZIP
          1 Datei(en)    9097305 Byte belegt
                     207008768 Byte frei

[S:\download\os2\gnu-core-utils\v5-93]


Rainer


0
Rainer
7/17/2007 12:03:42 AM
Rainer Stroebel schrieb:
> Dave Yeo schrieb:
> 
>> Rainer Stroebel wrote:
>>
>>> Unix / Linux Program Port to OS/2 with GCC and LIBC:
>>>
>>> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
>>>
>>> Introduction by Example of the MPLAYER port
>>>
>>> 2007-07-16  22.00                                first draft
>>>
>>>
>>>
>>> 1. Introduction and Credits
>>>
>>>
>>> The discussion of the MPlayer port comes up with the above subject.
>>>
>>> Thanks to Dave Yeo for the hint to the subject
>>> and the porting of the GNU  Core Utils ( 
>>> http://www.gnu.org/software/coreutils/)
>>>
>>> OS/2 port on Hobbes: 
>>> http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutils_5.93
>>>
>>>
> 
> --> snip
> 
>>
>> Was that a good upload? Hobbes shows a different size then I uploaded 
>> and being on slow dialup I haven't checked it yet
>> Dave
> 
> 
> Hallo Dave,
> 
> the file unziped without any error message.
> 
> [S:\download\os2\gnu-core-utils\v5-93]dir  coreutils_5.93.ZIP
> 
>  Datentr�ger, Laufwerk S, hat den Namen VL_S_HPFS.
>  Datentr�gernummer ist 298A:7814
>  Verzeichnis von S:\download\os2\gnu-core-utils\v5-93
> 
> 16.07.07  16.40    9097305           0  coreutils_5.93.ZIP
>          1 Datei(en)    9097305 Byte belegt
>                     207008768 Byte frei
> 
> [S:\download\os2\gnu-core-utils\v5-93]
> 
> 
> Rainer
> 
> 

MD5 sum:

36064C6588B0B13CDB136BBFAD6CDF78 *coreutils_5.93.ZIP


Rainer
0
Rainer
7/17/2007 12:17:47 AM
Rainer Stroebel wrote:
> Dave Yeo schrieb:
>> Rainer Stroebel wrote:
>>
>>> Unix / Linux Program Port to OS/2 with GCC and LIBC:
>>>
>>> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
>>>
>>> Introduction by Example of the MPLAYER port
>>>
>>> 2007-07-16  22.00                                first draft
>>>
>>>
>>>
>>> 1. Introduction and Credits
>>>
>>>
>>> The discussion of the MPlayer port comes up with the above subject.
>>>
>>> Thanks to Dave Yeo for the hint to the subject
>>> and the porting of the GNU  Core Utils ( 
>>> http://www.gnu.org/software/coreutils/)
>>>
>>> OS/2 port on Hobbes: 
>>> http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutils_5.93
>>>
>>>
> 
> --> snip
> 
>>
>> Was that a good upload? Hobbes shows a different size then I uploaded 
>> and being on slow dialup I haven't checked it yet
>> Dave
> 
> Hallo Dave,
> 
> the file unziped without any error message.
> 
> [S:\download\os2\gnu-core-utils\v5-93]dir  coreutils_5.93.ZIP
> 
>  Datentr�ger, Laufwerk S, hat den Namen VL_S_HPFS.
>  Datentr�gernummer ist 298A:7814
>  Verzeichnis von S:\download\os2\gnu-core-utils\v5-93
> 
> 16.07.07  16.40    9097305           0  coreutils_5.93.ZIP
>          1 Datei(en)    9097305 Byte belegt
>                     207008768 Byte frei
> 
> [S:\download\os2\gnu-core-utils\v5-93]
> 
> 
> Rainer
> 
> 
Interesting, over http hobbes shows the file being 8.68 MBs whereas over 
  ftp it shows the file being the right size. Plus the md5sum agrees.
Thanks for verifying before I deleted it and tried again
Dave
0
Dave
7/17/2007 2:13:36 AM
Rainer Stroebel wrote:
> Unix / Linux Program Port to OS/2 with GCC and LIBC:
> 
> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
> 
> Introduction by Example of the MPLAYER port
> 
> 2007-07-16  22.00                                first draft
> 
> 
> 
> 1. Introduction and Credits
> 
> 
> The discussion of the MPlayer port comes up with the above subject.
> 
> Thanks to Dave Yeo for the hint to the subject
> and the porting of the GNU  Core Utils ( 
> http://www.gnu.org/software/coreutils/)
> 
> OS/2 port on Hobbes: 
> http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutils_5.93
> 
> 
> 
> 2.1 The Linux symbolic link function ( extract ) is introduced
>     by the example of the MPlayer OS/2 port installation
> 
> 
> 2.2   Here are two of the directories / files  used by MPlayer
> 
>       ~/.mplayer          --> %MPLAYER_HOME%
> 
>       ~/.mplayer/font/    --> %MPLAYER_HOME%\font
> 
> 
> 2.3   Symbolic Link  to a file, a directory
> 
>       In the Linux implementation "Symbolic Link" can be used
>       to define/reference the location / the font to be used for OSD
> 
>       Here is a description of the function symbolic link in Linux
>       (part of it - excerpt )
> 
>       http://linux.about.com/od/commands/l/blcmdl1_ln.htm
> 
>         ln [OPTION]... TARGET [LINK_NAME]
> 
>       Here with mplayer it is used
> 
>         ln -s  TARGET LINK_NAME
> 
> 
>       LINK_NAME used here with the example:
> 
>       for a file        "subfont"   located at  ~/.mplayer/subfont.fft
> 
>       for a directory   "font"      located at  ~/.mplayer/font
> 
> 
> 2.4  The LIBC Library of the GCC Compiler Project at Netlabs
> 
>      The Libc Library - Part of the GCC Compiler Project at Netlabs -
>      ports  Linux functions to an OS/2 system.
> 
>      The ports take advantage of the OS/2 EA file system function to
>      implement Linux file function not supported by the native OS/2 
> environment.
> 
>      e.g. the file attributes, the symbolic link information of
>      the Linux file system are stored in the EA.
> 
>      The ported Linux programs running on OS/2  uses the LIBC functions 
> for the Linux function.
> 
>      The information stored in the EA is totally initializes and 
> maintained by the
>      LIBC functions.
> 
>      If you want to excess and handle this information, you have to use 
> LIBC functions.
> 
> 
> 2.5  The port of the Linux command ln and ls ( part of the GNU Core 
> Utils package)
> 
>      The GNU Core Utils has been ported with the GCC 3.5.5 and the LIBC 
> 6.3  Library.
> 
>      The ported ln function display the Linux file attributes and link 
> formation stored
>      in the EAs
> 
> 
>      example:
> 
>        file:        ~/.mplayer/subfont.fft  --> %MPLAYER_HOME%\subfont.fft
> 
>        directory:   ~/.mplayer/font         --> %MPLAYER_HOME%\font
> 
> 
>     The special file subfont.fft is an link/reference to the a real file 
> with the TrueType font.
> 
> 
> 2.5.1  LN execution
> 
>        The assignment is done with  the ln command
> 
> 
>         [S:\mplayer_home]ln -s L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF 
> subfont.ttf
> 
> 
>         Lets have a look at the results of the function:
> 
> 
> 2.5.2   dir
> 
>         [S:\mplayer_home]dir subfont.ttf
> 
>         Datentr�ger, Laufwerk S, hat den Namen VL_S_HPFS.
>         Datentr�gernummer ist 298A:7814
>         Verzeichnis von S:\mplayer_home
> 
>         16.07.07  18.23         36         175  subfont.ttf
> 
>             1 Datei(en)         36 Byte belegt
>                          206073856 Byte frei
> 
>         36 bytes stored in the file and 175 bytes in the EA s of the file!
> 
> 
> 2.5.3  Type command executed with the special symbolic link file
> 
>        [S:\mplayer_home]type subfont.ttf
> 
>        L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF         <----------- contents 
> of the file
> 
> 
> 2.5.4  OS/2 command: Type -ea    show the contents of the EA s
> 
>        [S:\mplayer_home]type -ea:subfont.ttf
> 
>        UID[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        GID[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        MODE[CRITICAL EA](EAT_BINARY)
>           FF A1 00 00                                        ....
>        INO[CRITICAL EA](EAT_BINARY)
>           F5 82 BF 1C B2 B7 4A 6A                            ......Jj
>        RDEV[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        GEN[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        FLAGS[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        SYMLINK[CRITICAL 
> EA](EAT_ASCII)="L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF"
> 
> 
> 2.5.5  ls execution
> 
>        [S:\mplayer_home]S:\download\os2\GNU-Core-Utils\V5-93\bin\ls.exe -l
> 
>        total 129
>        -rw-r--r-- 1 0 0    173 2007-07-13 19:03 config
>        lrwxrwxrwx 1 0 0     36 2007-07-16 18:23 subfont.ttf -> 
> L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF
> 
>        [S:\mplayer_home]
> 
> 
> 3.0   Conclusio
> 
>       With the ln and ls function - part of ported  GNU Core utils
> 
>       we have access of the Linux file function at OS/2 command level
> 
> 
> 4.0   Caveat - usage of the current port GNU Core Utils V5.93 readme.os2
> 
>       --> snip
> 
>       Most programs seem to work with at least the exceptions of 
> touch.exe and du.exe
>       unsure why as a previous build with an older version of GCC 3.3.5 
> did work.
>       Programs such as cp.exe, mv.exe have no EA support. I repeat 
> moving files with
>       cp or mv etc will see EAs get stripped.
>       Of particular interest is symlink support for programs compiled 
> with klibc such
>       as Mplayer and most of Paul Smedleys ports. Also large files 
> support should be
>       enabled.
> 
>       --> snip
> 
> 
> 
> 
>  Feedback??
> 
> 
> 
> Rainer
> 
> 
> 
Hi Rainer, a couple of points.
The ls -l example might be better to use ls -la The -a will also show 
hidden files which in *nix are files beginning with a dot.
Also you might want to mention that symlinks on OS/2 HPFS should be 
compatible with symlinks on Linux HPFS. Not sure about JFS and I haven't 
  tested with the newest CSD3 of klibc but I do know it was working.
I believe the UID GID etc functions are also compatible though IIRC 
Linux only writes them if the owner is not root.
Dave
0
Dave
7/17/2007 2:28:25 AM
Hello Dave,

thanks for the feedback.


Dave Yeo schrieb:
> Rainer Stroebel wrote:
> 
>> Unix / Linux Program Port to OS/2 with GCC and LIBC:
>>
>> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
>>
>> Introduction by Example of the MPLAYER port
>>
>> 2007-07-16  22.00                                first draft
>>
>>


---> snip


>>
>>
>>  Feedback??
>>
>>
>>
>> Rainer
>>
>>
>>

> Hi Rainer, a couple of points.
> The ls -l example might be better to use ls -la The -a will also show 
> hidden files which in *nix are files beginning with a dot.

Okay

this this an example output from my system:

[S:\Mplayer_home]S:\download\os2\GNU-Core-Utils\V5-93\bin\ls.exe -la
total 130
drwxrwxrwx 1 0 0      0 2007-07-08 02:05 .
drwxrwxrwx 1 0 0      5 2005-11-20 18:52 ..
-rw-r--r-- 1 0 0    173 2007-07-13 19:03 config
drwxrwxrwx 1 0 0      0 2007-07-12 19:10 fontxx
lrwxrwxrwx 1 0 0     36 2007-07-16 18:23 subfont.ttf -> 
L:\OS2\MDOS\WINOS2\SYSTE
M\ARIAL.TTF
-rw-rw-rw- 1 0 0 131072 1999-11-22 12:04 subfont.ttx

[S:\Mplayer_home]


What is the meaning of the first output line "total 130" ?


> Also you might want to mention that symlinks on OS/2 HPFS should be 
> compatible with symlinks on Linux HPFS. Not sure about JFS and I haven't 
>  tested with the newest CSD3 of klibc but I do know it was working.
> I believe the UID GID etc functions are also compatible though IIRC 
> Linux only writes them if the owner is not root.
> Dave

So the klibc under OS/2 and the Linux HPFS driver and the Linus JFS 
version are  working with the same data structure in the EA and the same 
set of conventions / rules how to use these fields :-)

So we have intersystem operability for these functions.

Rainer




0
Rainer
7/17/2007 11:04:08 AM
Rainer Stroebel wrote:
> Hello Dave,
> 
> thanks for the feedback.
> 
> 
> Dave Yeo schrieb:
>> Rainer Stroebel wrote:
>>
>>> Unix / Linux Program Port to OS/2 with GCC and LIBC:
>>>
>>> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
>>>
>>> Introduction by Example of the MPLAYER port
>>>
>>> 2007-07-16  22.00                                first draft
>>>
>>>
> 
> 
> ---> snip
> 
> 
>>>
>>>
>>>  Feedback??
>>>
>>>
>>>
>>> Rainer
>>>
>>>
>>>
> 
>> Hi Rainer, a couple of points.
>> The ls -l example might be better to use ls -la The -a will also show 
>> hidden files which in *nix are files beginning with a dot.
> 
> Okay
> 
> this this an example output from my system:
> 
> [S:\Mplayer_home]S:\download\os2\GNU-Core-Utils\V5-93\bin\ls.exe -la
> total 130
> drwxrwxrwx 1 0 0      0 2007-07-08 02:05 .
> drwxrwxrwx 1 0 0      5 2005-11-20 18:52 ..
> -rw-r--r-- 1 0 0    173 2007-07-13 19:03 config
> drwxrwxrwx 1 0 0      0 2007-07-12 19:10 fontxx
> lrwxrwxrwx 1 0 0     36 2007-07-16 18:23 subfont.ttf -> 
> L:\OS2\MDOS\WINOS2\SYSTE
> M\ARIAL.TTF
> -rw-rw-rw- 1 0 0 131072 1999-11-22 12:04 subfont.ttx
> 
> [S:\Mplayer_home]
> 
> 
> What is the meaning of the first output line "total 130" ?

Seems to be the size in kbs though not sure. Try ls -s, also ls --help | 
more.

> 
> 
>> Also you might want to mention that symlinks on OS/2 HPFS should be 
>> compatible with symlinks on Linux HPFS. Not sure about JFS and I 
>> haven't  tested with the newest CSD3 of klibc but I do know it was 
>> working.
>> I believe the UID GID etc functions are also compatible though IIRC 
>> Linux only writes them if the owner is not root.
>> Dave
> 
> So the klibc under OS/2 and the Linux HPFS driver and the Linus JFS 
> version are  working with the same data structure in the EA and the same 
> set of conventions / rules how to use these fields :-)
> 
> So we have intersystem operability for these functions.
> 
> Rainer
> 

I don't think Linux JFS uses EAs for symlinks, gid etc being originally 
a unix file system but I really don't know. I do know that Knut was 
aiming for compatibility with the Linux HPFS driver when he wrote the 
symlink support in klibc.
Dave
0
Dave
7/17/2007 3:19:32 PM
Rainer Stroebel schrieb:
> Unix / Linux Program Port to OS/2 with GCC and LIBC:
> 
> HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment
> 
> Introduction by Example of the MPLAYER port
> 
> 2007-07-16  22.00                                first draft
> 
> 
> 
> 1. Introduction and Credits
> 
> 
> The discussion of the MPlayer port comes up with the above subject.
> 
> Thanks to Dave Yeo for the hint to the subject
> and the porting of the GNU  Core Utils ( 
> http://www.gnu.org/software/coreutils/)
> 
> OS/2 port on Hobbes: 
> http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutils_5.93
> 
> 
> 
> 2.1 The Linux symbolic link function ( extract ) is introduced
>     by the example of the MPlayer OS/2 port installation
> 
> 
> 2.2   Here are two of the directories / files  used by MPlayer
> 
>       ~/.mplayer          --> %MPLAYER_HOME%
> 
>       ~/.mplayer/font/    --> %MPLAYER_HOME%\font
> 
> 
> 2.3   Symbolic Link  to a file, a directory
> 
>       In the Linux implementation "Symbolic Link" can be used
>       to define/reference the location / the font to be used for OSD
> 
>       Here is a description of the function symbolic link in Linux
>       (part of it - excerpt )
> 
>       http://linux.about.com/od/commands/l/blcmdl1_ln.htm
> 
>         ln [OPTION]... TARGET [LINK_NAME]
> 
>       Here with mplayer it is used
> 
>         ln -s  TARGET LINK_NAME
> 
> 
>       LINK_NAME used here with the example:
> 
>       for a file        "subfont"   located at  ~/.mplayer/subfont.fft
> 
>       for a directory   "font"      located at  ~/.mplayer/font
> 
> 
> 2.4  The LIBC Library of the GCC Compiler Project at Netlabs
> 
>      The Libc Library - Part of the GCC Compiler Project at Netlabs -
>      ports  Linux functions to an OS/2 system.
> 
>      The ports take advantage of the OS/2 EA file system function to
>      implement Linux file function not supported by the native OS/2 
> environment.
> 
>      e.g. the file attributes, the symbolic link information of
>      the Linux file system are stored in the EA.
> 
>      The ported Linux programs running on OS/2  uses the LIBC functions 
> for the Linux function.
> 
>      The information stored in the EA is totally initializes and 
> maintained by the
>      LIBC functions.
> 
>      If you want to excess and handle this information, you have to use 
> LIBC functions.
> 
> 
> 2.5  The port of the Linux command ln and ls ( part of the GNU Core 
> Utils package)
> 
>      The GNU Core Utils has been ported with the GCC 3.5.5 and the LIBC 
> 6.3  Library.
> 
>      The ported ln function display the Linux file attributes and link 
> formation stored
>      in the EAs
> 
> 
>      example:
> 
>        file:        ~/.mplayer/subfont.fft  --> %MPLAYER_HOME%\subfont.fft
> 
>        directory:   ~/.mplayer/font         --> %MPLAYER_HOME%\font
> 
> 
>     The special file subfont.fft is an link/reference to the a real file 
> with the TrueType font.
> 
> 
> 2.5.1  LN execution
> 
>        The assignment is done with  the ln command
> 
> 
>         [S:\mplayer_home]ln -s L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF 
> subfont.ttf
> 
> 
>         Lets have a look at the results of the function:
> 
> 
> 2.5.2   dir
> 
>         [S:\mplayer_home]dir subfont.ttf
> 
>         Datentr�ger, Laufwerk S, hat den Namen VL_S_HPFS.
>         Datentr�gernummer ist 298A:7814
>         Verzeichnis von S:\mplayer_home
> 
>         16.07.07  18.23         36         175  subfont.ttf
> 
>             1 Datei(en)         36 Byte belegt
>                          206073856 Byte frei
> 
>         36 bytes stored in the file and 175 bytes in the EA s of the file!
> 
> 
> 2.5.3  Type command executed with the special symbolic link file
> 
>        [S:\mplayer_home]type subfont.ttf
> 
>        L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF         <----------- contents 
> of the file
> 
> 
> 2.5.4  OS/2 command: Type -ea    show the contents of the EA s
> 
>        [S:\mplayer_home]type -ea:subfont.ttf
> 
>        UID[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        GID[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        MODE[CRITICAL EA](EAT_BINARY)
>           FF A1 00 00                                        ....
>        INO[CRITICAL EA](EAT_BINARY)
>           F5 82 BF 1C B2 B7 4A 6A                            ......Jj
>        RDEV[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        GEN[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        FLAGS[CRITICAL EA](EAT_BINARY)
>           00 00 00 00                                        ....
>        SYMLINK[CRITICAL 
> EA](EAT_ASCII)="L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF"
> 
> 
> 2.5.5  ls execution
> 
>        [S:\mplayer_home]S:\download\os2\GNU-Core-Utils\V5-93\bin\ls.exe -l
> 
>        total 129
>        -rw-r--r-- 1 0 0    173 2007-07-13 19:03 config
>        lrwxrwxrwx 1 0 0     36 2007-07-16 18:23 subfont.ttf -> 
> L:\OS2\MDOS\WINOS2\SYSTEM\ARIAL.TTF
> 
>        [S:\mplayer_home]
> 
> 
> 3.0   Conclusio
> 
>       With the ln and ls function - part of ported  GNU Core utils
> 
>       we have access of the Linux file function at OS/2 command level
> 
> 
> 4.0   Caveat - usage of the current port GNU Core Utils V5.93 readme.os2
> 
>       --> snip
> 
>       Most programs seem to work with at least the exceptions of 
> touch.exe and du.exe
>       unsure why as a previous build with an older version of GCC 3.3.5 
> did work.
>       Programs such as cp.exe, mv.exe have no EA support. I repeat 
> moving files with
>       cp or mv etc will see EAs get stripped.
>       Of particular interest is symlink support for programs compiled 
> with klibc such
>       as Mplayer and most of Paul Smedleys ports. Also large files 
> support should be
>       enabled.
> 
>       --> snip
> 
> 
> 
> 
>  Feedback??
> 
> 
> 
> Rainer
> 
> 
> 

Hello

the OS/2 port of  verion 6.9   GNU Core Utils  are new on Hobbes


http://hobbes.nmsu.edu/cgi-bin/h-search?key=coreutil&pushbutton=Search


The commands  ln and ls are usefull  by  setting a symlink.


kind regards


Rainer
0
Rainer
7/28/2007 9:30:20 AM
Reply:

Similar Artilces:

OS/2 User Criticized for not using the "Correct Version" of OS/2!
I was criticized by Tim Martin for not using the newest version of OS/2 ( which I have by the way), but I had the temerity to post from an IBM PS/2 machine with Warp 4 FP 12! I could have posted from another IBM machine with WarpConnect, or even tried OS/2 2.1 with TCPIP 2.0 and NR/2, or my iMac or any other machine I had on hand at the moment. I was called an eCS Luser because I chose to post with my personal choice of OS/2 and not Mr. Martin's. Perhaps my collection of OS/2 should be increased by adding eCS, I know that I could get the upgrade price what with all the ver...

[News] UNIX/Linux Called Real OS; Windows "Insufficient OS"
Why *I* like Linux and Unix (and Mac OS X too!) ,----[ Quote ] | But there's more. There's what we call the "Unix Philosophy", which is that | small tools should do one thing and do it well, while being designed so that | they can get whatever input they need from the output of something else and | vice versa. It's pipelines, stringing together little tools to get big | results. Windows programs just are NOT written with that in mind - if they do | allow command line use at all, they spit out too much on the output side and | aren't even smart enough to do so o...

Offering FREE the promotional video tape: "OS/2 v2.0: Moving to the OS/2 Workplace Shell"
When OS/2 v2.0 was first released. IBM felt it was necessary to give a gift package to the lucky purchasers in order to induce people to take the leap. This package contained a video cartridge ("OS/2 2.0 - Moving to the OS/2 Workplace Shell"), a Parker ballpoint pen, and a mousepad (the latter two items decorated with a tasteful multicolored OS/2 logo"). The pen and the mousepad are long gone, but I still have the video cartridge. I do not have a video tapedeck, and I never did: the tape has been played exactly once, when I let a friend view it (he later went...

Big Mac Hoax 2: "OS X is Unix"
In <mr-50F129.16323212072006@individual.net> Sandman <mr@sandman.net> writes: > <lHO$>f0Bei"4a_%)"c6TQ+P/:53>;PNGuWUmkqyeN-qM65foJ[;T_(k;>]&G\T4Lhm:2 > ujye2_,iUJFE;NZn>y;.|-hl7g~bIOF1qG\o<?]4mXkW*mT3]{Bn&VwP7(M0uYnGA!V!? > {"y?BkBDW6e-.=I5 >Xref: panix comp.sys.mac.advocacy:1309715 >In article <e92joo$dru$1@reader2.panix.com>, > kj <socyl@987jk.com.invalid> wrote: >> Hi everyone. Ever since Apple announced its switch to Unix, I've >> been curious/tempted to give it a t...

Drivers: MultiMac Intel PCIe Gigabit Ethernet Adapter &quot;OS/2 Community&quot; Driver for OS/2 &amp; eCS V0.1.6
++ From the VOICE OS/2-eCS News Service http://www.os2voice.org ++ From: madodelDESPAM@DESPAMptdprolog.net On hobbes there is a new OS/2 NDIS2 network driver for the Intel PCIe Gigabit Ethernet Adapter. A debug version of the driver is included. This is part of the Multimac network driver project. The Standard MAC Driver Project for eComStation "This is an NDIS driver for Intel Gigabit PCI-Express LAN adapters. This driver is based on the source code of e1000e Linux kernel module and of nveth NVIDIA NIC driver for OS/2 developed by nickk." According to the project we...

Re: Boot from USB PRM (Partitioned Removable Media ) failed after loading OS2LVM.DMD error: "OS/2 is unable to operate OS/2 is unable to operate your hard disk or diskette drive"
For the knowledge base: add to the thread 3 month old Done a test with an T41 ( with USB 2.0 port ) and USB 2.0 Cardreader! Result: Error "OS/2 is unable ......" Next step in test: 1. Downgrade the drive to the level Mike Luther works with!! Do a test boot form CF Card 2. recreate the test results ( Mike Luther) with boot form usb diskette. kind regards Rainer Rainer Stroebel schrieb: > > For the knowledge base: add to the thread 3 month old cross post of the info from comp.os.so2.apps Thread : How to boot OS/2 4.52 (to a ...

*tuple vs tuple example print os.path.join(os.path.dirname(os.tmpnam()),*("a","b","c"))
I have been trying to find documentation on the behavior Can anyone tell me why the first example works and the second doesn't and where I can read about it in the language reference? Steve print os.path.join(os.path.dirname(os.tmpnam()),*("a","b","c")) #works OUTPUT:/var/tmp/a/b/c and print os.path.join(os.path.dirname(os.tmpnam()),("a","b","c")) # doesn't OUTPUT:Traceback (most recent call last): File "<stdin>", line 1, in ? File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/pyth...

"Real OS" vs. "Toy OS"
Over in the 'Best thing about Linux' thread, Kelsey Bjarnason wrote: > Amazing what using a real OS instead of a toy can do. Given that this opinion is shared by most or all of you Linux weirdos, it must burn you to no end that a "toy" OS (WindowsXP): * can sell 200,000,000 copies - but you have to crow for months when Munich Germany installs just 14,000 * that nearly every PC vendor in the world offers it pre-loaded - but when you ask about Linux over the phone you're met with "Lin what?" or silence or sometimes a click and then silence. * that you...

[News] Linux 2.6.32 in Review, "Linux is Not an OS"
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kernel Log: Coming in 2.6.32 (Part 5) - Architecture code, memory management, virtualisation and tracing ,----[ Quote ] | The forthcoming kernel version will support | Intel's Moorestown platform, SFI - the | alternative to ACPI, and the Trusted | Execution Technology, which used to be | called "LaGrande Technology". If required, | the new KSM can now reduce memory loads by | combining identical memory content in | virtual machines. The new kernel also | includes Timechart, a new tool for | visualising what's going on i...

ANN:Fve Ver5.2 (Editor for "Mac OS X"/Cygwin/Unix/Windows) Tcl/Tk script
Fve Ver5.2 (Editor for "Mac OS X"/Cygwin/Unix/Windows) Tcl/Tk script (File Viewer Editor_Version Fve 5.2) http://www.ne.jp/asahi/kazuo/sasagawa/ For Tcl/Tk 8.4,8.5: TclTkAqua 8.4: Tcl/Tk-cygwin 8.4. Please use ActiveTcl 8.4.18 binary packages or "TclTkAqua 8.4.10 binary packages". *Changes(Version5.2) 1 Added a "Customizing key bingings" item to Tools_Menu. 2 Added several bindings for Mac OS X. Command-a -> Select all Command-c -> Copy Command-e -> Use Selection for Find Command-f -> Find Command-g -> Find Next Command-i -...

Can't install OS 9.2.2 on G4 (""This software cannot run on this computer.")
My OS 9 installer refuses to run on my G4!� I have a 1.25 GHz G4 with 512MB RAM, running Panther, no OS 9 installed.� I decided that I would go ahead and install OS 9, as there is one legacy app I occasionally need.� I don't have the original OS 9 install disk that came with the computer, but I do have an OEM 9.2.2 disk I bought on Megamacs.com� I know the disk is OK, because I've tried it on a slightly older G4 and the installer runs.� But when I boot from the CD on my new G4, and try to run the installer, I get a message that says "This software cannot run on this comput...

Problem linking with gfortran v4.9.2 on OS X Yosemite: 'Undefined symbol "start"' problem
Hello, I posted to the gfortran mailing list but haven't received a reply so I thought I'd toss it out to the newsgroup to see if anyone had encountered (and solved) this problem. I installed gfortran 4.9.2 for Yosemite on my mac. The install was quick and easy as always (Thanks FX!). Compilation works, but when I reach the linking phase I get the following error: Undefined symbols for architecture x86_64: "start", referenced from: -u command line option ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status mak...

How to open "Unix" files in "OS X" apps?
Is there a way to open text files that are part of the BSD subsystem using regular old OS X apps? I'd love to be able to edit crontab, make.conf (I've installed Gentoo OS X), but I can't navigate to the Unix directories in the Open Dialog boxes, and the Finder's Find... won't find them either. -- A: No. See: Help, I'm <http://www.netmeister.org/news/learn2quote.html> being held <http://www.greenend.org.uk/rjk/2000/06/14/quoting> in a .sig Q: Should I include...

MPlayer / Gnash OS/2 Port: Howto pass the parameter value from "Firefox add onMPC Media PlayerConnectivity" to the MPalyer.cmd / gnash.cmd
MPlayer / Gnash OS/2 Port: Howto pass the parameter value from "Firefox add on MPC Media PlayerConnectivity" to the MPalyer.cmd / gnash.cmd ======================================================================================================== First draft status: 2007-08-09 Rainer Software ========= Firefox 2.0.0.6 Firefox Add on MPC MediaPlayerConnectivity 0.8.3 https://addons.mozilla.org/en-US/firefox/addon/446 OS/2 with standard command processor cmd.exe Command procedures gnash.cmd and mplayer.cmd used by MPC to call the player with pa...

Web resources about - Unix / Linux Program Port to OS/2 with GCC and LIBC: HowTo Support / Use of Unix Function "Symbolic Link" in OS/2 Environment - comp.os.os2.multimedia

Resources last updated: 2/4/2016 2:32:57 PM