| Summary: | Sdl uses a function i have defined for its own purposes | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Kaden Thomas <thomas.kaden4> |
| Component: | main | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | philipp.wiesemann, sezeroz |
| Version: | 2.0.5 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
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).
man 2 read This must be closed as invalid. Yes, you generally can't reimplement C library functions in your own program. The behavior is undefined on various platforms. |
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.