mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[libcdio] _stat() does not work with files > 4GB - must use _stat64
* move internal stream sizes to 64 bit as a result * see http://msdn.microsoft.com/en-us/library/14h5k7ff.aspx
This commit is contained in:
		
							parent
							
								
									26a131e5f0
								
							
						
					
					
						commit
						fcc2486867
					
				
					 4 changed files with 13 additions and 13 deletions
				
			
		|  | @ -50,7 +50,7 @@ typedef struct { | ||||||
|   char *pathname; |   char *pathname; | ||||||
|   FILE *fd; |   FILE *fd; | ||||||
|   char *fd_buf; |   char *fd_buf; | ||||||
|   off_t st_size; /* used only for source */ |   int64_t st_size; /* used only for source */ | ||||||
| } _UserData; | } _UserData; | ||||||
| 
 | 
 | ||||||
| static int | static int | ||||||
|  | @ -125,7 +125,7 @@ _stdio_seek(void *p_user_data, long i_offset, int whence) | ||||||
|   return i_offset; |   return i_offset; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| static long int | static uint64_t | ||||||
| _stdio_stat(void *p_user_data) | _stdio_stat(void *p_user_data) | ||||||
| { | { | ||||||
|   const _UserData *const ud = p_user_data; |   const _UserData *const ud = p_user_data; | ||||||
|  | @ -192,9 +192,9 @@ cdio_stdio_new(const char pathname[]) | ||||||
|   CdioDataSource_t *new_obj = NULL; |   CdioDataSource_t *new_obj = NULL; | ||||||
|   cdio_stream_io_functions funcs = { NULL, NULL, NULL, NULL, NULL, NULL }; |   cdio_stream_io_functions funcs = { NULL, NULL, NULL, NULL, NULL, NULL }; | ||||||
|   _UserData *ud = NULL; |   _UserData *ud = NULL; | ||||||
|   struct _stat statbuf; |   struct _stat64 statbuf; | ||||||
|    |    | ||||||
|   if (_stat (pathname, &statbuf) == -1)  |   if (_stat64 (pathname, &statbuf) == -1)  | ||||||
|     { |     { | ||||||
|       cdio_warn ("could not retrieve file info for `%s': %s",  |       cdio_warn ("could not retrieve file info for `%s': %s",  | ||||||
|                  pathname, strerror (errno)); |                  pathname, strerror (errno)); | ||||||
|  |  | ||||||
|  | @ -204,7 +204,7 @@ cdio_stream_seek(CdioDataSource_t* p_obj, ssize_t offset, int whence) | ||||||
|   Return whatever size of stream reports, I guess unit size is bytes.  |   Return whatever size of stream reports, I guess unit size is bytes.  | ||||||
|   On error return -1; |   On error return -1; | ||||||
|  */ |  */ | ||||||
| ssize_t | int64_t | ||||||
| cdio_stream_stat(CdioDataSource_t *p_obj) | cdio_stream_stat(CdioDataSource_t *p_obj) | ||||||
| { | { | ||||||
|   if (!p_obj) return -1; |   if (!p_obj) return -1; | ||||||
|  |  | ||||||
|  | @ -38,7 +38,7 @@ extern "C" { | ||||||
|   typedef driver_return_code_t(*cdio_data_seek_t)(void *user_data, long offset, |   typedef driver_return_code_t(*cdio_data_seek_t)(void *user_data, long offset, | ||||||
|                                                   int whence); |                                                   int whence); | ||||||
|    |    | ||||||
|   typedef long(*cdio_data_stat_t)(void *user_data); |   typedef uint64_t(*cdio_data_stat_t)(void *user_data); | ||||||
|    |    | ||||||
|   typedef int(*cdio_data_close_t)(void *user_data); |   typedef int(*cdio_data_close_t)(void *user_data); | ||||||
|    |    | ||||||
|  | @ -114,7 +114,7 @@ extern "C" { | ||||||
|     Return whatever size of stream reports, I guess unit size is bytes.  |     Return whatever size of stream reports, I guess unit size is bytes.  | ||||||
|     On error return -1; |     On error return -1; | ||||||
|   */ |   */ | ||||||
|   ssize_t cdio_stream_stat(CdioDataSource_t *p_obj); |   int64_t cdio_stream_stat(CdioDataSource_t *p_obj); | ||||||
|    |    | ||||||
|   /**
 |   /**
 | ||||||
|     Deallocate resources associated with p_obj. After this p_obj is unusable. |     Deallocate resources associated with p_obj. After this p_obj is unusable. | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 206, 278 | IDD_DIALOG DIALOGEX 12, 12, 206, 278 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| EXSTYLE WS_EX_APPWINDOW | EXSTYLE WS_EX_APPWINDOW | ||||||
| CAPTION "Rufus v1.0.7.134" | CAPTION "Rufus v1.0.7.135" | ||||||
| FONT 8, "MS Shell Dlg", 400, 0, 0x1 | FONT 8, "MS Shell Dlg", 400, 0, 0x1 | ||||||
| BEGIN | BEGIN | ||||||
|     DEFPUSHBUTTON   "Start",IDC_START,94,236,50,14 |     DEFPUSHBUTTON   "Start",IDC_START,94,236,50,14 | ||||||
|  | @ -70,7 +70,7 @@ BEGIN | ||||||
|     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP |     DEFPUSHBUTTON   "OK",IDOK,231,175,50,14,WS_GROUP | ||||||
|     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, |     CONTROL         "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, | ||||||
|                     "SysLink",WS_TABSTOP,46,47,114,9 |                     "SysLink",WS_TABSTOP,46,47,114,9 | ||||||
|     LTEXT           "Version 1.0.7 (Build 134)",IDC_STATIC,46,19,78,8 |     LTEXT           "Version 1.0.7 (Build 135)",IDC_STATIC,46,19,78,8 | ||||||
|     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP |     PUSHBUTTON      "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP | ||||||
|     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL |     EDITTEXT        IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL | ||||||
|     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 |     LTEXT           "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8 | ||||||
|  | @ -208,8 +208,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 1,0,7,134 |  FILEVERSION 1,0,7,135 | ||||||
|  PRODUCTVERSION 1,0,7,134 |  PRODUCTVERSION 1,0,7,135 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -226,13 +226,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "akeo.ie" |             VALUE "CompanyName", "akeo.ie" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "1.0.7.134" |             VALUE "FileVersion", "1.0.7.135" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" | ||||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" |             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||||
|             VALUE "OriginalFilename", "rufus.exe" |             VALUE "OriginalFilename", "rufus.exe" | ||||||
|             VALUE "ProductName", "Rufus" |             VALUE "ProductName", "Rufus" | ||||||
|             VALUE "ProductVersion", "1.0.7.134" |             VALUE "ProductVersion", "1.0.7.135" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue