Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sdl uses a function i have defined for its own purposes #2342

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

Sdl uses a function i have defined for its own purposes #2342

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Labels
invalid This doesn't seem right

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.5
Reported for operating system, platform: Linux, x86_64

Comments on the original bug report:

On 2016-12-22 07:56:40 +0000, Kaden Thomas wrote:

in my main.c file i have this function:

void read(void *env, uint8_t data)
{
printf("%p : 0x%x\n", env, data);
}

What I found is that if I call SDL_Init(), data is printed using my function unless I mark the function as static or static inline.

On 2016-12-22 20:54:22 +0000, Philipp Wiesemann wrote:

read() is already available ("unistd.h", POSIX). The linking might get messed up if there are more functions with the same name (see also bug 2884).

On 2016-12-29 06:29:28 +0000, Ozkan Sezer wrote:

man 2 read

This must be closed as invalid.

On 2017-01-02 03:00:29 +0000, Sam Lantinga wrote:

Yes, you generally can't reimplement C library functions in your own program. The behavior is undefined on various platforms.

@SDLBugzilla SDLBugzilla added bug invalid This doesn't seem right labels Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant