Mercurial > sdl-ios-xcode
comparison src/cdrom/linux/SDL_syscdrom.c @ 1341:d02b552e5304
Configure dynamically generates SDL_config.h
I'm still wrestling with autoheader, but this should work for now...
Fixed lots of build problems with C library support disabled
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 07 Feb 2006 12:11:33 +0000 |
parents | 604d73db6802 |
children | c71e05b4dc2e |
comparison
equal
deleted
inserted
replaced
1340:58b114ef50e7 | 1341:d02b552e5304 |
---|---|
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 */ | 21 */ |
22 | 22 |
23 /* Functions for system-level CD-ROM audio control */ | 23 /* Functions for system-level CD-ROM audio control */ |
24 | 24 |
25 #include <string.h> /* For strerror() */ | |
25 #include <sys/types.h> | 26 #include <sys/types.h> |
26 #include <sys/stat.h> | 27 #include <sys/stat.h> |
27 #include <sys/ioctl.h> | 28 #include <sys/ioctl.h> |
28 #include <fcntl.h> | 29 #include <fcntl.h> |
29 #include <errno.h> | 30 #include <errno.h> |
213 /* Handle "supermount" filesystem mounts */ | 214 /* Handle "supermount" filesystem mounts */ |
214 if ( SDL_strcmp(mnt_type, MNTTYPE_SUPER) == 0 ) { | 215 if ( SDL_strcmp(mnt_type, MNTTYPE_SUPER) == 0 ) { |
215 tmp = SDL_strstr(mntent->mnt_opts, "fs="); | 216 tmp = SDL_strstr(mntent->mnt_opts, "fs="); |
216 if ( tmp ) { | 217 if ( tmp ) { |
217 SDL_free(mnt_type); | 218 SDL_free(mnt_type); |
218 mnt_type = strdup(tmp + SDL_strlen("fs=")); | 219 mnt_type = SDL_strdup(tmp + SDL_strlen("fs=")); |
219 if ( mnt_type ) { | 220 if ( mnt_type ) { |
220 tmp = SDL_strchr(mnt_type, ','); | 221 tmp = SDL_strchr(mnt_type, ','); |
221 if ( tmp ) { | 222 if ( tmp ) { |
222 *tmp = '\0'; | 223 *tmp = '\0'; |
223 } | 224 } |
224 } | 225 } |
225 } | 226 } |
226 tmp = SDL_strstr(mntent->mnt_opts, "dev="); | 227 tmp = SDL_strstr(mntent->mnt_opts, "dev="); |
227 if ( tmp ) { | 228 if ( tmp ) { |
228 SDL_free(mnt_dev); | 229 SDL_free(mnt_dev); |
229 mnt_dev = strdup(tmp + SDL_strlen("dev=")); | 230 mnt_dev = SDL_strdup(tmp + SDL_strlen("dev=")); |
230 if ( mnt_dev ) { | 231 if ( mnt_dev ) { |
231 tmp = SDL_strchr(mnt_dev, ','); | 232 tmp = SDL_strchr(mnt_dev, ','); |
232 if ( tmp ) { | 233 if ( tmp ) { |
233 *tmp = '\0'; | 234 *tmp = '\0'; |
234 } | 235 } |