Back to index

lightning-sunbird  0.9+nobinonly
GUSIPOSIX.h
Go to the documentation of this file.
00001 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
00002 // % Project  :      GUSI                        -      Grand Unified Socket Interface                    
00003 // % File            :      GUSIPOSIX.nw         -      POSIX/Socket wrappers                         
00004 // % Author   :      Matthias Neeracher                                           
00005 // % Language :      C++                                                        
00006 // %                                                                       
00007 // % $Log: GUSIPOSIX.h,v $
00008 // % Revision 1.1  2001/03/11 22:37:38  sgehani%netscape.com
00009 // % First Checked In.
00010 // %                                                
00011 // % Revision 1.22  2001/01/17 08:58:06  neeri                             
00012 // % Releasing 2.1.4                                                       
00013 // %                                                                       
00014 // % Revision 1.21  2000/10/29 18:36:32  neeri                             
00015 // % Fix time_t signedness issues                                          
00016 // %                                                                       
00017 // % Revision 1.20  2000/10/16 04:34:23  neeri                             
00018 // % Releasing 2.1.2                                                       
00019 // %                                                                       
00020 // % Revision 1.19  2000/06/12 04:24:50  neeri                             
00021 // % Fix time, localtime, gmtime                                           
00022 // %                                                                       
00023 // % Revision 1.18  2000/05/23 07:15:30  neeri                             
00024 // % Improve formatting                                                    
00025 // %                                                                       
00026 // % Revision 1.17  2000/03/06 08:18:25  neeri                             
00027 // % Fix sleep, usleep, chdir; new Yield system                            
00028 // %                                                                       
00029 // % Revision 1.16  2000/01/17 01:41:21  neeri                             
00030 // % Fix rename() mangling                                                 
00031 // %                                                                       
00032 // % Revision 1.15  1999/12/13 03:01:48  neeri                             
00033 // % Another select() fix                                                  
00034 // %                                                                       
00035 // % Revision 1.14  1999/11/15 07:22:34  neeri                             
00036 // % Safe context setup. Fix sleep checking.                               
00037 // %                                                                       
00038 // % Revision 1.13  1999/09/09 07:21:22  neeri                             
00039 // % Add support for inet_aton                                             
00040 // %                                                                       
00041 // % Revision 1.12  1999/08/26 05:45:06  neeri                             
00042 // % Fixes for literate edition of source code                             
00043 // %                                                                       
00044 // % Revision 1.11  1999/07/19 06:21:03  neeri                             
00045 // % Add mkdir/rmdir, fix various file manager related bugs                
00046 // %                                                                       
00047 // % Revision 1.10  1999/07/07 04:17:42  neeri                             
00048 // % Final tweaks for 2.0b3                                                
00049 // %                                                                       
00050 // % Revision 1.9  1999/06/28 06:04:59  neeri                              
00051 // % Support interrupted calls                                             
00052 // %                                                                       
00053 // % Revision 1.8  1999/05/30 03:09:31  neeri                              
00054 // % Added support for MPW compilers                                       
00055 // %                                                                       
00056 // % Revision 1.7  1999/04/29 05:33:18  neeri                              
00057 // % Fix fcntl prototype                                                   
00058 // %                                                                       
00059 // % Revision 1.6  1999/03/29 09:51:29  neeri                              
00060 // % New configuration system with support for hardcoded configurations.   
00061 // %                                                                       
00062 // % Revision 1.5  1999/03/17 09:05:11  neeri                              
00063 // % Added GUSITimer, expanded docs                                        
00064 // %                                                                       
00065 // % Revision 1.4  1998/10/25 11:35:19  neeri                              
00066 // % chdir, getcwd, setxxxent                                              
00067 // %                                                                       
00068 // % Revision 1.3  1998/10/11 16:45:22  neeri                              
00069 // % Ready to release 2.0a2                                                
00070 // %                                                                       
00071 // % Revision 1.2  1998/08/01 21:32:09  neeri                              
00072 // % About ready for 2.0a1                                                 
00073 // %                                                                       
00074 // % Revision 1.1  1998/01/25 21:02:49  neeri                              
00075 // % Engine implemented, except for signals & scheduling                   
00076 // %                                                                       
00077 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
00078 //                                                                         
00079 // \chapter{POSIX/Socket Wrappers}                                         
00080 //                                                                         
00081 // Now everything is in place to define the POSIX and socket routines      
00082 // themselves. As opposed to our usual practice, we don't declare the      
00083 // exported routines here, as they all have been declared in [[unistd.h]]  
00084 // or [[sys/socket.h]] already. The exceptions are [[remove]] and [[rename]], 
00085 // which are declared in [[stdio.h]], which we'd rather not include, and   
00086 // various calls which are not consistently declared.                      
00087 //                                                                         
00088 // <GUSIPOSIX.h>=                                                          
00089 #ifndef _GUSIPOSIX_
00090 #define _GUSIPOSIX_
00091 
00092 #include <signal.h>
00093 #include <errno.h>
00094 #include <sys/time.h>
00095 #include <sys/stat.h>
00096 #include <sys/types.h>
00097 #include <unistd.h>
00098 #include <fcntl.h>
00099 #include <sys/ioctl.h>
00100 #include <utime.h>
00101 #include <netdb.h>
00102 #include <arpa/inet.h>
00103 
00104 __BEGIN_DECLS
00105 int remove(const char * path);
00106 int rename(const char *oldname, const char *newname);
00107 int fgetfileinfo(const char * path, OSType * creator, OSType * type);
00108 void fsetfileinfo(const char * path, OSType creator, OSType type);
00109 time_t time(time_t * timer);
00110 struct tm * localtime(const time_t * timer);
00111 struct tm * gmtime(const time_t * timer);
00112 time_t mktime(struct tm *timeptr);
00113 __END_DECLS
00114 
00115 #endif /* _GUSIPOSIX_ */