HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- C/C++ API for large files
Operating System - Tru64 Unix
        1839919
        Members
    
    
        2455
        Online
    
    
        110157
        Solutions
    
Forums
        Categories
Company
Local Language
                
                  
                  back
                
        
                
        
                
        
                
        
        
        
                
        
                
        
        
        
                
        
              
              Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
                
                  
                  back
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
                
            
            
                
            
                
            
                
            
                
            
            
                
            
                
            
            
                
            
                
              
            Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
        Information
        Community
Resources
Community Language
        Language
        Forums
Blogs
	
		
			
            
                
            Go to solution
        
            
		
		
			
            	
	
		
        
		
	
	
		Topic Options
			
				
					
	
			
		
	- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 04:05 AM
08-11-2004 04:05 AM
			
				
					
					
						An existing C/C++ application now needs to operate on files larger than 2TB, the limit of the C standard lib pointers.  What API is available for AdvFS files up to 16TB?  If there are several choices, which will be easiest to adopt from the standard lib?
					
				
			
			
				
			
			
				
	
			
				
		
			
			
			
			
			
			
		
		
		
	
	
	
Solved! Go to Solution.
		2 REPLIES 2
	
	            
            
		
		
			
            
                - Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 07:32 AM
08-11-2004 07:32 AM
SolutionA friend in Tru64 engineering (AdvFS) answerred to me:
"
The Tru64 UNIX libc library has always supported huge files and all I/O related libc functions and kernel system calls use a 64 bit argument to handle file offset information. This has been true since the first release of Tru64 UNIX (aka, Digital UNIX, aka Digital Equipment Corporation OSF/1).
I am unaware of any file size limitation in the Tru64 UNIX libc or kernel system calls beyond those specific to the file system itself, at least not for a C application compiled with the Tru64 UNIX C compiler. _IF_ there is a specific C++ limitation (or gcc/g++) it is separate from Tru64 UNIX libc which fully supports 64 bits file offsets and huge files up to and including the 16TB sized files allowed by AdvFS.
And I said _IF_ because I do not know enough about C++, gcc, or g++ to make any statements one way or the other.
The Tru64 UNIX file system offsets use off_t and off_t is declared in /usr/include/sys/types.h as:
typedef long off_t;
and all longs on Tru64 UNIX are 64 bits by default.
I may miss a few function, but lseek(), fseek(), fseeko(), fseek_unlocked(), ftell(), ftello(), pread(), and pwrite() are all long based.
fsetpos() and fgetpos() use fpos_t, which also uses a long to hold the file offset information.
aio_read(), aio_write(), and lio_listio() use struct aiocb which uses an off_t for the file offset.
read(), write(), fread(), fwrite(), printf(), fprintf(), vprintf(), vwprintf(), wprintf(), getchar(), getc(), fgetc(), fgetcw(), getcw(), putchar(), putc(), fputc(), fputwc(), putwc(), gets(), puts(), scanf(), fscanf(), wscanf(), etc... all depend on the kernel "struct file" structure to keep track of the current file offset, and that uses an off_t to keep track of the file offset.
I have most likely missed a few libc or kernel system calls that also do I/O and care about the file offset, but as far as I know all file I/O APIs in Tru64 UNIX are all 64 bit implementations. "
Hth,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2004 08:50 AM
08-11-2004 08:50 AM
			
				
					
						
							Re: C/C++ API for large files
						
					
					
				
			
		
	
			
	
	
	
	
	
			
				
					
					
						Sounds like I have been confused by the application's int references to the long offsets!  Problem solved.
					
				
			
			
				
			
			
				
			
			
			
			
			
			
		
		
		
	
	
	
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
		
	
	
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP
