Changeset 1519 for trunk/src/emx/include
- Timestamp:
- Sep 27, 2004, 4:15:07 AM (21 years ago)
- Location:
- trunk/src/emx/include
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/include/InnoTekLIBC/backend.h
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r1518 r1519 30 30 #include <sys/cdefs.h> 31 31 #include <sys/types.h> 32 #include <emx/io.h> 32 33 33 34 __BEGIN_DECLS … … 38 39 #endif 39 40 struct statfs; 41 struct stat; 40 42 41 43 … … 82 84 83 85 84 /** @defgroup __libc_Back_fh LIBC Backend - File Handles. 85 * @{ */ 86 /** @defgroup __libc_Back_fs LIBC Backend - File System 87 * @{ */ 88 89 /** 90 * Get the statistics for the filesystem which pszPath is located on. 91 * 92 * @returns 0 on success. 93 * @returns Negative error code (errno.h) on failure. 94 * @param pszPath The path to somewhere in the filesystem. 95 * @param pStatFs Where to store the obtained information. 96 */ 97 int __libc_Back_fsStat(const char *pszPath, struct statfs *pStatFs); 98 99 /** 100 * Get file system statistics 101 * 102 * @returns 0 on success. 103 * @returns Negative error code (errno.h) on failure. 104 * @param fh The filehandle of any file within the mounted file system. 105 * @param pStatFs Where to store the statistics. 106 */ 107 int __libc_Back_fsStatFH(int fh, struct statfs *pStatFs); 108 109 /** 110 * Get the statistics for all the mounted filesystems. 111 * 112 * @returns Number of returned statfs structs on success. 113 * @returns Number of mounted filesystems on success if paStatFS is NULL 114 * @returns Negative error code (errno.h) on failure. 115 * @param paStatFs Where to to store the statistics. 116 * @param cStatFS Number of structures the array pointed to by paStatFs can hold. 117 * @param fFlags Flags, currently ignored. 118 */ 119 int __libc_Back_fsStats(struct statfs *paStatFs, unsigned cStatFs, unsigned fFlags); 120 121 /** 122 * Schedules all file system buffers for writing. 123 * 124 * See sync() for OS/2 limitations. 125 */ 126 void __libc_Back_fsSync(void); 127 128 /** 129 * Resolves the path into an canonicalized absolute path. 130 * 131 * @returns 0 on success. 132 * @returns Negative error code (errno.h) on failure. 133 * @param pszPath The path to resolve. 134 * @param pszBuf Where to store the resolved path. 135 * @param cchBuf Size of the buffer. 136 * @param fFlags At the moment 0. Which means the entire path must exist. 137 */ 138 int __libc_Back_fsPathResolve(const char *pszPath, char *pszBuf, size_t cchBuf, unsigned fFlags); 139 140 /** 141 * Changes the default drive of the process. 142 * 143 * @returns 0 on success. 144 * @returns Negative error code (errno.h) on failure. 145 * @param chDrive New default drive. 146 */ 147 int __libc_Back_fsDriveDefaultSet(char chDrive); 148 149 /** 150 * Gets the default drive of the process. 151 * 152 * @returns 0 on success. 153 * @returns Negative error code (errno.h) on failure. 154 * @param pchDrive Where to store the default drive. 155 */ 156 int __libc_Back_fsDriveDefaultGet(char *pchDrive); 157 158 /** 159 * Sets or change the unixroot of the current process. 160 * 161 * @returns 0 on success. 162 * @returns Negative error code (errno.h) on failure. 163 * @param pszNewRoot The new root. 164 */ 165 int __libc_Back_fsDirChangeRoot(const char *pszNewRoot); 166 167 /** 168 * Gets the current directory of the process on a 169 * specific drive or on the current one. 170 * 171 * @returns 0 on success. 172 * @returns Negative error code (errno.h) on failure. 173 * @param pszPath Where to store the path to the current directory. 174 * This will be prefixed with a drive letter if we're 175 * not in the unix tree. 176 * @param cchPath The size of the path buffer. 177 * @param chDrive The drive letter of the drive to get it for. 178 * If '\0' the current dir for the current drive is returned. 179 * @param fFlags Flags for skipping drive letter and slash. 180 */ 181 int __libc_Back_fsDirCurrentGet(char *pszPath, size_t cchPath, char chDrive, int fFlags); 182 183 /** Flags for __libc_Back_fsDirCurrentGet(). 184 * @{ */ 185 #define __LIBC_BACK_FSCWD_NO_DRIVE 1 186 #define __LIBC_BACK_FSCWD_NO_ROOT_SLASH 2 187 /** @} */ 188 189 /** 190 * Changes the current directory of the process. 191 * 192 * @returns 0 on success. 193 * @returns Negative error code (errno.h) on failure. 194 * @param pszPath Path to the new current directory of the process. 195 */ 196 int __libc_Back_fsDirCurrentSet(const char *pszPath); 197 198 /** 199 * Creates a new directory. 200 * 201 * @returns 0 on success. 202 * @returns Negative error code (errno.h) on failure. 203 * @param pszPath Path of the new directory. 204 * @param Mode Permissions on the created directory. 205 */ 206 int __libc_Back_fsDirCreate(const char *pszPath, mode_t Mode); 207 208 /** 209 * Removes a new directory. 210 * 211 * @returns 0 on success. 212 * @returns Negative error code (errno.h) on failure. 213 * @param pszPath Path to the directory which is to be removed. 214 */ 215 int __libc_Back_fsDirRemove(const char *pszPath); 216 217 /** 218 * Creates a symbolic link. 219 * 220 * @returns 0 on success. 221 * @returns Negative error code (errno.h) on failure. 222 * @param pszTarget The target of the symlink link. 223 * @param pszSymlink The path to the symbolic link to create. 224 */ 225 int __libc_Back_fsSymlinkCreate(const char *pszTarget, const char *pszSymlink); 226 227 /** 228 * Reads the content of a symbolic link. 229 * 230 * This is weird interface as it will return a truncated result if not 231 * enough buffer space. It is also weird in that there is no string 232 * terminator. 233 * 234 * @returns Number of bytes returned in pachBuf. 235 * @returns Negative error code (errno.h) on failure. 236 * @param pszPath The path to the symlink directory. 237 * @param pachBuf Where to store the symlink value. 238 * @param cchBuf Size of buffer. 239 */ 240 int __libc_Back_fsSymlinkRead(const char *pszPath, char *pachBuf, size_t cchBuf); 241 242 /** 243 * Stats a symbolic link. 244 * 245 * @returns 0 on success. 246 * @returns Negative error code (errno.h) on failure. 247 * @param pszPath Path to the file to stat. If this is a symbolic link 248 * the link it self will be stat'ed. 249 * @param pStat Where to store the file stats. 250 */ 251 int __libc_Back_fsSymlinkStat(const char *pszPath, struct stat *pStat); 252 253 /** 254 * Stats a file. 255 * 256 * @returns 0 on success. 257 * @returns Negative error code (errno.h) on failure. 258 * @param pszPath Path to the file to stat. 259 * @param pStat Where to store the file stats. 260 */ 261 int __libc_Back_fsFileStat(const char *pszPath, struct stat *pStat); 262 263 /** 264 * Gets the file stats for a file by filehandle. 265 * 266 * @returns 0 on success. 267 * @returns Negative error code (errno.h) on failure. The content 268 * of *pStat is undefined. 269 * @param fh Handle to file. 270 * @param pStat Where to store the stats. 271 */ 272 int __libc_Back_fsFileStatFH(int fh, struct stat *pStat); 273 274 275 /** @defgroup __libc_Back_io LIBC Backend - I/O and File Management. 276 * @{ */ 277 278 /** 279 * Opens a file. 280 * 281 * @returns Filehandle to the opened file on success. 282 * @returns Negative error code (errno.h) on failure. 283 * @param pszFile Path to the file. 284 * @param fFlags Open flags. 285 * @param cbInitial Initial filesize. 286 * @param Mode The specified permission mask. 287 * @param fLibc LIBC filehandle flags. 288 * @param ppFH Where to store the LIBC filehandle structure which was created 289 * for the opened file. 290 */ 291 int __libc_Back_ioFileOpen(const char *pszFile, int fFlags, off_t cbInitial, mode_t Mode, unsigned fLibc, PLIBCFH *ppFH); 292 293 /** 294 * Change the current position of a file stream and get the new position. 295 * 296 * @returns new file offset on success. 297 * @returns Negative error code (errno) on failure. 298 * @param hFile File handle to preform seek operation on. 299 * @param off Offset to seek to. 300 * @param iMethod The seek method. SEEK_CUR, SEEK_SET or SEEK_END. 301 */ 302 off_t __libc_Back_ioSeek(int hFile, off_t off, int iMethod); 303 304 /** 305 * Sets the size of an open file. 306 * 307 * When expanding a file the contents of the allocated 308 * space is undefined. 309 * 310 * @returns 0 on success. 311 * @returns Negative error code (errno.h) on failure. 312 * @param fh Handle to the file which size should be changed. 313 * @param cbFile The new filesize. 314 * @param fZero If set any new allocated file space will be 315 * initialized to zero. 316 */ 317 int __libc_Back_ioFileSizeSet(int fh, __off_t cbFile, int fZero); 86 318 87 319 /** … … 89 321 * 90 322 * @returns 0 on success. 91 * @returns -1 and errnoon failure.323 * @returns Negative error code (errno.h) on failure. 92 324 * @param fh The file handle. 93 325 * @param pszPath Where to store the path. 94 326 * @param cchPath The size of he buffer pointed to by pszPath. 95 327 */ 96 int __libc_Back_fhToPath(int fh, char *pszPath, size_t cchPath); 97 98 /** @} */ 99 100 101 /** @defgroup __libc_Back_fs LIBC Backend - File System 102 * @{ */ 103 104 /** 105 * Get the statistics for the filesystem which pszPath is located on. 106 * 107 * @returns 0 on success. 108 * @returns -1 and errno on failure. 109 * @param pszPath The path to somewhere in the filesystem. 110 * @param pStatFs Where to store the obtained information. 111 */ 112 int __libc_Back_fsStat(const char *pszPath, struct statfs *pStatFs); 113 114 /** 115 * Get file system statistics 116 * 117 * @returns 0 on success. 118 * @returns -1 and errno on failure. 119 * @param fh The filehandle of any file within the mounted file system. 120 * @param pStatFs Where to store the statistics. 121 */ 122 int __libc_Back_fsStatFH(int fh, struct statfs *pStatFs); 123 124 /** 125 * Get the statistics for all the mounted filesystems. 126 * 127 * @returns Number of returned statfs structs on success. 128 * @returns Number of mounted filesystems on success if paStatFS is NULL 129 * @returns -1 and errno on failure. 130 * @param paStatFs Where to to store the statistics. 131 * @param cStatFS Number of structures the array pointed to by paStatFs can hold. 132 * @param fFlags Flags, currently ignored. 133 */ 134 int __libc_Back_fsStats(struct statfs *paStatFs, unsigned cStatFs, unsigned fFlags); 135 136 /** 137 * Schedules all file system buffers for writing. 138 * 139 * See sync() for OS/2 limitations. 140 */ 141 void __libc_Back_fsSync(void); 142 143 /** 144 * Sets or change the unixroot of the current process. 145 * 146 * @returns 0 on success. 147 * @returns -1 and errno on failure. 148 * @param pszNewRoot The new root. 149 */ 150 int __libc_Back_fsChRoot(const char *pszNewRoot); 328 int __libc_Back_ioFHToPath(int fh, char *pszPath, size_t cchPath); 329 330 /** @} */ 151 331 152 332 /** @} */ … … 163 343 * 164 344 * @returns 0 on success. 165 * @returns -1 and errnoon failure.345 * @returns Negative error code (errno.h) on failure. 166 346 * @param pardAvgs Where to store the samples. 167 347 * @param cAvgs Number of samples to get. Max is 3. -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/logstrict.h
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r1518 r1519 182 182 #define __LIBC_LOG_GRP_ENV 15 183 183 184 /** Backend FS APIs. */ 185 #define __LIBC_LOG_GRP_BACK_FS 23 184 186 /** Shared Process Database and LIBC Shared Memory APIs. */ 185 187 #define __LIBC_LOG_GRP_SPM 24 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/InnoTekLIBC/sharedpm.h
-
Property cvs2svn:cvs-rev
changed from
1.6
to1.7
r1518 r1519 178 178 typedef __LIBC_SPMINHFHBSOCK *__LIBC_PSPMINHFHBSOCK; 179 179 180 /** 181 * SPM fs inherit data. 182 */ 183 typedef struct __libc_SPMInhFS 184 { 185 /** In Unix Tree global. */ 186 int fInUnixTree; 187 /** Size of the unix root. Only set if there's an official root. */ 188 size_t cchUnixRoot; 189 /** The current unix root if cchUnixRoot is non-zero. */ 190 char szUnixRoot[1]; 191 } __LIBC_SPMINHFS; 192 /** Pointer to FS inherit data. */ 193 typedef __LIBC_SPMINHFS *__LIBC_PSPMINHFS; 194 195 180 196 181 197 /** … … 191 207 * This is a succession of bundles terminating with a _END one. */ 192 208 __LIBC_PSPMINHFHBHDR pFHBundles; 209 /** Pointer to the file system part. If NULL default values are assumed. */ 210 __LIBC_PSPMINHFS pFS; 193 211 194 212 /** @todo Add signals and the other properties which are inherited. */ … … 559 577 * 560 578 * @returns 0 on success. 561 * @returns -1 and errnoon failure.579 * @returns Negative error code (errno.h) on failure. 562 580 * @param pLoadAvg Where to store the load average samples. 563 581 * @param puTimestamp Where to store the current timestamp. … … 569 587 * 570 588 * @returns 0 on success. 571 * @returns -1 and errnoon failure.589 * @returns Negative error code (errno.h) on failure. 572 590 * @param pLoadAvg Where to store the load average samples. 573 591 */ -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/direct.h
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r1518 r1519 59 59 char _getdrive(void); 60 60 61 /* Special LIBC addition. */ 62 #ifdef __BSD_VISIBLE 63 char *_getcwdux(char *, size_t); 64 #endif 65 61 66 __END_DECLS 62 67 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/io.h
-
Property cvs2svn:cvs-rev
changed from
1.10
to1.11
r1518 r1519 384 384 int __libc_FHClose(int fh); 385 385 PLIBCFH __libc_FH(int fh); 386 int __libc_FHEx(int fh, __LIBC_PFH *ppFH); 386 387 387 388 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/emx/syscalls.h
-
Property cvs2svn:cvs-rev
changed from
1.10
to1.11
r1518 r1519 120 120 121 121 122 int __accept (int handle, struct sockaddr *addr, int *paddrlen);122 //dead int __accept (int handle, struct sockaddr *addr, int *paddrlen); 123 123 unsigned __alarm (unsigned sec); 124 int __bind (int handle, __const__ struct sockaddr *addr, int addrlen);124 //dead int __bind (int handle, __const__ struct sockaddr *addr, int addrlen); 125 125 void *__brk (void *addr); 126 126 void __cgets (char *buffer); 127 int __chdir (__const__ char *name);127 //dead int __chdir (__const__ char *name); 128 128 int __chmod (__const__ char *name, int flag, int attr); 129 129 int __chdrive (char drive); 130 int __chsize (int handle, off_t length);130 //dead int __chsize (int handle, off_t length); 131 131 long long __clock (void); 132 132 int __close (int handle); 133 int __connect (int handle, __const__ struct sockaddr *addr, int addrlen);133 //dead int __connect (int handle, __const__ struct sockaddr *addr, int addrlen); 134 134 int __core (int handle); 135 135 int __dup (int handle); … … 142 142 int __findfirst (__const__ char *name, int attr, struct _find *fp); 143 143 int __findnext (struct _find *fp); 144 int __fork (void);145 int __fstat (int handle, struct stat *buffer);144 //dead int __fork (void); 145 //dead int __fstat (int handle, struct stat *buffer); 146 146 int __fsync (int handle); 147 147 void __ftime (struct timeb *ptr); 148 int __ftruncate (int handle, off_t length);149 int __getcwd (char *buffer, char drive);148 //dead int __ftruncate (int handle, off_t length); 149 //dead int __getcwd (char *buffer, char drive); 150 150 char __getdrive (void); 151 int __gethostbyaddr (__const__ char *addr, int len, int type,152 struct hostent **dst);153 int __gethostbyname (__const__ char *name, struct hostent **dst);154 int __gethostid (int *dst);155 int __gethostname (char *name, int len);156 int __getnetbyname (__const__ char *name, struct netent **dst);157 int __getnetbyaddr (long net, struct netent **dst);158 int __getpeername (int handle, struct sockaddr *name, int *pnamelen);151 //dead int __gethostbyaddr (__const__ char *addr, int len, int type, 152 //dead struct hostent **dst); 153 //dead int __gethostbyname (__const__ char *name, struct hostent **dst); 154 //dead int __gethostid (int *dst); 155 //dead int __gethostname (char *name, int len); 156 //dead int __getnetbyname (__const__ char *name, struct netent **dst); 157 //dead int __getnetbyaddr (long net, struct netent **dst); 158 //dead int __getpeername (int handle, struct sockaddr *name, int *pnamelen); 159 159 int __getpid (void); 160 160 int __getppid (void); 161 int __getprotobyname (__const__ char *name, struct protoent **dst);162 int __getprotobynumber (int prot, struct protoent **dst);163 int __getservbyname (__const__ char *name, __const__ char *proto,164 struct servent **dst);165 int __getservbyport (int port, __const__ char *proto, struct servent **dst);166 int __getsockhandle (int handle);167 int __getsockname (int handle, struct sockaddr *name, int *pnamelen);168 int __getsockopt (int handle, int level, int optname, void *optval,169 int *poptlen);170 int __imphandle (int handle);171 int __impsockhandle (int handle, int flags);161 //dead int __getprotobyname (__const__ char *name, struct protoent **dst); 162 //dead int __getprotobynumber (int prot, struct protoent **dst); 163 //dead int __getservbyname (__const__ char *name, __const__ char *proto, 164 //dead struct servent **dst); 165 //dead int __getservbyport (int port, __const__ char *proto, struct servent **dst); 166 //dead int __getsockhandle (int handle); 167 //dead int __getsockname (int handle, struct sockaddr *name, int *pnamelen); 168 //dead int __getsockopt (int handle, int level, int optname, void *optval, 169 //dead int *poptlen); 170 //dead int __imphandle (int handle); 171 //dead int __impsockhandle (int handle, int flags); 172 172 int __ioctl1 (int handle, int code); 173 173 int __ioctl2 (int handle, unsigned long request, int arg); 174 174 int __kill (int pid, int sig); 175 175 int __listen (int handle, int backlog); 176 off_t __lseek (int handle, off_t offset, int origin);176 //dead off_t __lseek (int handle, off_t offset, int origin); 177 177 int __memavail (void); 178 int __mkdir (__const__ char *name);178 //dead int __mkdir (__const__ char *name); 179 179 int __newthread (int tid); 180 180 struct __libc_FileHandle; 181 int __open (__const__ char *name, int flags, off_t size, unsigned fLibc, struct __libc_FileHandle **pFH);181 //dead int __open (__const__ char *name, int flags, off_t size, mode_t cmode, unsigned fLibc, struct __libc_FileHandle **pFH); 182 182 int __pause (void); 183 183 int __pipe(int *two_handles, int pipe_size, struct __libc_FileHandle **ppFHRead, struct __libc_FileHandle **ppFHWrite); … … 191 191 int __remove (__const__ char *name); 192 192 int __rename (__const__ char *old_name, __const__ char *new_name); 193 int __rmdir (__const__ char *name);193 //dead int __rmdir (__const__ char *name); 194 194 void *__sbrk (int incr); 195 195 void __scrsize (int *dst); 196 int __select(int nfds, struct fd_set *readfds, struct fd_set *writefds,197 struct fd_set *exceptfds, struct timeval *tv);198 int __send (int handle, __const__ void *buf, int len, unsigned flags);199 int __sendto (__const__ struct _sendto *args);200 int __setsockopt (int handle, int level, int optname, __const__ void *optval,201 int optlen);196 //dead int __select(int nfds, struct fd_set *readfds, struct fd_set *writefds, 197 //dead struct fd_set *exceptfds, struct timeval *tv); 198 //dead int __send (int handle, __const__ void *buf, int len, unsigned flags); 199 //dead int __sendto (__const__ struct _sendto *args); 200 //dead int __setsockopt (int handle, int level, int optname, __const__ void *optval, 201 //dead int optlen); 202 202 int __settime (const struct timeval *tp); 203 int __shutdown (int handle, int how);203 //dead int __shutdown (int handle, int how); 204 204 int __sigaction (int _sig, __const__ struct sigaction *_iact, 205 205 struct sigaction *_oact); … … 210 210 unsigned __sleep (unsigned sec); 211 211 unsigned __sleep2 (unsigned millisec); 212 int __socket (int domain, int type, int protocol);212 //dead int __socket (int domain, int type, int protocol); 213 213 int __spawnve (struct _new_proc *np); 214 int __stat (__const__ char *name, struct stat *buffer);214 //dead int __stat (__const__ char *name, struct stat *buffer); 215 215 int __swchar (int flag, int new_char); 216 216 int __uflags (int mask, int new_flags); 217 217 long __ulimit (int cmd, long new_limit); 218 int __umask (int pmode);218 //dead int __umask (int pmode); 219 219 void __unwind2 (void *xcpt_reg_ptr); 220 220 int __utimes (__const__ char *name, __const__ struct timeval *tvp); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/io.h
-
Property cvs2svn:cvs-rev
changed from
1.10
to1.11
r1518 r1519 85 85 int truncate(const char *, off_t); 86 86 #endif 87 int umask (int);87 mode_t umask(mode_t); 88 88 int unlink (__const__ char *); 89 89 int write (int, __const__ void *, size_t); -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/stdlib.h
-
Property cvs2svn:cvs-rev
changed from
1.24
to1.25
r1518 r1519 287 287 #endif /* __BSD_VISIBLE */ 288 288 289 290 291 /* bird: LIBC stuff - start */ 292 #ifdef __BSD_VISIBLE 293 char *_getcwdux(char *, size_t); 294 #endif 295 #ifdef __USE_GNU 296 char *canonicalize_file_name(const char *); 297 #endif 298 /* bird: LIBC stuff - end */ 289 299 290 300 -
Property cvs2svn:cvs-rev
changed from
-
trunk/src/emx/include/unistd.h
-
Property cvs2svn:cvs-rev
changed from
1.19
to1.20
r1518 r1519 408 408 409 409 410 #if !defined(_POSIX_SOURCE) 411 412 413 #endif 414 415 410 /* 411 * LIBC additions. 412 */ 413 #ifdef __BSD_VISIBLE 414 char *_getcwdux(char *, size_t); 415 #endif 416 417 418 /* 419 * EMX stuff. 420 */ 416 421 #if !defined(_POSIX_SOURCE) || defined(_WITH_UNDERSCORE) 417 422 /** @todo update this section to match the one without underscores as far as needed! */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.