Small fixes to mountlist.c for beos and skyos. Apparently they went lost some time ago...
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@483 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
		
							parent
							
								
									f2d8cbbfe1
								
							
						
					
					
						commit
						3fb7800824
					
				
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
									
									
									
									
								
							@ -46,7 +46,7 @@ ifdef COMSPEC
 | 
			
		||||
  OBJRES = $(OBJDIR)/winres.o
 | 
			
		||||
  CFGOBJRES = $(OBJDIR)/wincfgres.o
 | 
			
		||||
  PLATFORM = win32 #no uname so we'll do that ourselve
 | 
			
		||||
  PLATFORMFILES = SDL.dll SDL_image.dll libpng13.dll zlib1.dll $(TTFLIBS) #some misc files we have to add to the release archive under windows.
 | 
			
		||||
  PLATFORMFILES = SDL.dll SDL_image.dll libpng13.dll zlib1.dll gfxcfg.ico grafx2.ico $(TTFLIBS) #some misc files we have to add to the release archive under windows.
 | 
			
		||||
else
 | 
			
		||||
 | 
			
		||||
  PLATFORM = $(shell uname)
 | 
			
		||||
@ -216,7 +216,7 @@ ziprelease: version $(BIN) $(BINCFG) release
 | 
			
		||||
	tar cvzf src-svn`svnversion | sed 's/:/-/'`.tgz *.c *.h Makefile Makefile.dep gfx2.ico gfx2cfg.ico
 | 
			
		||||
	zip grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-$(PLATFORM).zip $(BIN) $(CFGBIN) gfx2.dat gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt fonts/8pxfont.png doc/README-zlib1.txt doc/README-SDL.txt doc/README-SDL_image.txt doc/README-SDL_ttf.txt fonts/Tuffy.ttf src-svn`svnversion | sed 's/:/-/'`.tgz $(PLATFORMFILES)
 | 
			
		||||
	$(DELCOMMAND) src-svn`svnversion | sed 's/:/-/'`.tgz
 | 
			
		||||
	tar cvzf grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-src.tgz *.c *.h Makefile Makefile.dep gfx2.dat gfx2.ico gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt fonts/8pxfont.png fonts/Tuffy.ttf
 | 
			
		||||
	tar cvzf grafx2-svn`svnversion | sed 's/:/-/'`$(TTFLABEL)-src.tgz *.c *.h Makefile Makefile.dep gfx2.dat gfx2.ico gfx2cfg.ico gfx2.gif gfx2cfg.gif doc/gpl-2.0.txt fonts/8pxfont.png fonts/Tuffy.ttf
 | 
			
		||||
 | 
			
		||||
$(BIN) : $(OBJ) $(OBJRES)
 | 
			
		||||
	$(CC) $(OBJ) $(OBJRES) -o $(BIN) $(LOPT)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										22
									
								
								mountlist.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								mountlist.c
									
									
									
									
									
								
							@ -20,9 +20,13 @@
 | 
			
		||||
 | 
			
		||||
// We don't use autoconf and all that in grafx2, so let's do the config here ...
 | 
			
		||||
#ifdef __macosx__			// MacOS X is POSIX compliant
 | 
			
		||||
#define MOUNTED_GETMNTINFO
 | 
			
		||||
    #define MOUNTED_GETMNTINFO
 | 
			
		||||
#elif defined(__BEOS__) || defined(__HAIKU__)
 | 
			
		||||
    #define MOUNTED_FS_STAT_DEV
 | 
			
		||||
#elif defined(__SKYOS__)
 | 
			
		||||
    #warning "Your platform is missing some specific code here ! please check and fix :)"
 | 
			
		||||
#else
 | 
			
		||||
#define MOUNTED_GETMNTENT1
 | 
			
		||||
    #define MOUNTED_GETMNTENT1
 | 
			
		||||
#endif
 | 
			
		||||
// --- END GRAFX2 CUSTOM CONFIG ---
 | 
			
		||||
 | 
			
		||||
@ -594,17 +598,17 @@ read_file_system_list (bool need_fs_type)
 | 
			
		||||
              continue;
 | 
			
		||||
 | 
			
		||||
            if (strcmp (d->d_name, ".") == 0)
 | 
			
		||||
              name = xstrdup ("/");
 | 
			
		||||
              name = strdup ("/");
 | 
			
		||||
            else
 | 
			
		||||
              {
 | 
			
		||||
                name = xmalloc (1 + strlen (d->d_name) + 1);
 | 
			
		||||
                name = malloc (1 + strlen (d->d_name) + 1);
 | 
			
		||||
                name[0] = '/';
 | 
			
		||||
                strcpy (name + 1, d->d_name);
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
            if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode))
 | 
			
		||||
              {
 | 
			
		||||
                struct rootdir_entry *re = xmalloc (sizeof *re);
 | 
			
		||||
                struct rootdir_entry *re = malloc (sizeof *re);
 | 
			
		||||
                re->name = name;
 | 
			
		||||
                re->dev = statbuf.st_dev;
 | 
			
		||||
                re->ino = statbuf.st_ino;
 | 
			
		||||
@ -630,10 +634,10 @@ read_file_system_list (bool need_fs_type)
 | 
			
		||||
            if (re->dev == fi.dev && re->ino == fi.root)
 | 
			
		||||
              break;
 | 
			
		||||
 | 
			
		||||
          me = xmalloc (sizeof *me);
 | 
			
		||||
          me->me_devname = xstrdup (fi.device_name[0] != '\0' ? fi.device_name : fi.fsh_name);
 | 
			
		||||
          me->me_mountdir = xstrdup (re != NULL ? re->name : fi.fsh_name);
 | 
			
		||||
          me->me_type = xstrdup (fi.fsh_name);
 | 
			
		||||
          me = malloc (sizeof *me);
 | 
			
		||||
          me->me_devname = strdup (fi.device_name[0] != '\0' ? fi.device_name : fi.fsh_name);
 | 
			
		||||
          me->me_mountdir = strdup (re != NULL ? re->name : fi.fsh_name);
 | 
			
		||||
          me->me_type = strdup (fi.fsh_name);
 | 
			
		||||
          me->me_type_malloced = 1;
 | 
			
		||||
          me->me_dev = fi.dev;
 | 
			
		||||
          me->me_dummy = 0;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user