SDL 2.0 ABI locked

Hahah, no, not quite yet. :)On Thu, Mar 14, 2013 at 10:27 AM, Ryan C. Gordon wrote:

No, not yet. Let’s get a release out first. :slight_smile:

Oh, I thought this was a release. :slight_smile:

–ryan.

_____________**
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.orghttp://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Since SDL2 is not released yet, is it possible to change SDL_GL_BindTexture so that the created texture’s coordinates range from 0 to 1 linearly ?

Just an idea…------------------------
C is the God’s Programming Language

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :> Since SDL2 is not released yet, is it possible to change SDL_GL_BindTexture

so that the created texture’s coordinates range from 0 to 1 linearly ?

Just an idea…


C is the God’s Programming Language

2013/3/15 neoaggelos

**
Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture so that the created texture’s coordinates range from 0
to 1 linearly ?

Just an idea…


C is the God’s Programming Language


If you mean that some textures’ coordinates range from 0.0 to 1.0 while
others range from 0 to width and 0 to height, it’s an OpenGL ARB extension
thing, there’s not much we can do.–
Gabriel.

Sik wrote:> Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly ?

Just an idea…


C is the God’s Programming Language


Well, I know, but for someone that uses many textures in his programs and relies upon this
will most probably not be that happy.

Having a standard value will make it easier
_
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


C is the God’s Programming Language

Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly ?

Just an idea…

Well, I know, but for someone that uses many textures in his programs and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.> Date: Fri, 15 Mar 2013 12:45:54 -0700

From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly ?

Just an idea…

Well, I know, but for someone that uses many textures in his programs and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I think this is a great idea, if someone has the time to do the work…On Sunday, March 17, 2013 at 4:19 PM, Alexey Petruchik wrote:

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.

On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox <absinthdraco at gmail.com (mailto:absinthdraco at gmail.com)> wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos” <neoaggelos at yahoo.gr (mailto:neoaggelos at yahoo.gr)>
To: sdl at lists.libsdl.org (mailto:sdl at lists.libsdl.org)
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org (mailto:1363376754.m2f.36087 at forums.libsdl.org)>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos <neoaggelos at yahoo.gr (mailto:neoaggelos at yahoo.gr)>:

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly ?

Just an idea…

Well, I know, but for someone that uses many textures in his programs and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org (mailto:SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org (mailto:SDL at lists.libsdl.org)
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Mostly because they’re everywhere in SDL code. You’re welcome to use the
stdint types in your own code, and if you look in SDL_stdinc.h you’ll see
the SDL types are defined in terms of them.On Sun, Mar 17, 2013 at 9:19 AM, Alexey Petruchik wrote:

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.

On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly
?

Just an idea…

Well, I know, but for someone that uses many textures in his programs
and

relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

you’ll see the SDL types are defined in terms of them.
That’s why I think they are useless and can be painlessly removed :slight_smile:
And it would be great if SDL will encourage everyone to use stdint.h
types.On Sun, Mar 17, 2013 at 7:25 PM, Sam Lantinga wrote:
Mostly because they’re everywhere in SDL code. You’re welcome to use the
stdint types in your own code, and if you look in SDL_stdinc.h you’ll see
the SDL types are defined in terms of them.

On Sun, Mar 17, 2013 at 9:19 AM, Alexey Petruchik wrote:

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.

On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly
?

Just an idea…

Well, I know, but for someone that uses many textures in his programs
and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

In the bizarro-land known as the real-world development cycle, a lot of people are still using Microsoft Visual Studio 2008, which lacks stdint.h (as I discovered when attempting to use ffmpeg headers
in an app and wound up having to modify them all to not depend on stdint.h).

I agree stdint.h is a good thing, it just has complications in practice still.On 03/17/2013 09:56 AM, Alexey Petruchik wrote:

you’ll see the SDL types are defined in terms of them.
That’s why I think they are useless and can be painlessly removed :slight_smile:
And it would be great if SDL will encourage everyone to use stdint.h
types.

On Sun, Mar 17, 2013 at 7:25 PM, Sam Lantinga wrote:

Mostly because they’re everywhere in SDL code. You’re welcome to use the
stdint types in your own code, and if you look in SDL_stdinc.h you’ll see
the SDL types are defined in terms of them.

On Sun, Mar 17, 2013 at 9:19 AM, Alexey Petruchik wrote:

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.

On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly
?

Just an idea…

Well, I know, but for someone that uses many textures in his programs
and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier

The simplest solution for those who are forced to use older compilers missing
the header is to add your own stdint.h, either by hand, or by copying an
existing one. That way, the problem of the missing header does not infect your
code. Your code can use the modern types yet remain portable to older compilers.On 03/17/2013 01:21 PM, Forest Hale wrote:

In the bizarro-land known as the real-world development cycle, a lot of people are still using Microsoft Visual Studio 2008, which lacks stdint.h (as I discovered when attempting to use ffmpeg headers
in an app and wound up having to modify them all to not depend on stdint.h).

I agree stdint.h is a good thing, it just has complications in practice still.

On 03/17/2013 09:56 AM, Alexey Petruchik wrote:

you’ll see the SDL types are defined in terms of them.
That’s why I think they are useless and can be painlessly removed :slight_smile:
And it would be great if SDL will encourage everyone to use stdint.h
types.

On Sun, Mar 17, 2013 at 7:25 PM, Sam Lantinga wrote:

Mostly because they’re everywhere in SDL code. You’re welcome to use the
stdint types in your own code, and if you look in SDL_stdinc.h you’ll see
the SDL types are defined in terms of them.

On Sun, Mar 17, 2013 at 9:19 AM, Alexey Petruchik wrote:

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.

On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1 linearly
?

Just an idea…

Well, I know, but for someone that uses many textures in his programs
and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

http://snipplr.com/view/18199/stdinth/

Cheers,

AndreOn 17/03/2013 15:12, John wrote:

The simplest solution for those who are forced to use older compilers
missing the header is to add your own stdint.h, either by hand, or by
copying an existing one. That way, the problem of the missing header
does not infect your code. Your code can use the modern types yet
remain portable to older compilers.

On 03/17/2013 01:21 PM, Forest Hale wrote:

In the bizarro-land known as the real-world development cycle, a lot
of people are still using Microsoft Visual Studio 2008, which lacks
stdint.h (as I discovered when attempting to use ffmpeg headers
in an app and wound up having to modify them all to not depend on
stdint.h).

I agree stdint.h is a good thing, it just has complications in
practice still.

On 03/17/2013 09:56 AM, Alexey Petruchik wrote:

you’ll see the SDL types are defined in terms of them.
That’s why I think they are useless and can be painlessly removed :slight_smile:
And it would be great if SDL will encourage everyone to use stdint.h
types.

On Sun, Mar 17, 2013 at 7:25 PM, Sam Lantinga wrote:

Mostly because they’re everywhere in SDL code. You’re welcome to
use the
stdint types in your own code, and if you look in SDL_stdinc.h
you’ll see
the SDL types are defined in terms of them.

On Sun, Mar 17, 2013 at 9:19 AM, Alexey Petruchik wrote:

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.

On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1
linearly
?

Just an idea…

Well, I know, but for someone that uses many textures in his
programs
and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL
for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in
the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

which lacks stdint.h
But SDL defines missing stdint.h types if needed! Just look at
SDL_config_windows.hOn Sun, Mar 17, 2013 at 9:17 PM, Andre Leiradella wrote:
http://snipplr.com/view/18199/stdinth/

Cheers,

Andre

On 17/03/2013 15:12, John wrote:

The simplest solution for those who are forced to use older compilers
missing the header is to add your own stdint.h, either by hand, or by
copying an existing one. That way, the problem of the missing header does
not infect your code. Your code can use the modern types yet remain portable
to older compilers.

On 03/17/2013 01:21 PM, Forest Hale wrote:

In the bizarro-land known as the real-world development cycle, a lot of
people are still using Microsoft Visual Studio 2008, which lacks stdint.h
(as I discovered when attempting to use ffmpeg headers
in an app and wound up having to modify them all to not depend on
stdint.h).

I agree stdint.h is a good thing, it just has complications in practice
still.

On 03/17/2013 09:56 AM, Alexey Petruchik wrote:

you’ll see the SDL types are defined in terms of them.

That’s why I think they are useless and can be painlessly removed :slight_smile:
And it would be great if SDL will encourage everyone to use stdint.h
types.

On Sun, Mar 17, 2013 at 7:25 PM, Sam Lantinga wrote:

Mostly because they’re everywhere in SDL code. You’re welcome to use
the
stdint types in your own code, and if you look in SDL_stdinc.h you’ll
see
the SDL types are defined in terms of them.

On Sun, Mar 17, 2013 at 9:19 AM, Alexey Petruchik wrote:

As conversation moved here I’ll ask once again here. Why not to
replace SDL integer types (Uint8, …) with <stdint.h> integer types?
This change will not break any binary compatibility because SDL
integer types are just typedefs for <stdint.h> integer types.

On Sat, Mar 16, 2013 at 5:28 AM, Jared Maddox wrote:

Date: Fri, 15 Mar 2013 12:45:54 -0700
From: “neoaggelos”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363376754.m2f.36087 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Sik wrote:

Doesn’t that go against the ABI being locked though?

2013/3/15, neoaggelos :

Since SDL2 is not released yet, is it possible to change
SDL_GL_BindTexture
so that the created texture’s coordinates range from 0 to 1
linearly
?

Just an idea…

Well, I know, but for someone that uses many textures in his
programs
and
relies upon this
will most probably not be that happy.

Having a standard value will make it easier

None the less, the ABI is locked, AND this isn’t something that SDL
controls, so no. However, it should be somewhat simple to create an
abstraction layer that does this for you. Don’t go looking in SDL for
it, but certainly the community would be perfectly happy if someone
were to make a library that does this, and interfaces with SDL in the
appropriate places.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Alexey Petruchik wrote:

which lacks stdint.h

But SDL defines missing stdint.h types if needed! Just look at
SDL_config_windows.h

If every library defined the stdint types in the case of missing stdint.h, every library’s header would conflict, and use of multiple libraries would require modifying the headers. And requiring a person to download a third-party header is impractical (indeed, one of the things I like about SDL as opposed to SFML and other similar libraries is that SDL has no third-party dependencies).------------------------
Nate Fries

But stdint.h is part of the standard and would affect way more than
just SDL. If you don’t have one you probably are going to have even
more issues later. Besides SDL’s own types aren’t very safe anyway -
they aren’t prefixed, and the names are quite predictable (e.g.
Uint8), chances are several other libraries have those same exact
typedefs too and will conflict with SDL as well. It’s a lose-lose
situation no matter what.

2013/3/17, Nathaniel J Fries :>

Alexey Petruchik wrote:

which lacks stdint.h

But SDL defines missing stdint.h types if needed! Just look at
SDL_config_windows.h

If every library defined the stdint types in the case of missing stdint.h,
every library’s header would conflict, and use of multiple libraries would
require modifying the headers. And requiring a person to download a
third-party header is impractical (indeed, one of the things I like about
SDL as opposed to SFML and other similar libraries is that SDL has no
third-party dependencies).


Nate Fries

Sik wrote:

But stdint.h is part of the standard and would affect way more than
just SDL. If you don’t have one you probably are going to have even
more issues later. Besides SDL’s own types aren’t very safe anyway -
they aren’t prefixed, and the names are quite predictable (e.g.
Uint8), chances are several other libraries have those same exact
typedefs too and will conflict with SDL as well. It’s a lose-lose
situation no matter what.

stdint.h became part of the standard in C99. Most C++ libraries are built to support older standards for portability’s sake – for example, Haiku, to maintain binary compatibility with BeOS, uses GCC 2.95; which was released in 1999 and not have full support for C99 at the time (much as no C++ compiler has full C++11 support yet, even though its two years later) – and so expecting stdint.h is bad policy to begin with.

Assuming SDL is meant to be compatible with the earliest C standard, C89, then assuming stdint exists is bad behavior.

A good point on the non-prefix argument, though. Although I’ve never run into such a case personally.------------------------
Nate Fries

Sik wrote:

But stdint.h is part of the standard and would affect way more than
just SDL. If you don’t have one you probably are going to have even
more issues later. Besides SDL’s own types aren’t very safe anyway -
they aren’t prefixed, and the names are quite predictable (e.g.
Uint8), chances are several other libraries have those same exact
typedefs too and will conflict with SDL as well. It’s a lose-lose
situation no matter what.

stdint.h became part of the standard in C99. Most C libraries are built to support older standards for portability’s sake – for example, Haiku, to maintain binary compatibility with BeOS, uses GCC 2.95; which was released in 1999 and not have full support for C99 at the time (much as no C++ compiler has full C++11 support yet, even though its two years later) – and so expecting stdint.h is bad policy to begin with.

Assuming SDL is meant to be compatible with the earliest C standard, C89, then assuming stdint exists is bad behavior.

A good point on the non-prefix argument, though. Although I’ve never run into such a case personally.------------------------
Nate Fries

So with this latest development, what’s currently in the way between this getting locked and the SDL 2.0 release?

I’ve been dabbling around in SDL 2.0 for the past few months and I’ve begun the process of upgrading my tutorial set in anticipation for the release. I’d like to know if I’m going to be crunching during what little free time I have on the weekends.

Message-ID: <5145FB8B.1050504 at ghdigital.com>
Content-Type: text/plain; charset=ISO-8859-1

In the bizarro-land known as the real-world development cycle, a lot of
people are still using Microsoft Visual Studio 2008, which lacks stdint.h
(as I discovered when attempting to use ffmpeg headers
in an app and wound up having to modify them all to not depend on
stdint.h).

I agree stdint.h is a good thing, it just has complications in practice
still.

Message-ID: <5146077C.9040100 at leafygreengames.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

The simplest solution for those who are forced to use older compilers
missing
the header is to add your own stdint.h, either by hand, or by copying an
existing one. That way, the problem of the missing header does not infect
your
code. Your code can use the modern types yet remain portable to older
compilers.

Message-ID:
<CAB1qPCkRipmiN7oOr48PuBrHn2SQO6b1qYn=8Hb0wBjp6DKVbw at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

which lacks stdint.h
But SDL defines missing stdint.h types if needed! Just look at
SDL_config_windows.h

Message-ID:
<CAEyBR+WbkHs1L1s-r3UanM-cPX1kN+zOLS14MaXtRgzTVRF9Pw at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

But stdint.h is part of the standard and would affect way more than
just SDL. If you don’t have one you probably are going to have even
more issues later. Besides SDL’s own types aren’t very safe anyway -
they aren’t prefixed, and the names are quite predictable (e.g.
Uint8), chances are several other libraries have those same exact
typedefs too and will conflict with SDL as well. It’s a lose-lose
situation no matter what.

Maybe a SDL_stdint.h file that includes the platform’s stdint.h (if
applicable), and typedefs SDLint types with any necessary
combination of the types provided by the standard and SDL-provided
types? That way you make the types reliably available to users
(possibly including defines for their min/max values if someone wants
to add those later), avoid stepping on the toes of other libraries
that provide a stdint.h, and if you want to add the appropriate
preprocessor code you can even use other library’s stdint.h (I’m not
certain that it’s standard compliant, so tell me if it isn’t, but you
check for a macro definition, and if it’s defined you stick that macro
in the spot reserved for an include statement’s filename argument).

After that, whoever did this would just typedef SDL’s current types in
terms of the SDLint ones. As I understand the standard, anyone could
afterwards start converting e.g. Uint8 to SDLuint8 without any
problems, and the current “unsafe” names could eventually be abandoned
and (let’s say SDL 2.5, if conversion is completed in SDL 2.1) removed
(as far as I’ve been able to figure out, typedef names actually
register as the basal type instead of a unique type; whenever I
actually spend the time to get a compiler written, I’m definitely NOT
blindly adopting that from C).> Date: Sun, 17 Mar 2013 10:21:15 -0700

From: Forest Hale
To: SDL Development List
Subject: Re: [SDL] SDL 2.0 ABI locked
Date: Sun, 17 Mar 2013 14:12:12 -0400
From: John
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Date: Sun, 17 Mar 2013 21:35:18 +0300
From: Alexey Petruchik
To: SDL Development List
Subject: Re: [SDL] SDL 2.0 ABI locked
Date: Sun, 17 Mar 2013 19:42:31 -0300
From: Sik the hedgehog <sik.the.hedgehog at gmail.com>
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked

Date: Sun, 17 Mar 2013 15:00:35 -0700
From: “Nathaniel J Fries”
To: sdl at lists.libsdl.org
Subject: Re: [SDL] SDL 2.0 ABI locked
Message-ID: <1363557635.m2f.36155 at forums.libsdl.org>
Content-Type: text/plain; charset=“iso-8859-1”

Alexey Petruchik wrote:

which lacks stdint.h

But SDL defines missing stdint.h types if needed! Just look at
SDL_config_windows.h

If every library defined the stdint types in the case of missing stdint.h,
every library’s header would conflict, and use of multiple libraries would
require modifying the headers. And requiring a person to download a
third-party header is impractical (indeed, one of the things I like about
SDL as opposed to SFML and other similar libraries is that SDL has no
third-party dependencies).


Nate Fries

Sorry, but this time I think it makes sense to provide it, especially
since it should be possible to use the headers that other libraries
provide too. There’s no reason why an implementation has to step on
others toes.