POSIX compatibility
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 800 from 2007/10/23
    From: Gelsenkirchen,...
    Hi!
    If you try to compile
    Code:
    #include <sys/socket.h>

    you also have to include
    Code:
    #include <sys/types.h>

    why?
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »29.06.16 - 07:20
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3092 from 2003/3/5
    From: Canada
    Likely due to an error in includes. I'm assuming you are compiling *without* -noixemul?
  • »29.06.16 - 13:25
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 800 from 2007/10/23
    From: Gelsenkirchen,...
    Ok, here comes a patch
    Code:
    --- include/sys/socket.h.bak	2016-06-05 23:04:57 +0100
    +++ include/sys/socket.h 2016-06-29 22:20:51 +0100
    @@ -38,6 +38,10 @@
    #ifndef _SYS_SOCKET_H_
    #define _SYS_SOCKET_H_

    +#ifndef _SYS_TYPES_H_
    +#include <sys/types.h>
    +#endif
    +
    /*
    * Definitions related to sockets: types, address families, options.
    */
    Next SDK:
    Please add the missing hpdf files.
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »29.06.16 - 22:48
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3092 from 2003/3/5
    From: Canada
    Quote:

    polluks wrote:
    Please add the missing hpdf files.


    No idea what those are, sorry. If something is missing that's up to the maintainer of a given module to add those to the SDK build.
  • »30.06.16 - 13:45
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    deka
    Posts: 136 from 2013/2/12
    From: Hungary, Kecsk...
    Is it possible to extend the SDK with man pages of the existing things? (Commands from Linux, developer stuff, ...)
  • »30.06.16 - 13:49
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3092 from 2003/3/5
    From: Canada
    Quote:

    deka wrote:
    Is it possible to extend the SDK with man pages of the existing things? (Commands from Linux, developer stuff, ...)


    Man pages for commands are part of the SDK. Did you check? Which one do you have in mind that seems missing?
  • »30.06.16 - 14:14
    Profile Visit Website
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    deka
    Posts: 136 from 2013/2/12
    From: Hungary, Kecsk...
    Quote:

    jacadcaps wrote:
    Quote:

    deka wrote:
    Is it possible to extend the SDK with man pages of the existing things? (Commands from Linux, developer stuff, ...)


    Man pages for commands are part of the SDK. Did you check? Which one do you have in mind that seems missing?


    All of them. Man command exists, but the pages for them aren't.
    memcpy, printf(3), the string handling commands, etc.
  • »30.06.16 - 15:32
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3092 from 2003/3/5
    From: Canada
    Quote:

    deka wrote:
    All of them. Man command exists, but the pages for them aren't.
    memcpy, printf(3), the string handling commands, etc.


    Those are in the Libnix.guide in the SDK documentation.
  • »30.06.16 - 15:58
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 800 from 2007/10/23
    From: Gelsenkirchen,...
    Quote:

    jacadcaps schrieb:
    Quote:

    polluks wrote:
    Please add the missing hpdf files.


    No idea what those are, sorry. If something is missing that's up to the maintainer of a given module to add those to the SDK build.



    Okay, it was Itix' job. However you can find it in Aminet.
    BTW LibNIX.guide is not complete anymore
    LibNIX.guide 373 ----rw-d 05-Jun-16 22:09:22
    LibNIX.guide 834583 ----rw-d 22-Jan-16 08:47:57


    [ Editiert durch polluks 30.06.2016 - 21:39 ]
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »30.06.16 - 18:27
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3092 from 2003/3/5
    From: Canada
    Quote:

    polluks wrote:
    Okay, it was Itix' job. However you can find it in Aminet.
    BTW LibNIX.guide is 373 bytes...


    It would seem that a wrong file made it into the build, damn :(

    [ Edited by jacadcaps 30.06.2016 - 15:43 ]
  • »30.06.16 - 18:36
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 800 from 2007/10/23
    From: Gelsenkirchen,...
    "Compiled by a robot slave of the MorphOS Team"? Seems to be a slave rebellion ;-)
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »30.06.16 - 19:38
    Profile
  • MorphOS Developer
    geit
    Posts: 1046 from 2004/9/23
    Quote:

    polluks wrote:
    "Compiled by a robot slave of the MorphOS Team"? Seems to be a slave rebellion ;-)


    Not again. We had issues with the apes already last year. Replaced them with robot slaves.
  • »30.06.16 - 20:00
    Profile
  • MorphOS Developer
    itix
    Posts: 1520 from 2003/2/24
    From: Finland
    Quote:

    polluks wrote:
    Quote:

    jacadcaps schrieb:
    Quote:

    polluks wrote:
    Please add the missing hpdf files.


    No idea what those are, sorry. If something is missing that's up to the maintainer of a given module to add those to the SDK build.



    Okay, it was Itix' job. However you can find it in Aminet.
    BTW LibNIX.guide is not complete anymore
    LibNIX.guide 373 ----rw-d 05-Jun-16 22:09:22
    LibNIX.guide 834583 ----rw-d 22-Jan-16 08:47:57


    [ Editiert durch polluks 30.06.2016 - 21:39 ]


    I try to remember HPDF files when I am back in Finland... :)
    1 + 1 = 3 with very large values of 1
  • »01.07.16 - 13:07
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 800 from 2007/10/23
    From: Gelsenkirchen,...
    Quote:

    itix schrieb:
    I try to remember HPDF files when I am back in Finland... :)

    Yeah, don´t let your pretty wife wait too long ;-)
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »02.07.16 - 00:15
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 565 from 2004/4/15
    BTW

    there also a little mistake in glut.h:

    it should be glutCreateWindow( const char* title );
    not glutCreateWindow( char* title );
    There is missing the "const".
    regards
    eliot
  • »06.07.16 - 06:02
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 800 from 2007/10/23
    From: Gelsenkirchen,...
    Quote:

    eliot schrieb:
    BTW

    there also a little mistake in glut.h:

    it should be glutCreateWindow( const char* title );
    not glutCreateWindow( char* title );
    There is missing the "const".



    This is not the only issue especially with C++
    Code:
    --- tgl/glu.h.bak       2016-01-22 09:43:05 +0100
    +++ tgl/glu.h 2016-03-06 17:29:37 +0100
    @@ -181,7 +181,7 @@
    #define gluOrtho2D(left, right, bottom, top) glOrtho(left, right,
    bottom, top, -1.0, 1.0)

    /* dummy added by Yomgui */
    -#define gluErrorString(x) "<gluErrorString() not implemented>"
    +#define gluErrorString(x) (GLubyte *)"<gluErrorString() not implemented>"

    #endif /* _NO_PPCINLINE */
    --- ppcinline/tinygl.h.bak 2015-06-19 13:50:17 +0000
    +++ ppcinline/tinygl.h 2015-08-30 15:58:22 +0000
    @@ -162,7 +162,7 @@
    (((void (*)(GLContext *, GLenum , const GLdouble *))*(void**)((long)(TINYGL_BASE_NAME) - 1162))(__p0, __p1, __p2))

    #define GLDrawElements(__p0, __p1, __p2, __p3, __p4)
    - (((void (*)(GLContext *, GLenum , GLsizei , GLenum , GLvoid *))*(void**)((long)(TINYGL_BASE_NAME) - 562))(__p0, __p1, __p2, __p3, __p4))
    + (((void (*)(GLContext *, GLenum , GLsizei , GLenum , const GLvoid *))*(void**)((long)(TINYGL_BASE_NAME) - 562))(__p0, __p1, __p2, __p3, __p4))

    #define GLTranslatef(__p0, __p1, __p2, __p3)
    (((void (*)(GLContext *, GLfloat , GLfloat , GLfloat ))*(void**)((long)(TINYGL_BASE_NAME) - 232))(__p0, __p1, __p2, __p3))
    @@ -321,7 +321,7 @@
    (((void (*)(GLContext *, GLenum , const GLfloat *))*(void**)((long)(TINYGL_BASE_NAME) - 1294))(__p0, __p1, __p2))

    #define GLCallLists(__p0, __p1, __p2, __p3)
    - (((void (*)(GLContext *, GLsizei , GLenum , GLvoid *))*(void**)((long)(TINYGL_BASE_NAME) - 892))(__p0, __p1, __p2, __p3))
    + (((void (*)(GLContext *, GLsizei , GLenum , const GLvoid *))*(void**)((long)(TINYGL_BASE_NAME) - 892))(__p0, __p1, __p2, __p3))

    #define GLLightf(__p0, __p1, __p2, __p3)
    (((void (*)(GLContext *, int , int , float ))*(void**)((long)(TINYGL_BASE_NAME) - 454))(__p0, __p1, __p2, __p3))
    @@ -729,7 +729,7 @@
    (((void (*)(GLContext *, GLint , GLint ))*(void**)((long)(TINYGL_BASE_NAME) - 550))(__p0, __p1, __p2))

    #define GLGetString(__p0, __p1)
    - (((GLbyte *(*)(GLContext *, GLenum ))*(void**)((long)(TINYGL_BASE_NAME) - 862))(__p0, __p1))
    + (((const GLubyte *(*)(GLContext *, GLenum ))*(void**)((long)(TINYGL_BASE_NAME) - 862))(__p0, __p1))

    #define GLUTMainLoop(__p0)
    (((void (*)(GLContext *))*(void**)((long)(TINYGL_BASE_NAME) - 718))(__p0))
    --- ./tgl/gl.h.bak 2015-06-19 13:50:18 +0000
    +++ ./tgl/gl.h 2015-07-02 12:16:46 +0000
    @@ -1176,7 +1176,7 @@

    void glFrontFace(int mode);

    -GLbyte *glGetString(GLenum tag);
    +const GLubyte *glGetString(GLenum tag);

    /* opengl 1.2 arrays */
    void glEnableClientState(GLenum array);
    @@ -1498,7 +1498,7 @@

    void GLFrontFace(GLContext *context, int mode);

    -GLbyte *GLGetString(GLContext *context, GLenum tag);
    +const GLubyte *GLGetString(GLContext *context, GLenum tag);

    /* opengl 1.2 arrays */



    [ Editiert durch polluks 07.07.2016 - 15:05 ]
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17", MorphOS 3.18
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.18
  • »06.07.16 - 20:44
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    Jupp3
    Posts: 1193 from 2003/2/24
    From: Helsinki, Finland
    Quote:

    This is not the only issue especially with C++

    It's not really C++ related, it happens on C too with sane compiler arguments & const pointers.
  • »11.07.16 - 17:10
    Profile Visit Website