genericopenlibs/openenvcore/include/unistd.dosc
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 /** @file  ../include/unistd.h
       
     2 @internalComponent
       
     3 */
       
     4 
       
     5 /** @fn  access(const char *fn, int flags)
       
     6 @param fn
       
     7 @param flags
       
     8 
       
     9 @return   Upon successful completion, the value 0 is returned; otherwise the
       
    10 value -1 is returned and the global variable errno is set to indicate the
       
    11 error.
       
    12 
       
    13   The access system calls check the accessibility of the file named in the fn argument for the access permissions indicated by the flags argument.
       
    14  The value of flags is either the bitwise-inclusive OR of the access permissions to be 
       
    15 checked (R_OK for read permission, W_OK for write permission, and X_OK for execute/search permission), or the existence test ( F_OK. )
       
    16 
       
    17  For additional information on file access permissions see File Access Permissions.
       
    18 
       
    19 Examples:
       
    20 @code
       
    21 /* Detailed description: This sample code checks read-ok accessibility of file Example.c
       
    22  *
       
    23  * Precondtions: Example.txt file should be present in working directory.
       
    24  */
       
    25 #include <unistd.h>
       
    26 int main()
       
    27 {
       
    28   if(access("Example.c" ,R_OK)  < 0)  
       
    29   {
       
    30     printf("Read operation on the file is not permitted") ;
       
    31     return -1 ;
       
    32   }
       
    33   printf("Read operation permitted on Example.c file") ;
       
    34   return 0 ;
       
    35 }
       
    36 
       
    37 @endcode
       
    38  Output
       
    39 @code
       
    40 Read operation permitted on Example.c file
       
    41 
       
    42 @endcode
       
    43 
       
    44 Limitations:
       
    45 
       
    46 The fn parameter should not exceed 256 characters in length. 
       
    47 
       
    48 KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
       
    49 not found or filesystem not mounted on the drive.
       
    50 
       
    51 @see chmod()
       
    52 @see stat()
       
    53 
       
    54 
       
    55 
       
    56 @capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&)
       
    57 
       
    58 @publishedAll
       
    59 @externallyDefinedApi
       
    60 */
       
    61 
       
    62 /** @fn  chdir(const char *_path)
       
    63 @param _path
       
    64 
       
    65 Note: This description also covers the following functions -
       
    66  fchdir() 
       
    67 
       
    68 @return   Upon successful completion, the value 0 is returned; otherwise the
       
    69 value -1 is returned and the global variable errno is set to indicate the
       
    70 error.
       
    71 
       
    72   The path argument points to the pathname of a directory.
       
    73 The chdir system call
       
    74 causes the named directory
       
    75 to become the current working directory, that is,
       
    76 the starting point for path searches of pathnames not beginning with a slash, ‘/.’
       
    77 
       
    78  The fchdir system call causes the directory referenced by the file descriptor fd to become the current working directory, the starting point for path 
       
    79   searches of pathnames not beginning with a slash, ‘/.’
       
    80 
       
    81 
       
    82 
       
    83 Examples:
       
    84 @code
       
    85 /*
       
    86  *  Detailed description   : This test code demonstrates usage of chdir system call
       
    87  *
       
    88  *  Preconditions : "Example" directory should be present in current working
       
    89    directory.
       
    90  */
       
    91 #include <unistd.h>
       
    92 int main()
       
    93 {
       
    94   if(chdir("Example") < 0 )  
       
    95   {
       
    96      printf("Failed to change working directory");
       
    97      return -1 ;
       
    98   }
       
    99   printf("Working directory changed");
       
   100   return 0 ;
       
   101 }
       
   102 
       
   103 @endcode
       
   104  Output
       
   105 @code
       
   106 Working directory changed
       
   107 
       
   108 @endcode
       
   109 @code
       
   110 #include<unistd.h>
       
   111 #include<stdio.h>
       
   112 int test_fchdir()
       
   113 {
       
   114    int retVal;
       
   115    int rmdr;
       
   116    int mkdr = mkdir("test_dir", S_IWUSR);
       
   117    if( !mkdr )
       
   118    {
       
   119      int opn = open("test_dir", O_RDONLY);
       
   120      if( opn != -1 )
       
   121      {
       
   122        retVal = fchdir( opn );
       
   123        if( !retVal )
       
   124        {
       
   125          printf("Fchdir passed");
       
   126        }
       
   127        else
       
   128        {
       
   129          printf("Failed");
       
   130        }
       
   131        int cls = close(opn);
       
   132      }
       
   133      else
       
   134      {
       
   135        printf("Failed");
       
   136      }
       
   137      rmdr = rmdir("test_dir");  
       
   138    }
       
   139    else
       
   140    {
       
   141      printf("Failed");
       
   142    }
       
   143 }
       
   144 
       
   145 @endcode
       
   146  Output
       
   147 @code
       
   148 Fchdir passed
       
   149 
       
   150 @endcode
       
   151 
       
   152 Limitations:
       
   153 
       
   154 The path parameter should not exceed 256 characters in length. 
       
   155 KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
       
   156 not found or filesystem not mounted on the drive.
       
   157 
       
   158 @capability Deferred @ref RFs::SetSessionPath(const TDesC16&)
       
   159 @capability Deferred @ref RFs::Att(const TDesC16&, unsigned&)
       
   160 
       
   161 @publishedAll
       
   162 @externallyDefinedApi
       
   163 */
       
   164 
       
   165 /** @fn  chown(const char *path, uid_t owner, gid_t group)
       
   166 @param path
       
   167 @param owner
       
   168 @param group
       
   169 
       
   170 Note: This description also covers the following functions -
       
   171  lchown() 
       
   172 
       
   173 @return   These functions always return 0.
       
   174 
       
   175  
       
   176 
       
   177  The chown and lchown functions are build supported but not available functionally.
       
   178 
       
   179  Symbian OS does not support the concepts of multiple users and groups.
       
   180 
       
   181 Limitations:
       
   182 
       
   183 KErrNotReady of symbian error code is mapped to ENOENT, which typically means drive
       
   184 not found or filesystem not mounted on the drive.
       
   185 
       
   186 
       
   187  
       
   188 
       
   189 @publishedAll
       
   190 @externallyDefinedApi
       
   191 */
       
   192 
       
   193 /** @fn  close(int fd)
       
   194 @param fd
       
   195 @return   The close() function returns the value 0 if successful; otherwise it returns 
       
   196 the value -1 and sets the global variable errno to indicate the error.
       
   197 
       
   198   The close system call deletes a descriptor from the per-process object reference 
       
   199 table. If this is the last reference to the underlying object the object will 
       
   200 be deactivated. For example, on the last close of a file the current seek pointer associated with the file is lost; on the last close of a socket any file descriptor for that file is closed by that process.
       
   201 
       
   202 If 'fd' refers to a shared memory object that is still referenced at the last close, the 
       
   203 contents of the memory object persists till it is unreferenced. 
       
   204 If this is the last close of the shared memory object and the close results in unreferencing of the memory 
       
   205 object and the memory object is unlinked, (only in this scenario) the memory object is removed.
       
   206 
       
   207  When a process exits all associated file descriptors are freed. As there is 
       
   208   a limit on active descriptors per processes the close system call is useful when a large quantity of file descriptors 
       
   209   are being handled.
       
   210 
       
   211 
       
   212 
       
   213 Examples:
       
   214 @code
       
   215 /* Detailed description   : This test code demonstrates usage of close  system call
       
   216  *
       
   217  * Preconditions :  None.
       
   218  */
       
   219 #include <stdio.h>
       
   220 #include <unistd.h>
       
   221 #include <sys/types.h>
       
   222 #include <fcntl.h>
       
   223 int main()
       
   224 {
       
   225   int fd = 0;
       
   226   fd = open("Example.txt" , O_CREAT | O_RDWR , 0666);
       
   227   if(fd < 0 ) 
       
   228   {
       
   229     printf("Failed to open file Example.txt");
       
   230     return -1;
       
   231   }
       
   232  if(close(fd) < 0 )
       
   233  {
       
   234    printf("Failed to close  file Example.txt");
       
   235    return -1;
       
   236  }
       
   237  printf("File Example.txt closed" );
       
   238  return 0;
       
   239 }
       
   240 
       
   241 @endcode
       
   242  Output
       
   243 @code
       
   244 File Example.txt closed
       
   245 
       
   246 @endcode
       
   247 @see accept()
       
   248 @see fcntl()
       
   249 @see flock()
       
   250 @see open()
       
   251 @see pipe()
       
   252 @see socket()
       
   253 @see shm_open()
       
   254 @see shm_unlink()
       
   255  
       
   256 
       
   257 @publishedAll
       
   258 @externallyDefinedApi
       
   259 */
       
   260 
       
   261 /** @fn  dup(int aFid)
       
   262 @param aFid
       
   263 
       
   264 Note: This description also covers the following functions -
       
   265  dup2() 
       
   266 
       
   267 @return   The value -1 is returned if an error occurs in either call.
       
   268 The external variable errno indicates the cause of the error.
       
   269 
       
   270   The dup system call
       
   271 duplicates an existing object descriptor and returns its value to
       
   272 the calling process ( newd = dup (aFid, ).); The argument aFid is a small non-negative integer index in
       
   273 the per-process descriptor table.
       
   274 
       
   275  The new descriptor returned by the call
       
   276 is the lowest numbered descriptor
       
   277 currently not in use by the process.
       
   278 
       
   279  The object referenced by the descriptor does not distinguish
       
   280 between aFid and newd in any way.
       
   281 Thus if newd and aFid are duplicate references to an open
       
   282 file, read , write and lseek calls all move a single pointer into the file,
       
   283 and append mode, non-blocking I/O and asynchronous I/O options
       
   284 are shared between the references.
       
   285 If a separate pointer into the file is desired, a different
       
   286 object reference to the file must be obtained by issuing an
       
   287 additional open system call.
       
   288 
       
   289  In dup2, the value of the new descriptor newd is specified.
       
   290 If this descriptor is already in use and oldd != newd, the descriptor is first deallocated as if the close system call had been used.
       
   291 If aFid is not a valid descriptor, then newd is not closed.
       
   292 If aFid == newd and aFid is a valid descriptor, then dup2 is successful, and does nothing.
       
   293 
       
   294  Limitation: 
       
   295  
       
   296 @code
       
   297 dup2(int oldfd, int newfd); 
       
   298 @endcode
       
   299 The return value of dup2 can be different 
       
   300   from the one user expected to be (newfd). Users of dup2 must therefor use the 
       
   301   return value of dup2 as the new allocated fd rather than the one passed in (newfd). 
       
   302   As described above, if dup2 is successful the newfd and return values are the 
       
   303   same, .
       
   304 
       
   305 Examples:
       
   306 @code
       
   307 /*
       
   308  *Detailed description : Sample usage of dup system call
       
   309  */
       
   310 #include <unistd.h>
       
   311 #include <fcntl.h>
       
   312 #include <stdio.h>
       
   313 int main()
       
   314 {
       
   315   int fd;
       
   316   FILE *Fil;
       
   317   int Newfd;
       
   318   fd = open("Example.txt" , O_CREAT | O_RDWR , 0666);
       
   319   if(fd < 0 )  {
       
   320      printf("Failed to open file Example.txt");
       
   321      return -1;
       
   322   }
       
   323   Newfd  = dup(fd );
       
   324   if(Newfd < 0 ) 
       
   325   {
       
   326     printf("Failed to duplicate file descriptor");
       
   327     return -1 ;
       
   328   }
       
   329   close(fd);
       
   330   close(Newfd);
       
   331   printf("New Duped fd is %d" , Newfd);
       
   332   return 0;
       
   333 }
       
   334 
       
   335 @endcode
       
   336  Output
       
   337 @code
       
   338 New Duped fd is 4
       
   339 
       
   340 @endcode
       
   341 @code
       
   342 /*
       
   343  *Detailed description : Sample usage of dup system call
       
   344  */
       
   345 #include <unistd.h>
       
   346 #include <fcntl.h>
       
   347 #include <errno.h>
       
   348 #include <stdio.h>
       
   349 int main()
       
   350 {
       
   351   int fd;
       
   352   FILE *Fil;
       
   353   int Newfd;
       
   354   fd = open("Example.txt" , O_CREAT | O_RDWR , 0666);
       
   355   if(fd < 0 )  {
       
   356      printf("Failed to open file Example.txt");
       
   357      return -1;
       
   358   }
       
   359   Newfd  = dup2(fd  , 4);
       
   360   if(Newfd < 0 )  {
       
   361     printf("Failed to duplicate file descriptor");
       
   362     return -1;
       
   363   }
       
   364   close(fd);
       
   365   close(Newfd);
       
   366   printf("New Duped fd is %d" , Newfd);
       
   367   return 0;
       
   368 }
       
   369 
       
   370 @endcode
       
   371  Output
       
   372 @code
       
   373 New Duped fd is 4
       
   374 
       
   375 @endcode
       
   376 @see accept()
       
   377 @see close()
       
   378 @see fcntl()
       
   379 @see getdtablesize()
       
   380 @see open()
       
   381 @see pipe()
       
   382 @see socket()
       
   383 
       
   384 
       
   385  
       
   386 
       
   387 @publishedAll
       
   388 @externallyDefinedApi
       
   389 */
       
   390 
       
   391 /** @fn  dup2(int aFid1, int aFid2)
       
   392 @param aFid1
       
   393 @param aFid2
       
   394 
       
   395 Refer to  dup() for the documentation
       
   396 @see accept()
       
   397 @see close()
       
   398 @see fcntl()
       
   399 @see getdtablesize()
       
   400 @see open()
       
   401 @see pipe()
       
   402 @see socket()
       
   403 
       
   404 
       
   405  
       
   406 
       
   407 @publishedAll
       
   408 @externallyDefinedApi
       
   409 */
       
   410 
       
   411 /** @fn  fpathconf(int fd, int name)
       
   412 @param fd
       
   413 @param name
       
   414 
       
   415 Refer to  pathconf() for the documentation
       
   416 
       
   417 
       
   418  
       
   419 
       
   420 @publishedAll
       
   421 @externallyDefinedApi
       
   422 */
       
   423 
       
   424 /** @fn  getcwd(char *_buf, size_t _size)
       
   425 @param _buf
       
   426 @param _size
       
   427 @return   Upon successful completion a pointer to the pathname is returned. Otherwise 
       
   428 a NULL pointer is returned and the global variable errno is set to indicate the error. In addition, getwd copies the error message associated with errno into the memory referenced by buf.
       
   429 
       
   430   The getcwd function copies the absolute pathname of the current working directory
       
   431 into the memory referenced by buf and returns a pointer to buf. The size argument is the _size, in bytes, of the array referenced by buf.
       
   432 
       
   433  If _buf is NULL, space is allocated as indicated by size to store the pathname and the current working directory is
       
   434 returned as long as the _size bytes are sufficient to hold the working directory name.
       
   435 This space may later be free’d.
       
   436 
       
   437  This routine has traditionally been used by programs to save the
       
   438 name of a working directory for the purpose of returning to it.
       
   439 A much faster and less error-prone method of accomplishing this is to
       
   440 open the current directory ((‘.’) and use the fchdir function to return.
       
   441 
       
   442 Examples:
       
   443 @code
       
   444 #include<unistd.h>
       
   445 #include<stdio.h>
       
   446 #include <stdlib.h>
       
   447 #define BUF_SIZE 100
       
   448   
       
   449 int main()
       
   450 {
       
   451  //change directory to c:
       
   452  int c;
       
   453  long size = BUF_SIZE;
       
   454  char *buf = NULL;
       
   455  char *ptr = NULL;
       
   456   
       
   457  c = chdir("c:\");
       
   458   
       
   459  buf = (char *)malloc((size_t)size);
       
   460   
       
   461  if (buf != NULL && c == 0)
       
   462  {
       
   463   //call getcwd to fetch teh current directory
       
   464   ptr = getcwd(buf, (size_t)size);
       
   465   printf("getcwd returned: %s", ptr);
       
   466  }
       
   467    
       
   468  return 0;
       
   469 }
       
   470 
       
   471 @endcode
       
   472  Output
       
   473 @code
       
   474 getcwd returned: c:
       
   475 
       
   476 @endcode
       
   477 
       
   478 Notes:
       
   479 
       
   480  The getcwd function
       
   481 returns the default working directory as c:\\private\\XXXXXXXX (where XXXXXXXX is the UID of the process) as the default session path is
       
   482 initialised to c:\\private\\current_process'_UID, in case of Symbian OS.
       
   483 @see chdir()
       
   484 @see malloc()
       
   485 @see strerror()
       
   486 
       
   487 
       
   488  
       
   489 
       
   490 @publishedAll
       
   491 @externallyDefinedApi
       
   492 */
       
   493 
       
   494 /** @fn  getegid(void)
       
   495 Refer to  getgid() for the documentation
       
   496 
       
   497 
       
   498  
       
   499 
       
   500 @publishedAll
       
   501 @externallyDefinedApi
       
   502 */
       
   503 
       
   504 /** @fn  geteuid(void)
       
   505 Refer to  getuid() for the documentation
       
   506 
       
   507 
       
   508  
       
   509 
       
   510 @publishedAll
       
   511 @externallyDefinedApi
       
   512 */
       
   513 
       
   514 /** @fn  getgid(void)
       
   515 
       
   516 
       
   517 Note: This description also covers the following functions -
       
   518  getegid() 
       
   519 
       
   520 @return   These functions always return 0.
       
   521 
       
   522   getgid and getegid are build supported but not available functionally. Symbian OS 
       
   523 does not support multiple users and groups.
       
   524 
       
   525 
       
   526 
       
   527  
       
   528 
       
   529 @publishedAll
       
   530 @externallyDefinedApi
       
   531 */
       
   532 
       
   533 
       
   534 /** @fn  getgroups(int size, gid_t grouplist[])
       
   535 @param size
       
   536 @param grouplist
       
   537 @return   These functions always return 0.
       
   538 
       
   539   The getgroups function build supported but not available functionally. Symbian 
       
   540 OS does not support multiple users and groups.
       
   541 
       
   542 
       
   543 
       
   544 
       
   545 
       
   546  
       
   547 
       
   548 @publishedAll
       
   549 @externallyDefinedApi
       
   550 */
       
   551 
       
   552 /** @fn  getpgrp(void)
       
   553 Note: This description also covers the following functions -
       
   554  getpgid() 
       
   555 
       
   556 @return   These functions always return 0.
       
   557 
       
   558   getpgrp and getpgid are build supported but not available functionally. Symbian OS 
       
   559 does not support multiple users and groups.
       
   560 
       
   561 
       
   562 
       
   563 
       
   564 
       
   565  
       
   566 
       
   567 @publishedAll
       
   568 @externallyDefinedApi
       
   569 */
       
   570 
       
   571 /** @fn  getpid(void)
       
   572 
       
   573 Note: This description also covers the following functions -
       
   574  getppid() 
       
   575 
       
   576   The getpid system call returns the process ID of the calling process. Though 
       
   577 the ID is guaranteed to be unique it should NOT be used for constructing temporary file names for security reasons; 
       
   578 see mkstemp instead.
       
   579 
       
   580  The getppid system call
       
   581 returns the process ID of the parent
       
   582 of the calling process.
       
   583 
       
   584 Examples:
       
   585 @code
       
   586 /*
       
   587  * Detailed description : Sample usage of getpid system call
       
   588  */
       
   589 #include <unistd.h>
       
   590 int main() 
       
   591 {
       
   592   pid_t pid ;
       
   593   if((pid = getpid()) < 0 ) 
       
   594   {
       
   595      printf("getpid system call failed") ;
       
   596      return -1 ;
       
   597   }
       
   598   printf("pid of this process is %d " , pid) ;
       
   599   return 0 ;
       
   600 }
       
   601 
       
   602 @endcode
       
   603 
       
   604 
       
   605  
       
   606 
       
   607 @publishedAll
       
   608 @externallyDefinedApi
       
   609 */
       
   610 
       
   611 /** @fn  getppid(void)
       
   612 Refer to  getpid() for the documentation
       
   613 
       
   614 
       
   615  
       
   616 
       
   617 @publishedAll
       
   618 @externallyDefinedApi
       
   619 */
       
   620 
       
   621 /** @fn  getuid(void)
       
   622 Note: This description also covers the following functions -
       
   623  geteuid() 
       
   624 
       
   625 @return   These functions always return 0.
       
   626 
       
   627   getuid and geteuid are build supported but not available functionally. Symbian OS 
       
   628 does not support multiple users and groups.
       
   629 
       
   630 
       
   631 
       
   632  
       
   633 
       
   634 @publishedAll
       
   635 @externallyDefinedApi
       
   636 */
       
   637 
       
   638 /** @fn  isatty(int fd)
       
   639 @param fd
       
   640 @return   The isatty returns 1 if fd is an open descriptor connected to a terminal; returns 0 otherwise.
       
   641 
       
   642   This function operate on the system file descriptors for character special devices.
       
   643 
       
   644  The isatty function
       
   645 determines if the file descriptor fd refers to a valid
       
   646 terminal type device.
       
   647 
       
   648 Examples:
       
   649 @code
       
   650 #include<unistd.h>
       
   651 #include<stdio.h>
       
   652 #include<fcntl.h> //O_APPEND
       
   653  
       
   654 int main()
       
   655 {
       
   656  int x = isatty(0); //stdin (fd = 0)
       
   657  int y = isatty(1); //stdout (fd = 1)
       
   658  int z = isatty(2); //stderr (fd = 2)
       
   659  
       
   660  printf("{Expected: 1 1 1} %d %d %d", x, y, z);
       
   661  
       
   662  int i = isatty(5); //some invalid fd
       
   663   
       
   664  int fd_file = open("c:\some.txt", O_APPEND);
       
   665   
       
   666  int j = isatty(fd_file); //valid fd of a text file
       
   667   
       
   668  int fd_pipe[3];
       
   669  int p = pipe(fd_pipe);
       
   670   
       
   671  int k = isatty(fd_pipe[1]); //valid fd of a pipe
       
   672        
       
   673  close(fd_file);         
       
   674  close(fd_pipe[0]);      
       
   675  close(fd_pipe[1]);
       
   676       
       
   677  printf("{Expected: 0 0 0} %d %d %d", i, j, k);
       
   678  
       
   679  unlink("c:\some.txt");
       
   680  
       
   681  return 0;
       
   682 }
       
   683 
       
   684 @endcode
       
   685  Output
       
   686 @code
       
   687 {Expected: 1 1 1} 1 1 1
       
   688 {Expected: 0 0 0} 0 0 0
       
   689 
       
   690 @endcode
       
   691 @see ioctl()
       
   692 
       
   693 
       
   694  
       
   695 
       
   696 @publishedAll
       
   697 @externallyDefinedApi
       
   698 */
       
   699 
       
   700 /** @fn  link(const char *oldpath, const char *newpath)
       
   701 @param oldpath
       
   702 @param newpath
       
   703 @return   Returns 0 on successful completion. Otherwise returns -1 and sets errno to indicate the error.
       
   704 
       
   705   The link system call atomically creates the specified directory entry (hard 
       
   706 link) newpath with the attributes of the underlying object pointed at by oldpath. Note that if the link is successful the link count of the underlying 
       
   707 object is not incremented: On Symbian OS link functionality is simulated and the 
       
   708 underlying object is not aware of a existing link. Link is supported only on regular files and fifos. It is not on directories. Creation 
       
   709 of link on a existing link file is not supported.
       
   710 
       
   711  If oldpath is removed, the file newpath is also deleted as the platform recognizes the underlying object only by oldpath.
       
   712 
       
   713  The object pointed at by the oldpath argument must exist for the hard link to succeed and both oldpath and newpath must be in the same file system. The oldpath argument may not be a directory. Creation time stamp of the file 
       
   714   is not supported and access time stamp is equal to modification time stamp. 
       
   715   A newly created file will not alter the time stamp of parent directory.
       
   716 
       
   717 Examples:
       
   718 @code
       
   719 /*
       
   720  * Detailed description  : Example to create link to a file
       
   721  * Precondition : "Parent.txt" should exist in c: drive
       
   722  *
       
   723  */
       
   724 #include <unistd.h>
       
   725 #include <stdio.h>
       
   726 int main(void)
       
   727  {
       
   728     if(link("C:\Parent.txt","C:\Link") < 0)
       
   729     {
       
   730          printf("Link creation to parent file failed");
       
   731          return -1;
       
   732     }
       
   733     printf("Link to parent file created");
       
   734     return 0;
       
   735  }
       
   736 
       
   737 @endcode
       
   738  Output
       
   739 @code
       
   740 Link to parent file created.
       
   741 
       
   742 @endcode
       
   743 
       
   744 Limitations:
       
   745 
       
   746 - The oldpath and newpath parameters of the link() function should not exceed 256 characters in length. 
       
   747 - P.I.P.S. only simulates link files and does not distinguish between hard and symbolic links.
       
   748 
       
   749 - KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
       
   750 not found or filesystem not mounted on the drive.
       
   751 
       
   752 @see readlink()
       
   753 @see symlink()
       
   754 @see unlink()
       
   755 
       
   756 
       
   757 
       
   758 @capability Deferred @ref RFs::Delete(const TDesC16&)
       
   759 
       
   760 @publishedAll
       
   761 @externallyDefinedApi
       
   762 */
       
   763 
       
   764 /** @fn lseek(int fd, off_t pos, int whence)
       
   765 @param fd
       
   766 @param pos
       
   767 @param whence
       
   768 @return Upon successful completion,  lseek returns the resulting offset location as measured in bytes from the beginning of the file. Otherwise, a value of -1 is returned and  errno is set to indicate the error.
       
   769 
       
   770 The  lseek system call repositions the offset of the file descriptor  fildes to the argument  offset according to the directive  whence. The argument  fildes must be an open file descriptor. The  lseek system call repositions the file position pointer associated with the file descriptor  fildes as follows:
       
   771 	If whence is SEEK_SET, the offset is set to offset bytes.
       
   772 	If whence is SEEK_CUR, the offset is set to its current location plus offset bytes.
       
   773 	If whence is SEEK_END, the offset is set to the size of the file plus offset bytes.
       
   774 Some devices are incapable of seeking. The value of the pointer associated with such a device is undefined.
       
   775 
       
   776 If 'fd' refers to a shared memory object then lseek() on the shared memory object is supported by the current implementation.
       
   777 
       
   778 Note : lseek function allows the file offset to be set beyond the existing end-of-file, data in the seeked slot is undefined, and hence the read operation in seeked slot is undefined untill data is actually written into it. lseek beyond existing end-of-file increases the file size accordingly.
       
   779 
       
   780 Errors:
       
   781 
       
   782 The  lseek system call will fail and the file position pointer will remain unchanged if:
       
   783 [EBADF]	The fildes argument is not an open file descriptor.
       
   784 [EINVAL] 	The whence argument is not a proper value or the resulting file offset would be negative for a non-character special file.
       
   785 [EOVERFLOW]	The resulting file offset would be a value which cannot be represented correctly in an object of type off_t(Not supported).
       
   786 [ESPIPE] 	The fildes argument is associated with a pipe, socket, or FIFO.
       
   787 
       
   788 Examples:
       
   789 @code
       
   790 /*
       
   791  * Detailed description  : Example for lseek usage.
       
   792  */
       
   793 #include <stdio.h>
       
   794 #include <sys/stat.h>
       
   795 #include <fcntl.h>
       
   796 #include <sys/types.h>
       
   797 int main()
       
   798 {
       
   799 int fd = 0;
       
   800  fd = open("lseek.txt"  , O_CREAT | O_RDWR , 0666);
       
   801   if(lseek(fd , 0 , SEEK_SET) < 0 ) {
       
   802      printf("Lseek on file lseek.txt failed \n");
       
   803       return -1;
       
   804   }
       
   805   printf("Lseek on lseek.txt passed ");
       
   806  return 0;
       
   807 }
       
   808 
       
   809 @endcode
       
   810 Output
       
   811 @code
       
   812 Lseek on lseek.txt passed
       
   813 @endcode
       
   814 
       
   815 @see dup()
       
   816 @see open()
       
   817 
       
   818  
       
   819 
       
   820 @publishedAll
       
   821 @externallyDefinedApi
       
   822 */
       
   823 
       
   824 /** @fn  lseek64(int fildes, off64_t offset, int whence)
       
   825 @param fildes
       
   826 @param offset
       
   827 @param whence
       
   828 @return   Upon successful completion, lseek64 returns the resulting offset location as measured in bytes from the
       
   829 beginning of the file.
       
   830 Otherwise,
       
   831 a value of -1 is returned and errno is set to indicate
       
   832 the error.
       
   833 
       
   834 For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
       
   835 
       
   836 @see lseek()
       
   837  
       
   838 
       
   839 @publishedAll
       
   840 @externallyDefinedApi
       
   841 */
       
   842 
       
   843 /** @fn  pathconf(const char *path, int name)
       
   844 @param path
       
   845 @param name
       
   846 
       
   847 Note: This description also covers the following functions -
       
   848  fpathconf() 
       
   849 
       
   850 @return   If the call to pathconf or fpathconf is not successful, -1 is returned and errno is set appropriately.
       
   851 Otherwise, if the variable is associated with functionality that does
       
   852 not have a limit in the system, -1 is returned and errno is not modified.
       
   853 Otherwise, the current variable value is returned.
       
   854 
       
   855 The pathconf and fpathconf system calls provide a method for applications to determine the current
       
   856 value of a configurable system limit or option variable associated
       
   857 with a pathname or file descriptor.
       
   858 
       
   859 For pathconf, the path argument is the name of a file or directory.
       
   860 For fpathconf, the fd argument is an open file descriptor.
       
   861 The name argument specifies the system variable to be queried.
       
   862 Symbolic constants for each name value are found in the include file \<unistd.h\>.
       
   863 
       
   864  The available values are as follows:
       
   865 @code
       
   866  _PC_LINK_MAX
       
   867  	The maximum file link count.
       
   868 _PC_MAX_CANON
       
   869  	The maximum number of bytes in terminal canonical input line.
       
   870 _PC_MAX_INPUT
       
   871  	The minimum maximum number of bytes for which space is available in a terminal input queue.
       
   872 _PC_NAME_MAX
       
   873  	The maximum number of bytes in a file name.
       
   874 _PC_PATH_MAX
       
   875  	The maximum number of bytes in a pathname.
       
   876 _PC_PIPE_BUF
       
   877  	The maximum number of bytes which will be written atomically to a pipe.
       
   878 _PC_CHOWN_RESTRICTED
       
   879  	Return 1 if appropriate privilege is required for the chown system call, otherwise 0. -p1003.1-2001 requires appropriate privilege in all cases, but this behavior was optional in prior editions of the standard.
       
   880 _PC_NO_TRUNC
       
   881  	Return greater than zero if attempts to use pathname components longer than
       
   882 .Brq Dv NAME_MAX will result in an [ENAMETOOLONG] error; otherwise, such components will be truncated to
       
   883 .Brq Dv NAME_MAX. -p1003.1-2001 requires the error in all cases, but this behavior was optional in prior editions of the standard, and some non- POSIX -compliant file systems do not support this behavior.
       
   884 _PC_VDISABLE
       
   885  	Returns the terminal character disabling value.
       
   886 _PC_ASYNC_IO
       
   887  	Return 1 if asynchronous I/O is supported, otherwise 0.
       
   888 _PC_PRIO_IO
       
   889  	Returns 1 if prioritised I/O is supported for this file, otherwise 0.
       
   890 _PC_SYNC_IO
       
   891  	Returns 1 if synchronised I/O is supported for this file, otherwise 0.
       
   892 _PC_ALLOC_SIZE_MIN
       
   893  	Minimum number of bytes of storage allocated for any portion of a file.
       
   894 _PC_FILESIZEBITS
       
   895  	Number of bits needed to represent the maximum file size.
       
   896 _PC_REC_INCR_XFER_SIZE
       
   897  	Recommended increment for file transfer sizes between _PC_REC_MIN_XFER_SIZE and _PC_REC_MAX_XFER_SIZE.
       
   898 _PC_REC_MAX_XFER_SIZE
       
   899  	Maximum recommended file transfer size.
       
   900 _PC_REC_MIN_XFER_SIZE
       
   901  	Minimum recommended file transfer size.
       
   902 _PC_REC_XFER_ALIGN
       
   903  	Recommended file transfer buffer alignment.
       
   904 _PC_SYMLINK_MAX
       
   905  	Maximum number of bytes in a symbolic link.
       
   906 _PC_ACL_EXTENDED
       
   907  	Returns 1 if an Access Control List (ACL) can be set on the specified file, otherwise 0.
       
   908 _PC_ACL_PATH_MAX
       
   909  	Maximum number of ACL entries per file.
       
   910 _PC_CAP_PRESENT
       
   911  	Returns 1 if a capability state can be set on the specified file, otherwise 0.
       
   912 _PC_INF_PRESENT
       
   913  	Returns 1 if an information label can be set on the specified file, otherwise 0.
       
   914 _PC_MAC_PRESENT
       
   915  	Returns 1 if a Mandatory Access Control (MAC) label can be set on the specified file, otherwise 0.
       
   916 @endcode
       
   917   
       
   918 Errors:
       
   919 
       
   920 If any of the following conditions occur, the  pathconf and  fpathconf system calls shall return -1 and set  errno to the corresponding value.
       
   921 [EINVAL]	The value of the name argument is invalid.
       
   922 [EINVAL] 	The implementation does not support an association of the variable name with the associated file.
       
   923 The pathconf system call will fail if:
       
   924 [ENOTDIR] 	A component of the path prefix is not a directory.
       
   925 [ENAMETOOLONG] 	A component of a pathname exceeded
       
   926 .Brq Dv NAME_MAX characters (but see _PC_NO_TRUNC above), or an entire path name exceeded
       
   927 .Brq Dv PATH_MAX characters.
       
   928 [ENOENT] 	The named file does not exist.
       
   929 [EACCES] 	Search permission is denied for a component of the path prefix.
       
   930 [ELOOP] 	Too many symbolic links were encountered in translating the pathname.
       
   931 [EIO] 	An I/O error occurred while reading from or writing to the file system.
       
   932 The fpathconf system call will fail if:
       
   933 [EBADF] 	The fd argument is not a valid open file descriptor.
       
   934 [EIO] 	An I/O error occurred while reading from or writing to the file system.
       
   935 
       
   936 Examples:
       
   937 @code
       
   938 #include<unistd.h>
       
   939 #include<stdio.h>
       
   940 int test_pathconf()
       
   941 {
       
   942    int fp = open("test_pathconf1.txt", O_RDWR|O_CREAT);
       
   943    if(fp != -1)
       
   944    {
       
   945      int n = pathconf("test_pathconf1.txt", _PC_LINK_MAX);
       
   946      if( n < _POSIX_LINK_MAX )
       
   947      {
       
   948        return -1;
       
   949      }
       
   950      else
       
   951      {
       
   952        printf("_PC_LINK_MAX value: %d", n);
       
   953        printf("Pathconf passed");
       
   954        return 0;
       
   955      }
       
   956    }
       
   957    else
       
   958    {
       
   959      printf("failed");
       
   960      return -1;
       
   961    }    
       
   962 }               
       
   963 
       
   964 @endcode
       
   965  Output
       
   966 @code
       
   967 _PC_LINK_MAX value: 1
       
   968 Pathconf passed
       
   969 
       
   970 @endcode
       
   971 
       
   972 
       
   973 Note:
       
   974 
       
   975 @code
       
   976  The current implementation of the functions pathconf and fpathconf considers only the following configurable variables. _PC_LINK_MAX _PC_MAX_CANON _PC_MAX_INPUT _PC_NAME_MAX _PC_PATH_MAX _PC_PIPE_BUF _PC_CHOWN_RESTRICTED _PC_NO_TRUNC _PC_VDISABLE   Also, these functions return the limits as required by the POSIX
       
   977 standard instead of the actual system limits determined on the run. 
       
   978 @endcode
       
   979 
       
   980  
       
   981 
       
   982 @publishedAll
       
   983 @externallyDefinedApi
       
   984 */
       
   985 
       
   986 /** @fn  pipe(int *fildes)
       
   987 @param fildes
       
   988 @return   The pipe function returns the value 0 if successful; otherwise the
       
   989 value -1 is returned and errno is set to indicate the error.
       
   990 
       
   991   The pipe system call
       
   992 creates a pipe, which is an object allowing
       
   993 bidirectional data flow,
       
   994 and allocates a pair of file descriptors.
       
   995 
       
   996  By convention, the first descriptor is normally used as the read end of the pipe, and the second is normally the write end, so that data written to fildes[1] appears on (i.e. can be read from) fildes[0]. This allows the output of one thread to be sent to another 
       
   997   thread: the source's standard output is set up to be the write end of the 
       
   998   pipe and the sink's standard input is set up to be the read end of the 
       
   999   pipe. The pipe itself persists until all its associated descriptors are closed.
       
  1000 
       
  1001  A pipe that has had an end closed is considered widowed. Writing on such a pipe causes the writing process to fail and errno is set to EPIPE . Widowing a pipe is the only way to deliver end-of-file to a 
       
  1002   reader: After the reader consumes any buffered data, reading a widowed pipe 
       
  1003   returns a zero count.
       
  1004 
       
  1005 Examples:
       
  1006 @code
       
  1007 #include <unistd.h>
       
  1008 #include <stdio.h>
       
  1009 
       
  1010 int main(void)
       
  1011 {
       
  1012     int fds[2];
       
  1013     if (pipe(fds) == -1) {
       
  1014        printf("Pipe creation failed");
       
  1015     }
       
  1016     /* fds[0] - opened for read */
       
  1017     /* fds[1] - opened for write */
       
  1018     close(fds[0]);
       
  1019     close(fds[1]);
       
  1020     return 0;
       
  1021 }
       
  1022 
       
  1023 @endcode
       
  1024 @see read()
       
  1025 @see write()
       
  1026 
       
  1027 
       
  1028  
       
  1029 
       
  1030 @publishedAll
       
  1031 @externallyDefinedApi
       
  1032 */
       
  1033 
       
  1034 /** @fn  read(int fd, void *buf, size_t cnt)
       
  1035 @param fd
       
  1036 @param buf
       
  1037 @param cnt
       
  1038 
       
  1039 Note: This description also covers the following functions -
       
  1040  readv() 
       
  1041 
       
  1042 @return   If successful, the number of bytes actually read is returned. Upon reading 
       
  1043 end-of-file, zero is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
       
  1044 
       
  1045   The read system call
       
  1046 attempts to read cnt bytes of data from the object referenced by the descriptor fd into the buffer pointed to by buf. The readv system call
       
  1047 performs the same action, but scatters the input data
       
  1048 into the iovcnt buffers specified by the members of the iov array: iov[0], iov[1], ..., iov[iovcnt-1].
       
  1049 
       
  1050  For readv the iovec structure is defined as:
       
  1051 
       
  1052  struct iovec {
       
  1053 void   *iov_base;  // Base address. 
       
  1054 size_t iov_len;    // Length. 
       
  1055 };
       
  1056 
       
  1057  Each iovec entry specifies the base address and length of an area
       
  1058 in memory where data should be placed.
       
  1059 The readv system call
       
  1060 will always fill an area completely before proceeding
       
  1061 to the next.
       
  1062 
       
  1063  On objects capable of seeking, the read starts at a position
       
  1064 given by the pointer associated with fd (see lseek )
       
  1065 Upon return from read, the pointer is incremented by the number of bytes actually read.
       
  1066 
       
  1067 If 'fd' refers to a shared memory object then read() on the shared memory object is supported by the current implementation.
       
  1068 
       
  1069  Objects that are not capable of seeking always read from the current
       
  1070 position.
       
  1071 The value of the pointer associated with such an
       
  1072 object is undefined.
       
  1073 
       
  1074  Upon successful completion, read, and readv return the number of bytes actually read and placed in the buffer.
       
  1075 The system guarantees to read the number of bytes requested if
       
  1076 the descriptor references a normal file that has that many bytes left
       
  1077 before the end-of-file, but in no other case.
       
  1078 
       
  1079 Errors:
       
  1080 
       
  1081 The  read, and  readv system calls will succeed unless:
       
  1082 [EBADF] 	The d argument is not a valid file or socket descriptor open for reading.
       
  1083 [ECONNRESET]The d argument refers to a socket, and the remote socket end is forcibly closed.
       
  1084 [EFAULT] 	The buf argument points outside the allocated address space(Not supported).
       
  1085 [EIO] 	An I/O error occurred while reading from the file system(Not supported).
       
  1086 [EINTR] 	A read from a slow device was interrupted before any data arrived by the delivery of a signal(Not supported).
       
  1087 [EINVAL] 	The pointer associated with d was negative.
       
  1088 [EAGAIN] 	The file was marked for non-blocking I/O, and no data were ready to be read.
       
  1089 [EISDIR] 	The file descriptor is associated with a directory residing on a file system that does not allow regular read operations on directories (e.g. NFS)(Not supported).
       
  1090 [EOPNOTSUPP] 	The file descriptor is associated with a file system and file type that do not allow regular read operations on it(Not supported).
       
  1091 [EOVERFLOW] 	The file descriptor is associated with a regular file, nbytes is greater than 0, offset is before the end-of-file, and offset is greater than or equal to the offset maximum established for this file system(Not supported).
       
  1092 [EINVAL] 	The value nbytes is greater than INT_MAX.
       
  1093 In addition, readv and preadv may return one of the following errors:
       
  1094 [EINVAL] 	The iovcnt argument was less than or equal to 0, or greater than IOV_MAX.
       
  1095 [EINVAL] 	One of the iov_len values in the iov array was negative.
       
  1096 [EINVAL] 	The sum of the iov_len values in the iov array overflowed a 32-bit integer.
       
  1097 [EFAULT] 	Part of the iov array points outside the process’s allocated address space.
       
  1098 
       
  1099 Examples:
       
  1100 @code
       
  1101 /* Detailed description :This example demonstrates usage of read-system call, this
       
  1102  * Example reads 10 bytes from a file specified
       
  1103  *
       
  1104  * Preconditions: Example.txt file should be present in C: and should contain
       
  1105  * string Hello World.
       
  1106  *
       
  1107  */  
       
  1108 #include <unistd.h>
       
  1109 #include <sys/types.h>
       
  1110 #include <sys/stat.h>
       
  1111 #include <fcntl.h>
       
  1112 int main()
       
  1113 {
       
  1114   int fd = 0;
       
  1115   char Buff[12] = {0};
       
  1116  
       
  1117   fd = open("C:\Example.txt" , O_RDONLY );
       
  1118  
       
  1119   if(fd < 0 )  {
       
  1120      printf("Failed to open C:\Example.txt file");
       
  1121      return -1;
       
  1122   }
       
  1123  
       
  1124   if(read(fd , Buff , 11) < 11)   {
       
  1125      printf("Failed to read specified number of bytes from file");
       
  1126      return -1;
       
  1127   }
       
  1128  
       
  1129   printf("file contains %s 
       
  1130 " , Buff);
       
  1131   return 0;
       
  1132 }
       
  1133 
       
  1134 @endcode
       
  1135  Output
       
  1136 @code
       
  1137 file contains Hello World
       
  1138 
       
  1139 @endcode
       
  1140 @code
       
  1141 /*
       
  1142  * Detailed description: Sample usage of readv system call
       
  1143  * Preconditions: Example.txt file should be present in working directory containing  Hello world   in it
       
  1144  *
       
  1145  */
       
  1146 #include <stdio.h>
       
  1147 #include <sys/types.h>
       
  1148 #include <sys/uio.h>
       
  1149 #include <fcntl.h>
       
  1150 int main()
       
  1151 {
       
  1152   int fd = 0;
       
  1153   struct iovec io_vec[1];
       
  1154   char Buf[12] = { 0 };
       
  1155   io_vec[0].iov_base  = Buf;
       
  1156   io_vec[0].iov_len = 11;
       
  1157   fd = open("Example.txt" , O_RDONLY );
       
  1158   if(fd < 0 )  {
       
  1159     printf("File open failed");
       
  1160     return -1;
       
  1161   }
       
  1162   if(readv(fd , io_vec , 1) <  11 )   {
       
  1163     printf("Failed to read fron Example.txt file");
       
  1164     return -1;
       
  1165   }
       
  1166   printf("Read succes %s"  , io_vec[0].iov_base);
       
  1167   return 0;
       
  1168 }
       
  1169 
       
  1170 @endcode
       
  1171  Output
       
  1172 @code
       
  1173 Read succes Hello World
       
  1174 
       
  1175 @endcode
       
  1176 @see dup()
       
  1177 @see fcntl()
       
  1178 @see getdirentries()
       
  1179 @see open()
       
  1180 @see pipe()
       
  1181 @see select()
       
  1182 @see socket()
       
  1183 @see socketpair()
       
  1184 @see fread()
       
  1185 @see readdir()
       
  1186 
       
  1187 
       
  1188  
       
  1189 
       
  1190 @publishedAll
       
  1191 @externallyDefinedApi
       
  1192 */
       
  1193 
       
  1194 /** @fn  rmdir(const char *_path)
       
  1195 @param _path
       
  1196 @return   The rmdir() function returns the value 0 if successful; otherwise the
       
  1197 value -1 is returned and the global variable errno is set to indicate the
       
  1198 error.
       
  1199 
       
  1200 The rmdir system call removes a directory file whose name is given by path. 
       
  1201 The directory must not have any entries other than '.' and '..'.
       
  1202 Examples:
       
  1203 @code
       
  1204 /*
       
  1205  *  Detailed description: This test code demonstrates usage of rmdir systemcall, it removes directory
       
  1206  *  Example from the current working directory.
       
  1207  *
       
  1208  *  Preconditions: Expects empty directory "Example" in current working directory.
       
  1209  */
       
  1210 #include  <unistd.h>
       
  1211 int main()
       
  1212 {
       
  1213   if(rmdir("Example") < 0 )  
       
  1214   {
       
  1215      printf("Rmdir failed");
       
  1216      return -1;
       
  1217   }
       
  1218   printf("Directory Example removed");
       
  1219   return 0;
       
  1220 }
       
  1221 
       
  1222 @endcode
       
  1223  Output
       
  1224 Directory Example removed
       
  1225 @code
       
  1226 
       
  1227 @endcode
       
  1228 
       
  1229 Limitations:
       
  1230 
       
  1231 The _path parameter of the rmdir() function should not exceed 256 characters in length. 
       
  1232 
       
  1233 KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
       
  1234 not found or filesystem not mounted on the drive.
       
  1235 
       
  1236 @capability Deferred @ref RFs::RmDir(const TDesC16&)
       
  1237 @capability Deferred @ref RFs::Att(const TDesC16&, unsigned&)
       
  1238 
       
  1239 @publishedAll
       
  1240 @externallyDefinedApi
       
  1241 */
       
  1242 
       
  1243 /** @fn  setgid(gid_t gid)
       
  1244 @param gid
       
  1245 
       
  1246 Refer to  setuid() for the documentation
       
  1247 
       
  1248 
       
  1249  
       
  1250 
       
  1251 @publishedAll
       
  1252 @externallyDefinedApi
       
  1253 */
       
  1254 
       
  1255 /** @fn  setpgid(pid_t pid, pid_t pgid)
       
  1256 @param pid
       
  1257 @param pgid
       
  1258 
       
  1259 Note: This description also covers the following functions -
       
  1260  setpgrp() 
       
  1261 
       
  1262 @return   These functions always return 0.
       
  1263 
       
  1264   These functions are build supported but not available functionally. Symbian 
       
  1265 OS does not support multiple users and groups.
       
  1266 
       
  1267 
       
  1268 
       
  1269  
       
  1270 
       
  1271 @publishedAll
       
  1272 @externallyDefinedApi
       
  1273 */
       
  1274 
       
  1275 /** @fn  setsid(void)
       
  1276 
       
  1277 @return   These functions always return 0.
       
  1278 
       
  1279   These functions are build supported but not available functionally. Symbian 
       
  1280 OS does not support multiple users and groups.
       
  1281 
       
  1282 
       
  1283 
       
  1284  
       
  1285 
       
  1286 @publishedAll
       
  1287 @externallyDefinedApi
       
  1288 */
       
  1289 
       
  1290 /** @fn  setuid(uid_t uid)
       
  1291 @param uid
       
  1292 
       
  1293 Note: This description also covers the following functions -
       
  1294  seteuid()  setgid()  setegid() 
       
  1295 
       
  1296 @return   These functions always return 0.
       
  1297 
       
  1298   These functions are build supported but not available functionally. Symbian 
       
  1299 OS does not support multiple users and groups.
       
  1300 
       
  1301 
       
  1302 
       
  1303  
       
  1304 
       
  1305 @publishedAll
       
  1306 @externallyDefinedApi
       
  1307 */
       
  1308 
       
  1309 /** @fn  sleep(unsigned int secs)
       
  1310 @param secs
       
  1311 @return   If the sleep function returns because the requested time has elapsed, the value
       
  1312 returned will be zero.
       
  1313 
       
  1314   The sleep function suspends execution of the calling process until seconds seconds have elapse
       
  1315 
       
  1316  Time interval is internally represented using 32 bit value(range +-2147483647). 
       
  1317   Any time interval greater 2147483647 returns 0 without sleeping. Hence Maximum 
       
  1318   sleep time supported here is 35 minutes, 47 seconds.
       
  1319 
       
  1320 
       
  1321 
       
  1322 Examples:
       
  1323 @code
       
  1324 /*
       
  1325  * Detailed description: This test code shows usage of sleep system call , here sample code
       
  1326  * sleeps for 2 seconds.
       
  1327  */
       
  1328 #include <unistd.h>
       
  1329 int main()
       
  1330 {
       
  1331   if(sleep(2) < 0 )  
       
  1332   {
       
  1333     printf("Sleep failed");
       
  1334     return -1;
       
  1335   }
       
  1336   printf("Sleep successful");
       
  1337   return 0;
       
  1338 }
       
  1339 
       
  1340 @endcode
       
  1341  Output
       
  1342 @code
       
  1343 Sleep successful
       
  1344 
       
  1345 @endcode
       
  1346 @see nanosleep()
       
  1347 
       
  1348 
       
  1349  
       
  1350 
       
  1351 @publishedAll
       
  1352 @externallyDefinedApi
       
  1353 */
       
  1354 
       
  1355 /** @fn  sysconf(int name)
       
  1356 @param name
       
  1357 @return   If the call to sysconf is not successful, -1 is returned and errno is set appropriately.
       
  1358 Otherwise, if the variable is associated with functionality that is not
       
  1359 supported, -1 is returned and errno is not modified.
       
  1360 Otherwise, the current variable value is returned.
       
  1361 
       
  1362 This interface is defined by -p1003.1-88 .A far more complete interface is available using sysctl.
       
  1363 
       
  1364 
       
  1365 The sysconf function provides a method for applications to determine the 
       
  1366   current value of a configurable system limit or option variable. The name argument specifies the system variable to be queried. Symbolic 
       
  1367   constants for each name value are found in the include file \#include \<unistd.h\> . Shell programmers who need access 
       
  1368   to these parameters should use the getconf utility.
       
  1369 
       
  1370 The available values are as follows:
       
  1371 @code
       
  1372  _SC_ARG_MAX
       
  1373   The maximum number of argument to execve.
       
  1374  _SC_CHILD_MAX
       
  1375   The maximum number of simultaneous processes per user id.(Not supported)
       
  1376  _SC_CLK_TCK
       
  1377   The frequency of the statistics clock in ticks per second.
       
  1378  _SC_IOV_MAX
       
  1379   The maximum number of elements in the I/O vector used by readv , writev , recvmsg ,
       
  1380  and sendmsg .
       
  1381  _SC_NGROUPS_MAX
       
  1382   The maximum number of supplemental groups.(Not supported)
       
  1383  _SC_NPROCESSORS_CONF
       
  1384   The number of processors configured.(Not supported)
       
  1385  _SC_NPROCESSORS_ONLN
       
  1386   The number of processors currently online.(Not supported)
       
  1387  _SC_OPEN_MAX
       
  1388   The maximum number of open files per user id.(Not supported)
       
  1389  _SC_STREAM_MAX
       
  1390   The minimum maximum number of streams that a process may have open( Not supported)
       
  1391  at any one time.
       
  1392  _SC_TZNAME_MAX
       
  1393   The minimum maximum number of types supported for the name of a
       
  1394  timezone.(Not supported)
       
  1395  _SC_JOB_CONTROL
       
  1396   Return 1 if job control is available on this system, otherwise -1.
       
  1397  _SC_SAVED_IDS
       
  1398   Returns 1 if saved set-group and saved set-user ID is available,
       
  1399  otherwise -1.(Not supported)
       
  1400  _SC_VERSION
       
  1401   The version of -p1003.1 with which the system
       
  1402  attempts to comply.(Not supported)
       
  1403  _SC_BC_BASE_MAX
       
  1404   The maximum ibase/obase values in the bc utility.(Not supported)
       
  1405  _SC_BC_DIM_MAX
       
  1406   The maximum array size in the bc utility.(Not supported)
       
  1407  _SC_BC_SCALE_MAX
       
  1408   The maximum scale value in the bc utility.(Not supported)
       
  1409  _SC_BC_STRING_MAX
       
  1410   The maximum string length in the bc utility.(Not supported)
       
  1411  _SC_COLL_WEIGHTS_MAX
       
  1412   The maximum number of weights that can be assigned to any entry of
       
  1413  the LC_COLLATE order keyword in the locale definition file.(Not supported)
       
  1414  _SC_EXPR_NEST_MAX
       
  1415   The maximum number of expressions that can be nested within
       
  1416  parenthesis by the expr utility.(Not supported)
       
  1417  _SC_LINE_MAX
       
  1418   The maximum length in bytes of a text-processing utility's input
       
  1419  line.(Not supported)
       
  1420  _SC_RE_DUP_MAX
       
  1421   The maximum number of repeated occurrences of a regular expression
       
  1422  permitted when using interval notation.(Not supported)
       
  1423  _SC_2_VERSION
       
  1424   The version of -p1003.2 with which the system attempts to comply.( Not supported)
       
  1425  _SC_2_C_BIND
       
  1426   Return 1 if the system's C-language development facilities support the
       
  1427  C-Language Bindings Option, otherwise -1.
       
  1428  _SC_2_C_DEV
       
  1429   Return 1 if the system supports the C-Language Development Utilities Option,
       
  1430  otherwise -1.
       
  1431  _SC_2_CHAR_TERM
       
  1432   Return 1 if the system supports at least one terminal type capable of
       
  1433  all operations described in -p1003.2 ,
       
  1434  otherwise -1.
       
  1435  _SC_2_FORT_DEV
       
  1436   Return 1 if the system supports the FORTRAN Development Utilities Option,
       
  1437  otherwise -1.
       
  1438  _SC_2_FORT_RUN
       
  1439   Return 1 if the system supports the FORTRAN Runtime Utilities Option,
       
  1440  otherwise -1.
       
  1441  _SC_2_LOCALEDEF
       
  1442   Return 1 if the system supports the creation of locales, otherwise -1.
       
  1443  _SC_2_SW_DEV
       
  1444   Return 1 if the system supports the Software Development Utilities Option,
       
  1445  otherwise -1.
       
  1446  _SC_2_UPE
       
  1447   Return 1 if the system supports the User Portability Utilities Option,
       
  1448  otherwise -1.
       
  1449  _SC_PAGESIZE
       
  1450   Returns size of a page in bytes.  (Some systems use PAGE_SIZE instead.)
       
  1451 @endcode
       
  1452 
       
  1453  Note: Some of the  return values may not be posix compliant.
       
  1454 
       
  1455 Examples:
       
  1456 @code
       
  1457 /*
       
  1458  *  Detailed description  : This test code demonstrates usage of sysconf system call , here it get max command
       
  1459     line arguments that can be passed to process.
       
  1460 */
       
  1461 #include <unistd.h>
       
  1462 int main()
       
  1463 {
       
  1464   int ret = 0 ;
       
  1465   ret = sysconf(_SC_ARG_MAX) ;
       
  1466   if(ret < 0 )  {
       
  1467     printf("Sysconf call failed") ;
       
  1468     return -1 ;
       
  1469  }
       
  1470  printf("Max command line arguments = %d" , ret) ;
       
  1471  return 0 ;
       
  1472 }
       
  1473 
       
  1474 @endcode
       
  1475  Output
       
  1476 @code
       
  1477 max-number of commandline args supproted by system.
       
  1478 
       
  1479 @endcode
       
  1480 @see pathconf()
       
  1481 @see confstr()
       
  1482 
       
  1483 
       
  1484 Bugs:
       
  1485 
       
  1486  The value for _SC_STREAM_MAX is a minimum maximum, and is required to be 
       
  1487 the same as ANSI C's FOPEN_MAX, so the returned value is a ridiculously small 
       
  1488 and misleading number. 
       
  1489 
       
  1490  
       
  1491 
       
  1492 @publishedAll
       
  1493 @externallyDefinedApi
       
  1494 */
       
  1495 
       
  1496 /** @fn  unlink(const char *pathname)
       
  1497 @param pathname
       
  1498 @return   Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.
       
  1499 
       
  1500  
       
  1501  The unlink system call removes the link named by pathname from its file system.
       
  1502 
       
  1503  Symbian OS simulates links so there is no reference count and files are unaware 
       
  1504   of links. Calling unlink on a file will always close the file, regardless of 
       
  1505   whether there is another link.
       
  1506 
       
  1507  The pathname argument may not be a directory.
       
  1508 
       
  1509 Examples:
       
  1510 @code
       
  1511 /*
       
  1512  * Detailed description  : Example to unlink a link file
       
  1513  * Precondition : A link file by name "Link" should exist in
       
  1514  *                c: drive.
       
  1515  */
       
  1516 #include <unistd.h>
       
  1517 #include <stdio.h>
       
  1518 int main(void)
       
  1519 {
       
  1520     char rdbuff[25];
       
  1521     if(unlink("C:\Link"))
       
  1522     {
       
  1523          printf("unlink on link file failed");
       
  1524     }
       
  1525     printf("Unlink on link file succeeded");
       
  1526 }
       
  1527 
       
  1528 @endcode
       
  1529  Output
       
  1530 @code
       
  1531 Unlink on link file succeeded.
       
  1532 
       
  1533 @endcode
       
  1534 
       
  1535 Limitations:
       
  1536 
       
  1537 - The path parameter of the unlink() function should not exceed 256 characters in length. 
       
  1538 - P.I.P.S. only simulates link files and does not distinguish between hard and symbolic links.
       
  1539 - KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
       
  1540 not found or filesystem not mounted on the drive.
       
  1541 
       
  1542 @see close()
       
  1543 @see link()
       
  1544 @see rmdir()
       
  1545 @see symlink()
       
  1546 
       
  1547 
       
  1548 
       
  1549 @capability Deferred @ref RFs::Att(const TDesC16&, unsigned&)
       
  1550 @capability Deferred @ref RFs::SetAtt(const TDesC16&, unsigned, unsigned)
       
  1551 @capability Deferred @ref RFs::Delete(const TDesC16&)
       
  1552 
       
  1553 @publishedAll
       
  1554 @externallyDefinedApi
       
  1555 */
       
  1556 
       
  1557 /** @fn  write(int fd, const void *buf, size_t cnt)
       
  1558 @param fd
       
  1559 @param buf
       
  1560 @param cnt
       
  1561 
       
  1562 @return   Upon successful completion the number of bytes which were written
       
  1563 is returned.
       
  1564 Otherwise a -1 is returned and the global variable errno is set to indicate the error.
       
  1565 
       
  1566 The write system call attempts to write cnt bytes of data to the object referenced by the descriptor fd from the buffer pointed to by buf .
       
  1567 The writev system call performs the same action, but gathers the output data from the iovcnt buffers specified by the members of the iov array: iov[0], iov[1], ..., iov[iovcnt-1].
       
  1568 The pwrite and pwritev system calls perform the same functions, but write to the specified position in the file without modifying the file pointer.
       
  1569 
       
  1570 Notes: 
       
  1571 
       
  1572 1. This description also covers the pwrite(), writev() and pwritev() functions.
       
  1573  
       
  1574 2. An attempt to write on a broken pipe generates the SIGPIPE signal, which may cause termination of the process, if it is not handled.
       
  1575 
       
  1576  For writev and pwritev, the iovec structure is defined as:
       
  1577 
       
  1578 @code
       
  1579  struct iovec {
       
  1580 void   *iov_base;  //Base address.
       
  1581 size_t iov_len;    // Length.
       
  1582 };
       
  1583 @endcode
       
  1584 
       
  1585  Each iovec entry specifies the base address and length of an area
       
  1586 in memory from which data should be written.
       
  1587 The writev system call
       
  1588 will always write a complete area before proceeding
       
  1589 to the next.
       
  1590 
       
  1591  On objects capable of seeking, the write starts at a position
       
  1592 given by the pointer associated with fd ,
       
  1593 see lseek .
       
  1594 Upon return from write ,
       
  1595 the pointer is incremented by the number of bytes which were written.
       
  1596 
       
  1597 If 'fd' refers to a shared memory object then write() on the shared memory object is supported by the current implementation.
       
  1598 
       
  1599  Objects that are not capable of seeking always write from the current
       
  1600 position.
       
  1601 The value of the pointer associated with such an object
       
  1602 is undefined.
       
  1603 
       
  1604  When using non-blocking I/O on objects such as sockets that are subject
       
  1605 to flow control, write and writev may write fewer bytes than requested;
       
  1606 the return value must be noted,
       
  1607 and the remainder of the operation should be retried when possible.
       
  1608 
       
  1609 Examples:
       
  1610 @code
       
  1611 /* Detailed description: This sample code creates an Example.txt file in the current working
       
  1612  * directory(if file existes then it is truncated) and writes "Hello World" string
       
  1613  * to the file.
       
  1614  *
       
  1615  * Preconditions: Example.txt if present, it should not be read-only.
       
  1616  */
       
  1617 int main()
       
  1618 {
       
  1619  int fd = 0 ;
       
  1620  char Buf[] = "Hello World" ;
       
  1621  fd = open("Example.txt" , O_CREAT | O_TRUNC | O_RDWR  ,0666) ;
       
  1622  if(fd < 0 )
       
  1623  {
       
  1624     printf("Failed to open file Example.txt") ;
       
  1625     return -1 ;
       
  1626  }
       
  1627  if(write(fd , Buf , sizeof(Buf)) < sizeof(Buf))
       
  1628   {
       
  1629     printf("Failed to write string %s to file" , Buf) ;
       
  1630     return -1 ;
       
  1631   }
       
  1632   printf("String %s written to file 
       
  1633 " , Buf) ;
       
  1634   return 0 ;
       
  1635  }
       
  1636 
       
  1637 @endcode
       
  1638  Output
       
  1639 @code
       
  1640 String Hello World written to file
       
  1641 
       
  1642 @endcode
       
  1643 @code
       
  1644 /*
       
  1645  * Detailed description  : Sample usage of readv system call
       
  1646  */
       
  1647 #include <stdio.h>
       
  1648 #include <sys/types.h>
       
  1649 #include <sys/uio.h>
       
  1650 #include <fcntl.h>
       
  1651 int main()
       
  1652 {
       
  1653   int fd = 0 ;
       
  1654   struct iovec io_vec[1] ;
       
  1655   char Buf[12] = "Hello world" ;
       
  1656   io_vec[0].iov_base  = Buf ;
       
  1657   io_vec[0].iov_len = 11 ;
       
  1658   fd = open("Example.txt" , O_CREAT | O_RDWR , 0666 ) ;
       
  1659   if(fd < 0 )  {
       
  1660     printf("File open failed") ;
       
  1661     return -1 ;
       
  1662   }
       
  1663   if(writev(fd , io_vec , 1) <  11 )   {
       
  1664     printf("Failed to read fron Example.txt file") ;
       
  1665     return -1 ;
       
  1666   }
       
  1667   printf("writev succes %s written"  , io_vec[0].iov_base) ;
       
  1668   return 0 ; }
       
  1669 
       
  1670 @endcode
       
  1671  Output
       
  1672 @code
       
  1673 writev succes Hello world written
       
  1674 
       
  1675 @endcode
       
  1676 @see fcntl()
       
  1677 @see lseek()
       
  1678 @see open()
       
  1679 @see pipe()
       
  1680 @see select()
       
  1681 
       
  1682 
       
  1683  
       
  1684 
       
  1685 @publishedAll
       
  1686 @externallyDefinedApi
       
  1687 */
       
  1688 
       
  1689 /** @fn  confstr(int name, char *buf, size_t len)
       
  1690 @param name
       
  1691 @param buf
       
  1692 @param len
       
  1693 @return   If the call to confstr is not successful, 0 is returned and errno is set appropriately.
       
  1694 Otherwise, if the variable does not have a configuration defined value,
       
  1695 0 is returned and errno is not modified.
       
  1696 Otherwise, the buffer size needed to hold the entire configuration-defined
       
  1697 value is returned.
       
  1698 If this size is greater than the argument len, the string in buf was truncated.
       
  1699 
       
  1700   The confstr function provides a method for applications to get configuration
       
  1701 defined string values.
       
  1702 
       
  1703 The name argument specifies the system variable to be queried. Symbolic 
       
  1704   constants for each name value are found in the include file \#include \<unistd.h.\> The len argument specifies the size of the buffer referenced by the argument buf. If len is non-zero, buf is a non-null pointer, and name has a value, up to len - 1 bytes of the value are copied into the buffer buf. The copied value is always null terminated.
       
  1705  The available values are as follows:
       
  1706 
       
  1707 @code
       
  1708  _CS_PATH
       
  1709   Return a value for the PATH environment variable that finds all the standard utilities.
       
  1710 
       
  1711 @endcode
       
  1712 
       
  1713 Examples:
       
  1714 @code
       
  1715 #include<unistd.h>
       
  1716 #include<stdio.h>
       
  1717 #include <stdlib.h>
       
  1718  
       
  1719 int main()
       
  1720 {
       
  1721  int n = 0;
       
  1722  char *buf = NULL;
       
  1723  int len = 0;
       
  1724    
       
  1725  n = confstr(_CS_PATH, NULL, 0);
       
  1726     
       
  1727  printf("{Expected: 31} %d", n);
       
  1728        
       
  1729  if( n == 0 )
       
  1730     return -1;
       
  1731                     
       
  1732  buf = (char *)malloc(n);
       
  1733   
       
  1734  if ( buf == NULL )
       
  1735  {
       
  1736     printf("malloc failed!!");
       
  1737     return -1;
       
  1738  }
       
  1739              
       
  1740  len = confstr(_CS_PATH, buf, n);
       
  1741                 
       
  1742  printf("PATH in buffer: \n%s", buf);
       
  1743  printf("length: %d", len);
       
  1744  free(buf);
       
  1745  
       
  1746  return 0;
       
  1747 }
       
  1748 
       
  1749 @endcode
       
  1750  Output
       
  1751 @code
       
  1752 PATH in buffer:
       
  1753 /usr/bin:/bin:/usr/sbin:/sbin:
       
  1754 length: 31
       
  1755 
       
  1756 @endcode
       
  1757 @see pathconf()
       
  1758 @see sysconf()
       
  1759 
       
  1760 
       
  1761  
       
  1762 
       
  1763 @publishedAll
       
  1764 @externallyDefinedApi
       
  1765 */
       
  1766 
       
  1767 /** @fn getopt(int nargc, char * const nargv[], const char *ostr)
       
  1768 @param nargc
       
  1769 @param nargv
       
  1770 @param ostr
       
  1771 @return The  getopt function returns the next known option character in  optstring. If  getopt encounters a character not found in  optstring or if it detects a missing option argument, it returns ‘?’ (question mark. If  optstring has a leading ‘:’ then a missing option argument causes ‘:’ to be returned instead of ‘?.’ In either case, the variable  optopt is set to the character that caused the error. The  getopt function returns -1 when the argument list is exhausted.
       
  1772 
       
  1773 The  getopt function incrementally parses a command line argument list  argv and returns the next  known option character. An option character is  known if it has been specified in the string of accepted option characters,  optstring.
       
  1774 
       
  1775 The option string optstring may contain the following elements: individual characters, and characters followed by a colon to indicate an option argument is to follow. For example, an option string x recognizes an option "-x", and an option string x: recognizes an option and argument "-x argument." It does not matter to getopt if a following argument has leading white space.
       
  1776 
       
  1777 On return from getopt, optarg points to an option argument, if it is anticipated, and the variable optind contains the index to the next argv argument for a subsequent call to getopt. The variable optopt saves the last known option character returned by getopt.
       
  1778 
       
  1779 The variables opterr and optind are both initialized to 1. The optind variable may be set to another value before a set of calls to getopt in order to skip over more or less argv entries.
       
  1780 
       
  1781 In order to use getopt to evaluate multiple sets of arguments, or to evaluate a single set of arguments multiple times, the variable optreset must be set to 1 before the second and each additional set of calls to getopt, and the variable optind must be reinitialized.
       
  1782 
       
  1783 The getopt function returns -1 when the argument list is exhausted. The interpretation of options in the argument list may be cancelled by the option ‘--’ (double dash) which causes getopt to signal the end of argument processing and return -1. When all options have been processed (i.e., up to the first non-option argument), getopt returns -1. 
       
  1784 
       
  1785 Examples:
       
  1786 @code
       
  1787 #include <unistd.h>
       
  1788 #include <stdio.h>
       
  1789 #include <fcntl.h>
       
  1790 #include <errno.h>
       
  1791 #include <string.h>
       
  1792  
       
  1793 int main()
       
  1794 {
       
  1795         int argc = 3;
       
  1796          
       
  1797         char *argv[] =
       
  1798          {
       
  1799                  "getopt","-f","hi"
       
  1800          };
       
  1801         
       
  1802         int bflag, ch, fd;
       
  1803         bflag = 0;
       
  1804          
       
  1805         while ((ch = getopt(argc, argv, "bf:")) != -1) {
       
  1806         
       
  1807         switch (ch) {
       
  1808         case 'b':
       
  1809                 bflag = 1;
       
  1810                 printf("option is 'b' \n");
       
  1811                 break;
       
  1812         case 'f':
       
  1813                 printf("option is 'f' \n");
       
  1814                 if ((fd = open(optarg, O_RDONLY, 0)) != 0) {
       
  1815                         (void)fprintf(stderr,
       
  1816                            "myname: %s: %s\n", optarg, strerror(errno));                
       
  1817                 }                             
       
  1818                 break;
       
  1819         case '?':
       
  1820                 printf("missing option!");
       
  1821         default:
       
  1822                 printf("unknown option!");
       
  1823         }
       
  1824        
       
  1825 }
       
  1826 argc -= optind;
       
  1827 return 0;
       
  1828 }
       
  1829 
       
  1830 @endcode
       
  1831  Output
       
  1832 @code
       
  1833 option is ’f’
       
  1834 myname: hi: No such file or directory
       
  1835 @endcode
       
  1836 @see getopt_long()
       
  1837 
       
  1838 Bugs:
       
  1839 
       
  1840 The  getopt function was once specified to return  EOF instead of -1. This was changed by  -p1003.2-92 to decouple  getopt from
       
  1841  	\#include \<stdio.h\>
       
  1842 
       
  1843 A single dash "-" may be specified as a character in optstring, however it should never have an argument associated with it. This allows getopt to be used with programs that expect "-" as an option flag. This practice is wrong, and should not be used in any current development. It is provided for backward compatibility only. Care should be taken not to use ‘-’ as the first character in optstring to avoid a semantic conflict with GNU getopt, which assigns different meaning to an optstring that begins with a ‘-.’ By default, a single dash causes getopt to return -1.
       
  1844 
       
  1845 It is also possible to handle digits as option letters. This allows getopt to be used with programs that expect a number ("-3") as an option. This practice is wrong, and should not be used in any current development. It is provided for backward compatibility only. The following code fragment works in most cases.
       
  1846 
       
  1847 @code
       
  1848 int ch;
       
  1849 long length;
       
  1850 char *p, *ep;
       
  1851 while ((ch = getopt(argc, argv, "0123456789")) != -1)
       
  1852         switch (ch) {
       
  1853         case ’0’: case ’1’: case ’2’: case ’3’: case ’4’:
       
  1854         case ’5’: case ’6’: case ’7’: case ’8’: case ’9’:
       
  1855                 p = argv[optind - 1];
       
  1856                 if (p[0] == ’-’ Am]Am] p[1] == ch Am]Am] !p[2]) {
       
  1857                         length = ch - ’0’;
       
  1858                         ep = "";
       
  1859                 } else if (argv[optind] Am]Am] argv[optind][1] == ch) {
       
  1860                         length = strtol((p = argv[optind] + 1),
       
  1861                             Am]ep, 10);
       
  1862                         optind++;
       
  1863                         optreset = 1;
       
  1864                 } else
       
  1865                         usage();
       
  1866                 if (*ep != ’\0’)
       
  1867                         errx(EX_USAGE, "illegal number -- %s", p);
       
  1868                 break;
       
  1869         }
       
  1870 @endcode
       
  1871 
       
  1872  
       
  1873 
       
  1874 @publishedAll
       
  1875 @externallyDefinedApi
       
  1876 */
       
  1877 
       
  1878 /** @fn  fsync(int fd)
       
  1879 @param fd
       
  1880 @return   Upon successful completion, fsync() returns 0. Otherwise, it returns -1 and sets 
       
  1881 errno to indicate the error. If the fsync() function fails, outstanding I/O operations 
       
  1882 are not guaranteed to have been completed.
       
  1883 
       
  1884   The fsync system call
       
  1885 causes all modified data and attributes of fd to be moved to a permanent storage device.
       
  1886 This normally results in all in-core modified copies
       
  1887 of buffers for the associated file to be written to a disk.
       
  1888 
       
  1889  The fsync system call should be used by programs that require a file to 
       
  1890   be in a known state, for example, when building a simple transaction facility.
       
  1891 
       
  1892 Examples:
       
  1893 @code
       
  1894 /*
       
  1895  * Detailed description : Simple usage of fsync system call.
       
  1896  * Preconditions : Example.txt if present should not a ready-only file
       
  1897  */
       
  1898 #include <unistd.h>
       
  1899 #include <fcntl.h>
       
  1900 int main()
       
  1901 {
       
  1902   int fd = 0;
       
  1903   fd = open("Example.txt" , O_CREAT | O_RDWR , 0666);
       
  1904   if(fd < 0 )  
       
  1905   {
       
  1906      printf("Failed to open file Example.txt");
       
  1907      return -1;
       
  1908   }
       
  1909   if(fsync(fd) < 0 )  
       
  1910   {
       
  1911      printf("fsync system call failed");
       
  1912      return -1;
       
  1913   }
       
  1914   close(fd);
       
  1915   printf("fsync system call succeeded");
       
  1916   return 0;
       
  1917 }
       
  1918 
       
  1919 @endcode
       
  1920  Output
       
  1921 @code
       
  1922 fsync system call succeeded
       
  1923 
       
  1924 @endcode
       
  1925 @see fsync()
       
  1926 @see sync()
       
  1927 
       
  1928 
       
  1929  
       
  1930 
       
  1931 @publishedAll
       
  1932 @externallyDefinedApi
       
  1933 */
       
  1934 
       
  1935 /** @fn  fdatasync(int filedesc)
       
  1936 @param filedesc
       
  1937 @return   If successful the function returns 0, otherwise it returns (-1) and sets errno 
       
  1938   to indicate the error.
       
  1939 
       
  1940   The fdatasync system call
       
  1941 causes all modified data and attributes of fd to be moved to a permanent storage device.
       
  1942 This normally results in all in-core modified copies
       
  1943 of buffers for the associated file to be written to a disk.
       
  1944 The fdatasync() function forces all the queued I/O operations associated that
       
  1945 file, as indicated by the file descriptor fd, to the synchronized I/O completion
       
  1946 state.
       
  1947 
       
  1948  The functionality shall be equivalent to fsync() with the symbol _POSIX_SYNCHRONIZED_IO 
       
  1949   defined. This has an exception that all I/O operations shall be completed before 
       
  1950   the call.
       
  1951 
       
  1952 
       
  1953 
       
  1954  The fdatasync should be used by programs that require a file to be in 
       
  1955   a known state, for example when building a simple transaction facility.
       
  1956 
       
  1957 
       
  1958 
       
  1959 Examples:
       
  1960 @code
       
  1961 #include<unistd.h>
       
  1962 #include<stdio.h>
       
  1963 #define KMAXCHARS 100
       
  1964 int test_fdatasync()
       
  1965 {
       
  1966    char* array = "abcdefghijklmnopqrstuvwxyz";
       
  1967    struct stat buf;
       
  1968    if((fd = open(file , O_CREAT | O_RDWR , 0666))  < 0)
       
  1969    {
       
  1970       printf("Failed  to create file");
       
  1971    }
       
  1972    size_t size = write(fd,array, KMAXCHARS);
       
  1973    if(fdatasync(fd) < 0)
       
  1974    {
       
  1975      printf("Fdatasync failed");
       
  1976      int retrn = remove(file);
       
  1977      return -1;
       
  1978    }
       
  1979   int retVal2 = fstat( fp, &buf; );
       
  1980   if(!retVal2)
       
  1981   {
       
  1982     size_t bufsize = buf.st_size;
       
  1983     if (bufsize == size)
       
  1984     {
       
  1985       printf("file size = %d", size);
       
  1986       printf("Fdatasync passed");
       
  1987       int retrn = remove(file);
       
  1988       return 0;
       
  1989     }
       
  1990   }
       
  1991 }
       
  1992 
       
  1993 @endcode
       
  1994  Output
       
  1995 @code
       
  1996 file size = 50
       
  1997 Fdatasync passed
       
  1998 
       
  1999 @endcode
       
  2000 @see sync()
       
  2001 @see fsync()
       
  2002 
       
  2003 
       
  2004  
       
  2005 
       
  2006 @publishedAll
       
  2007 @externallyDefinedApi
       
  2008 */
       
  2009 
       
  2010 /** @fn ftruncate(int filedesc, off_t length)
       
  2011 @param filedesc
       
  2012 @param length
       
  2013 
       
  2014 Refer to truncate() for documentation
       
  2015 
       
  2016 @see open()
       
  2017 @publishedAll
       
  2018 @externallyDefinedApi
       
  2019 */
       
  2020 
       
  2021 /** @fn ftruncate64(int filedesc, off64_t length)
       
  2022 @param filedesc
       
  2023 @param length
       
  2024 
       
  2025 For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
       
  2026 
       
  2027 @see ftruncate()
       
  2028 
       
  2029 @publishedAll
       
  2030 @externallyDefinedApi
       
  2031 */
       
  2032 
       
  2033 /** @fn  readlink(const char *path, char *buf, int bufsize)
       
  2034 @param path
       
  2035 @param buf
       
  2036 @param bufsize
       
  2037 @return   The call returns the count of characters placed in the buffer
       
  2038 if it succeeds, or a -1 if an error occurs, placing the error
       
  2039 code in the global variable errno.
       
  2040 
       
  2041   The readlink system call
       
  2042 places the contents of the symbolic link path in the buffer buf, which has size bufsize. The readlink system call does not append a NULL character to buf.
       
  2043 
       
  2044 Examples:
       
  2045 @code
       
  2046 /*
       
  2047 * Detailed description: Example to read a link file
       
  2048 * Precondition: "Parent.txt" should exist in c: drive with some contents
       
  2049 *                of length atleast 25 characters.  And a link file by name           
       
  2050 *                "C:\Link" pointing to parent file should exist.
       
  2051 *
       
  2052 */
       
  2053 #include <unistd.h>
       
  2054 #include <stdio.h>
       
  2055 int main(void)
       
  2056 {
       
  2057     char rdbuff[25];
       
  2058     int retval;
       
  2059    if((retval = (readlink("C:\Link", rdbuff, (sizeof(char)*25)))) < 0)
       
  2060     {
       
  2061        printf("Read through link file failed");
       
  2062        perror(" ");
       
  2063        return -1;
       
  2064     }
       
  2065     printf("Read through link file succeeded");
       
  2066 }
       
  2067 
       
  2068 @endcode
       
  2069  Output
       
  2070 @code
       
  2071 Read through link file succeeded.
       
  2072 
       
  2073 @endcode
       
  2074 
       
  2075 Limitations:
       
  2076 
       
  2077 The path parameter of the readlink() function should not exceed 256 characters in length. 
       
  2078 
       
  2079 @see lstat()
       
  2080 @see stat()
       
  2081 @see symlink()
       
  2082 @see symlink()
       
  2083 
       
  2084 
       
  2085 
       
  2086 @capability Deferred @ref RFs::Entry(const TDesC16&, TEntry&)
       
  2087 
       
  2088 @publishedAll
       
  2089 @externallyDefinedApi
       
  2090 */
       
  2091 
       
  2092 /** @fn gethostname(char *name, size_t size)
       
  2093 @param name
       
  2094 @param size
       
  2095 @return On successful completion, 0 is returned. Otherwise, -1 is returned
       
  2096 
       
  2097 The gethostname() function returns the standard host name for the current machine. The size argument specifies the size of the array pointed to by the name argument. The returned name is null-terminated, except that if size is an insufficient length to hold the host name, then the returned name is truncated and it is unspecified whether the returned name is null-terminated. 
       
  2098 Host names are limited to 255 bytes
       
  2099 
       
  2100 @see uname()
       
  2101 
       
  2102 @publishedAll
       
  2103 @externallyDefinedApi
       
  2104 */
       
  2105 
       
  2106 /** @fn  setegid(gid_t gid)
       
  2107 @param gid
       
  2108 
       
  2109 Refer to  setuid() for the documentation
       
  2110 
       
  2111 
       
  2112  
       
  2113 
       
  2114 @publishedAll
       
  2115 @externallyDefinedApi
       
  2116 */
       
  2117 
       
  2118 /** @fn  seteuid(uid_t uid)
       
  2119 @param uid
       
  2120 
       
  2121 Refer to  setuid() for the documentation
       
  2122 
       
  2123 
       
  2124  
       
  2125 
       
  2126 @publishedAll
       
  2127 @externallyDefinedApi
       
  2128 */
       
  2129 
       
  2130 /** @fn  symlink(const char *oldpath, const char *newpath)
       
  2131 @param oldpath
       
  2132 @param newpath
       
  2133 @return   Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno set to indicate the error.
       
  2134 
       
  2135  
       
  2136 
       
  2137  A symbolic link newpath is created to oldpath (newpath is the name of the file created, oldpath is the string used in creating the symbolic link). Either name 
       
  2138   may be an arbitrary path name. 
       
  2139 
       
  2140  The creation time stamp is not supported, only access and modification time 
       
  2141   stamps. Creating a link in a directory will not alter the time stamps of the 
       
  2142   directory itself.
       
  2143 
       
  2144  
       
  2145 
       
  2146 Examples:
       
  2147 @code
       
  2148 /*
       
  2149 * Detailed description  : Example to create symlink to a file.
       
  2150 * Precondition : "Parent.txt" should exist in c: drive.
       
  2151 * Remarks      : Symlink behaviour is exactly similar to link api.
       
  2152 */
       
  2153 #include <unistd.h>
       
  2154 #include <stdio.h>
       
  2155 int main(void)
       
  2156  {
       
  2157     if(symlink("C:\Parent.txt","C:\Link") < 0)
       
  2158     {
       
  2159          printf("simulated link creation to parent file failed");
       
  2160          return -1  ;
       
  2161     }
       
  2162     printf("simulated link to parent file created");
       
  2163     return 0 ;
       
  2164  }
       
  2165 
       
  2166 @endcode
       
  2167  Output
       
  2168 @code
       
  2169 simulated link to parent file created.
       
  2170 
       
  2171 @endcode
       
  2172 
       
  2173 Limitations:
       
  2174 
       
  2175 - The oldpath and newpath parameters of the symlink() function should not exceed 256 characters in length. 
       
  2176 - P.I.P.S. does not support links across file systems.
       
  2177 - P.I.P.S. does not support symlink on directories or existing link files.
       
  2178 - P.I.P.S. only simulates link files and does not distinguish between hard and symbolic links so link() and symlink() on P.I.P.S. are identical.
       
  2179 - KErrNotReady of Symbian error code is mapped to ENOENT, which typically means drive
       
  2180 not found or filesystem not mounted on the drive.
       
  2181 
       
  2182 @see link()
       
  2183 @see lstat()
       
  2184 @see readlink()
       
  2185 @see unlink()
       
  2186 @see symlink()
       
  2187 
       
  2188 
       
  2189 
       
  2190 @capability Deferred @ref RFs::Delete(const TDesC16&)
       
  2191 
       
  2192 @publishedAll
       
  2193 @externallyDefinedApi
       
  2194 */
       
  2195 
       
  2196 /** @fn  fchdir(int filedesc)
       
  2197 @param filedesc
       
  2198 
       
  2199 Refer to  chdir() for the documentation
       
  2200 
       
  2201 
       
  2202 
       
  2203 @capability Deferred @ref RFs::SetSessionPath(const TDesC16&)
       
  2204 
       
  2205 @publishedAll
       
  2206 @externallyDefinedApi
       
  2207 */
       
  2208 
       
  2209 /** @fn  getpgid(pid_t pid)
       
  2210 @param pid
       
  2211 
       
  2212 Refer to  getpgrp() for the documentation
       
  2213 
       
  2214 
       
  2215  
       
  2216 
       
  2217 @publishedAll
       
  2218 @externallyDefinedApi
       
  2219 */
       
  2220 
       
  2221 /** @fn  lchown(const char *path, uid_t owner, gid_t group)
       
  2222 @param path
       
  2223 @param owner
       
  2224 @param group
       
  2225 
       
  2226 Refer to  chown() for the documentation
       
  2227 
       
  2228 
       
  2229  
       
  2230 
       
  2231 @publishedAll
       
  2232 @externallyDefinedApi
       
  2233 */
       
  2234 
       
  2235 /** @fn  nice(int incr)
       
  2236 @param incr
       
  2237  
       
  2238 
       
  2239  The nice function obtains the scheduling priority of the process from 
       
  2240   the system and sets it to the priority value specified in incr. The priority is a value in the range -20 to 20. The default priority 
       
  2241   is 0. Lower priorities cause more favorable scheduling.
       
  2242 
       
  2243 
       
  2244 
       
  2245 Examples:
       
  2246 @code
       
  2247 #include<unistd.h>
       
  2248 #include<stdio.h>
       
  2249 int test_nice()
       
  2250 {
       
  2251    int retVal;
       
  2252    errno = 0;
       
  2253    int i = -10;
       
  2254    int ret_get1 = getpriority(PRIO_PROCESS,0);
       
  2255    retVal = nice(i);
       
  2256    int ret_get2 = getpriority(PRIO_PROCESS,0);
       
  2257    if((retVal == -1)&&(errno))
       
  2258    {
       
  2259       printf("failed");
       
  2260       return -1;
       
  2261    }
       
  2262    else
       
  2263    {
       
  2264      if(!(i - (ret_get2 - retget1)))
       
  2265      printf("Nice value: %d", i)
       
  2266      printf("nice passed");
       
  2267    }
       
  2268    return 0;
       
  2269 }       
       
  2270 
       
  2271 @endcode
       
  2272  Output
       
  2273 @code
       
  2274 Nice value: -10
       
  2275 nice passed
       
  2276 
       
  2277 @endcode
       
  2278 @see getpriority()
       
  2279 
       
  2280 
       
  2281  
       
  2282 
       
  2283 @publishedAll
       
  2284 @externallyDefinedApi
       
  2285 */
       
  2286 
       
  2287 /** @fn  setpgrp(pid_t _pid, pid_t _pgrp)
       
  2288 @param _pid
       
  2289 @param _pgrp
       
  2290 
       
  2291 Refer to  setpgid() for the documentation
       
  2292 
       
  2293 
       
  2294  
       
  2295 
       
  2296 @publishedAll
       
  2297 @externallyDefinedApi
       
  2298 */
       
  2299 
       
  2300 /** @fn  setregid(gid_t rgid, gid_t egid)
       
  2301 @param rgid
       
  2302 @param egid
       
  2303 @return   These functions always return 0.
       
  2304 
       
  2305   These functions are build supported but not available functionally. Symbian 
       
  2306 OS does not support multiple users and groups.
       
  2307 
       
  2308 
       
  2309 
       
  2310  
       
  2311 
       
  2312 @publishedAll
       
  2313 @externallyDefinedApi
       
  2314 */
       
  2315 
       
  2316 /** @fn  setreuid(uid_t ruid, uid_t euid)
       
  2317 @param ruid
       
  2318 @param euid
       
  2319 @return   These functions always return 0.
       
  2320 
       
  2321   These functions are build supported but not available functionally. Symbian 
       
  2322 OS does not support multiple users and groups.
       
  2323 
       
  2324 
       
  2325 
       
  2326  
       
  2327 
       
  2328 @publishedAll
       
  2329 @externallyDefinedApi
       
  2330 */
       
  2331 
       
  2332 /** @fn swab(const void *from, void *to, ssize_t len)
       
  2333 @param from
       
  2334 @param to
       
  2335 @param len
       
  2336 
       
  2337 The function  swab copies  len bytes from the location referenced by  from to the location referenced by  to, swapping adjacent bytes.
       
  2338 
       
  2339 The argument len must be an even number.
       
  2340 
       
  2341 Examples
       
  2342 @code
       
  2343 #include <string.h>
       
  2344 #include <stdio.h>
       
  2345 int main()
       
  2346 {
       
  2347     int i=0x00003366,j=0x0;
       
  2348     swab((void *)&i,(void *)&j,2);
       
  2349     if(j==0x6633)
       
  2350        printf("Ouput val = %#x\n",j);
       
  2351     return 0;
       
  2352 }
       
  2353 @endcode
       
  2354 
       
  2355 output
       
  2356 @code
       
  2357 Ouput val = 0x6633
       
  2358 @endcode
       
  2359 @see bzero()
       
  2360 @see memset()
       
  2361 
       
  2362  
       
  2363 
       
  2364 @publishedAll
       
  2365 @externallyDefinedApi
       
  2366 */
       
  2367 
       
  2368 /** @fn  usleep(useconds_t microseconds)
       
  2369 @param microseconds
       
  2370 @return   The usleep function returns the value 0 if successful; otherwise the value -1 is
       
  2371 returned and the global variable errno is set to indicate the error.
       
  2372 
       
  2373   The usleep function suspends execution of the calling process until either microseconds microseconds have elapsed or a signal is delivered to the process and its
       
  2374 action is to invoke a signal-catching function or to terminate the
       
  2375 process.
       
  2376 System activity may lengthen the sleep by an indeterminate amount.
       
  2377 
       
  2378  This function is implemented using nanosleep by pausing for microseconds microseconds or until a signal occurs.
       
  2379 Consequently, in this implementation,
       
  2380 sleeping has no effect on the state of process timers,
       
  2381 and there is no special handling for SIGALRM.
       
  2382 
       
  2383 Limitations:
       
  2384 
       
  2385 The signal related functionaities aren’t applicable to the symbian implementation as there is no support for signals from symbian.
       
  2386 
       
  2387 Examples:
       
  2388 @code
       
  2389 #include<unistd.h>
       
  2390 #include<stdio.h>
       
  2391  
       
  2392 int main()
       
  2393 {
       
  2394  unsigned long t = 2; 
       
  2395  int i;
       
  2396   
       
  2397  i = usleep(t);
       
  2398  printf("Expected: 0 usleep returned: %d", i);
       
  2399   
       
  2400  return 0;
       
  2401 }
       
  2402 
       
  2403 @endcode
       
  2404  Output
       
  2405 @code
       
  2406 Expected: 0 usleep returned: 0
       
  2407 
       
  2408 @endcode
       
  2409 @see nanosleep()
       
  2410 @see sleep()
       
  2411 
       
  2412 
       
  2413  
       
  2414 
       
  2415 @publishedAll
       
  2416 @externallyDefinedApi
       
  2417 */
       
  2418 
       
  2419 /** @fn truncate(const char *file, off_t length)
       
  2420 @param file
       
  2421 @param length
       
  2422 @return   Upon successful completion, both truncate() and ftruncate() shall return 0; otherwise, -1 shall be returned and errno set to indicate the error.
       
  2423 
       
  2424 
       
  2425 The  truncate system call causes the file named by  file or referenced by  filedesc to be truncated to  length bytes in size. If the file was larger than this size, the extra data is lost. If the file was smaller than this size, it will be extended as if by writing bytes with the value zero. With  ftruncate, the file must be open for writing.
       
  2426 
       
  2427 Examples:
       
  2428 @code
       
  2429 //example for truncate
       
  2430 #include<unistd.h>
       
  2431 #include<stdio.h>
       
  2432 #include <sys/stat.h>
       
  2433 int test_truncate()
       
  2434 {
       
  2435         int retVal, retVal2, retSize, retSize2;
       
  2436         struct stat buf;
       
  2437         ssize_t size;
       
  2438         char *buffer = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwx";
       
  2439         int fp = open("c:\test.txt", O_RDWR|O_CREAT);
       
  2440         size = write(fp,buffer,50);
       
  2441         close(fp);
       
  2442         retVal2 = stat("c:\test.txt", &buf );
       
  2443         if ( !retVal2 )
       
  2444         {
       
  2445         retSize = buf.st_size;
       
  2446         printf("Size before: %d", retSize);
       
  2447         retVal = truncate("c:\test.txt", retSize/2 );
       
  2448         }
       
  2449         else
       
  2450         {
       
  2451         printf("Failed");
       
  2452         }
       
  2453         retVal2 = stat( "c:\test.txt", &buf );
       
  2454         if ( !retVal2 )
       
  2455                 {
       
  2456                 retSize2 = buf.st_size;
       
  2457                 if( retSize2 == (retSize/2 ) )
       
  2458                         {
       
  2459                         printf("\nSize after: %d\n", retSize2);
       
  2460                         printf("Truncate passed");
       
  2461                         return 0;
       
  2462                         }
       
  2463                 else
       
  2464                         {
       
  2465                         printf("Failed");
       
  2466                         return -1;
       
  2467                         }
       
  2468                 }
       
  2469         else
       
  2470                 {
       
  2471                 printf("Failed");
       
  2472                 return -1;
       
  2473                 }
       
  2474 }
       
  2475 @endcode
       
  2476  Output
       
  2477 @code
       
  2478 Size before: 50
       
  2479 Size after: 25
       
  2480 Ttruncate Passed
       
  2481 @endcode
       
  2482 
       
  2483 Errors:
       
  2484 
       
  2485 The truncate and ftruncate succeed unless:
       
  2486 [EBADF] The filedesc argument is not a valid descriptor for a regular file.
       
  2487 [EINVAL] The filedesc argument references to an object other than a file. 
       
  2488 [EINVAL] The filedesc descriptor is not open for writing.
       
  2489 
       
  2490 
       
  2491 Bugs:
       
  2492 
       
  2493 These calls should be generalized to allow ranges of bytes in a file to be discarded.
       
  2494 Use of truncate to extend a file is not portable. 
       
  2495 @see open()
       
  2496 
       
  2497  
       
  2498 
       
  2499 @publishedAll
       
  2500 @externallyDefinedApi
       
  2501 */
       
  2502 
       
  2503 /** @fn truncate64(const char *file, off64_t length)
       
  2504 @param file
       
  2505 @param length
       
  2506 @return   Upon successful completion, both truncate64() and ftruncate64() shall return 0; otherwise, -1 shall be returned and errno set to indicate the error.
       
  2507 
       
  2508 For full documentation see: http://www.unix.org/version2/whatsnew/lfs20mar.html#3.0
       
  2509 
       
  2510 @see truncate()
       
  2511 
       
  2512 @publishedAll
       
  2513 @externallyDefinedApi
       
  2514 */
       
  2515 
       
  2516 /** @fn  brk(const void*)
       
  2517 
       
  2518 @return   Function always returns 0.
       
  2519 
       
  2520   The brk function is used to change the amount of memory allocated in a
       
  2521 process's data segment.It does this by moving the location of the "break".
       
  2522 This functionality is not supported by the Symbian OS platform and hence
       
  2523 is only build supported.
       
  2524 
       
  2525 
       
  2526 
       
  2527 @see mmap()
       
  2528 @see free()
       
  2529 @see malloc()
       
  2530 
       
  2531 
       
  2532  
       
  2533 
       
  2534 @publishedAll
       
  2535 @externallyDefinedApi
       
  2536 */
       
  2537 
       
  2538 /** @fn  getdtablesize(void)
       
  2539 @return  
       
  2540 
       
  2541   Each process has a fixed size descriptor table,
       
  2542 which is guaranteed to have at least 20 slots.
       
  2543 The entries in
       
  2544 the descriptor table are numbered with small integers starting at 0.
       
  2545 The getdtablesize system call returns the size of this table.
       
  2546 
       
  2547 Examples:
       
  2548 @code
       
  2549 #include <stdio.h>
       
  2550 int main()
       
  2551 {
       
  2552         printf("maximum number of files that can be opened by a process is %d",getdtablesize());
       
  2553 }
       
  2554 
       
  2555 @endcode
       
  2556  Output
       
  2557 @code
       
  2558 maximum number of files that can be opened by a process is 1024
       
  2559 
       
  2560 @endcode
       
  2561 @see close()
       
  2562 @see dup()
       
  2563 @see open()
       
  2564 
       
  2565 
       
  2566  
       
  2567 
       
  2568 @publishedAll
       
  2569 @externallyDefinedApi
       
  2570 */
       
  2571 
       
  2572 /** @fn  getpagesize(void)
       
  2573   The getpagesize function
       
  2574 returns the number of bytes in a page.
       
  2575 Page granularity is the granularity of many of the memory
       
  2576 management calls.
       
  2577 
       
  2578  The page size is a system
       
  2579 page size and may not be the same as the underlying
       
  2580 hardware page size.
       
  2581 
       
  2582 Examples:
       
  2583 @code
       
  2584 #include<unistd.h>
       
  2585 #include<stdio.h>
       
  2586 int test_getpagesize()
       
  2587 {
       
  2588    int retVal = 0;
       
  2589    retVal = getpagesize();
       
  2590    if( retVal >= 0)
       
  2591    {
       
  2592       printf("getpagesize passed");
       
  2593       printf("
       
  2594  retVal  = %d " retVal);
       
  2595       return retVal;
       
  2596    }
       
  2597    else
       
  2598    {
       
  2599    printf("Failed");
       
  2600    return -1;
       
  2601    }
       
  2602 }       
       
  2603 
       
  2604 @endcode
       
  2605  Output
       
  2606 @code
       
  2607 getpagesize passed
       
  2608 retVal = 4096
       
  2609 
       
  2610 @endcode
       
  2611 @see sbrk()
       
  2612 
       
  2613 
       
  2614  
       
  2615 
       
  2616 @publishedAll
       
  2617 @externallyDefinedApi
       
  2618 */
       
  2619 
       
  2620 /** @fn  initgroups(const char *, gid_t)
       
  2621 
       
  2622 @return   These functions always return 0.
       
  2623 
       
  2624  
       
  2625 
       
  2626  The getgroups function is build supported but not available functionally. 
       
  2627   Symbian OS does not support multiple users and groups.
       
  2628 
       
  2629 
       
  2630 
       
  2631 
       
  2632 
       
  2633  
       
  2634 
       
  2635 @publishedAll
       
  2636 @externallyDefinedApi
       
  2637 */
       
  2638 
       
  2639 /** @fn issetugid(void)
       
  2640 @return  The issetugid() function returns 1 if the process  was  made setuid  or  setgid  as  the result of the last or a previous call to execve(). Otherwise it returns 0
       
  2641 
       
  2642 The issetugid() function enables library functions (in  lib-termlib,   libc,  or  other  libraries)  to  guarantee  safe behavior when  used  in  setuid  or  setgid  programs.  Some library  functions  might be passed insufficient informationand not know whether the current program was started  setuidor  setgid  because  a  higher level calling code might have made changes to the uid, euid, gid, or egid. These low-levellibrary  functions are therefore unable to determine if theyare being run with elevated or normal privileges.
       
  2643 
       
  2644 Errors:
       
  2645 
       
  2646 The issetugid() function is  always  successful.  No  return value is reserved to indicate an error.
       
  2647 g
       
  2648 @publishedAll
       
  2649 @externallyDefinedApi
       
  2650 */
       
  2651 
       
  2652 /** @fn mkstemp(char *template)
       
  2653 @param template
       
  2654 @return The  mkstemp function returns -1 if no suitable file could be created and an error code is placed in the global variable.  errno.
       
  2655 
       
  2656 The  mkstemp function takes the given file name template and overwrites a portion of it to create a file with that name and returns a file descriptor opened for reading and writing. This file name is guaranteed not to exist at the time of function invocation and is suitable for use by the application. The template may be any file name with some number of ‘X s’ appended to it, for example  /tmp/temp.XXXXXX. The trailing ‘X s’ are replaced with a unique alphanumeric combination. The number of unique file names  mkstemp can return depends on the number of ‘X s’ provided; six ‘X s’ will result in  mkstemp selecting one of 56800235584 (62 ** 6) possible temporary file names.
       
  2657 
       
  2658 Errors:
       
  2659 
       
  2660 The  mkstemp function may set  errno to one of the following values:
       
  2661 [ENOTDIR]	The pathname portion of the template is not an existing directory.
       
  2662 The mkstemp function may also set errno to any value specified by the stat function.
       
  2663 The mkstemp function may also set errno to any value specified by the open function.
       
  2664 
       
  2665 Examples:
       
  2666 @code
       
  2667 #include <stdlib.h>
       
  2668 #include <stdio.h> //printf, SEEK_SET
       
  2669 #include <unistd.h>
       
  2670  
       
  2671 int main( void )
       
  2672 {
       
  2673  char arr[] = "c:\\someXXXXXXXX";
       
  2674  char buf[10];
       
  2675   
       
  2676  //create a temporary file using mkstemp()
       
  2677  int fd = mkstemp(arr);
       
  2678   
       
  2679  if(fd != -1)
       
  2680  {
       
  2681     //write to the file
       
  2682     write(fd, "hello", 5);
       
  2683     //seek to the beginning of the file
       
  2684     lseek(fd, 0, SEEK_SET); //beg of the file
       
  2685     //read from the file
       
  2686     read(fd, buf, 5);
       
  2687     buf[5] = '\0';
       
  2688     //close the file
       
  2689     close(fd);
       
  2690  }
       
  2691  
       
  2692  printf("buf read: %s", buf);
       
  2693  return 0;
       
  2694 }
       
  2695 @endcode
       
  2696 
       
  2697 Output
       
  2698 @code
       
  2699 buf read: hello
       
  2700 @endcode
       
  2701 
       
  2702 Limitations:
       
  2703 
       
  2704 The template parameter of the mkstemp() function should not exceed 256 characters in length. 
       
  2705 
       
  2706 @publishedAll
       
  2707 @externallyDefinedApi
       
  2708 */
       
  2709 
       
  2710 /** @fn  mkstemp64(char *template)
       
  2711 @param template
       
  2712 @return   The mkstemp64 function
       
  2713 returns -1 if no suitable file could be created
       
  2714 and an error code is placed in the global variable. errno.
       
  2715 
       
  2716 The mkstemp64() function generates a unique temporary file name from template. The last six characters of template must be XXXXXX and these are replaced with a string that makes the filename unique.
       
  2717 
       
  2718 The mkstemp64() function is a 64-bit version of mkstemp.
       
  2719 
       
  2720 @see mkstemp()
       
  2721  
       
  2722 @publishedAll
       
  2723 @externallyDefinedApi
       
  2724 */
       
  2725 
       
  2726 /** @fn  select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *tvptr)
       
  2727 @param maxfd
       
  2728 @param readfds
       
  2729 @param writefds
       
  2730 @param exceptfds
       
  2731 @param tvptr
       
  2732 @return   The select system call
       
  2733 returns the number of ready descriptors that are contained in
       
  2734 the descriptor sets,
       
  2735 or -1 if an error occurred.
       
  2736 If the time limit expires, select returns 0.
       
  2737 If select returns with an error,
       
  2738 the descriptor sets will be unmodified.
       
  2739 
       
  2740   The select system call
       
  2741 examines the I/O descriptor sets whose addresses are passed in readfds, writefds, and exceptfds to see if some of their descriptors
       
  2742 are ready for reading, are ready for writing, or have an exceptional
       
  2743 condition pending, respectively.
       
  2744 The only exceptional condition detectable is out-of-band
       
  2745 data received on a socket.
       
  2746 The first maxfd descriptors are checked in each set;
       
  2747 i.e., the descriptors from 0 through maxfd -1 in the descriptor sets are examined.
       
  2748 On return, select replaces the given descriptor sets
       
  2749 with subsets consisting of those descriptors that are ready
       
  2750 for the requested operation.
       
  2751 The select system call
       
  2752 returns the total number of ready descriptors in all the sets.
       
  2753 
       
  2754  The descriptor sets are stored as bit fields in arrays of integers.
       
  2755 The following macros are provided for manipulating such descriptor sets: 
       
  2756 
       
  2757 @code
       
  2758 FD_ZERO (&fdset;); initializes a descriptor set fdset to the null set. 
       
  2759 FD_SET (fd, &fdset;); includes a particular descriptor fd in fdset. 
       
  2760 FD_CLR (fd, &fdset;); removes fd from fdset. 
       
  2761 FD_ISSET (fd, &fdset;); is non-zero if fd is a member of fdset, zero otherwise.
       
  2762 @endcode
       
  2763 
       
  2764 The behavior of these macros is undefined if
       
  2765 a descriptor value is less than zero or greater than or equal to FD_SETSIZE, which is normally at least equal
       
  2766 to the maximum number of descriptors supported by the system.
       
  2767 
       
  2768  If tvptr is not a null pointer, it specifies the maximum interval to wait for the
       
  2769 selection to complete.
       
  2770 System activity can lengthen the interval by
       
  2771 an indeterminate amount.
       
  2772 
       
  2773  To effect a poll, the tvptr argument should not be a null pointer,
       
  2774 but it should point to a zero-valued timeval structure.
       
  2775 
       
  2776  Any of readfds, writefds, and exceptfds may be given as null pointers if no descriptors are of interest.
       
  2777 
       
  2778 Errors:
       
  2779 
       
  2780 An error return from  select indicates:
       
  2781 [EBADF] 	One of the descriptor sets specified an invalid descriptor.
       
  2782 [EFAULT] 	One of the arguments readfds, writefds, exceptfds, or tvptr points to an invalid address.
       
  2783 [EINVAL] 	The specified time limit is invalid. One of its components is negative or too large.
       
  2784 [EINVAL] 	The maxfd argument was invalid.
       
  2785 
       
  2786 Limitations:
       
  2787 
       
  2788 select is not interrupted by signals, as signals are not supported by 
       
  2789 Symbian OS. If tvptr is set to null, select does not block forever, but waits for a maximum of 10 seconds 
       
  2790 and returns. select cannot be called a second time on the same socket descriptor 
       
  2791 before the first select operation on the same socket descriptor completes. (i.e) Only 
       
  2792 one select operation can be outstanding on a Socket. This is because of 
       
  2793 the limitation of the underlying Ioctl operation. Only one Ioctl operation may be outstanding for each socket.
       
  2794 Examples:
       
  2795 @code
       
  2796 #include <sys/select.h>
       
  2797 #include <unistd.h>
       
  2798 /*
       
  2799 * A simple example of testing a single FD for readability
       
  2800 * This example returns 1 when the fd is ready for reading.
       
  2801 */
       
  2802 #include <sys/select.h>
       
  2803 #include <unistd.h>
       
  2804 /*
       
  2805 * A simple example of testing a single FD for readability
       
  2806 * This example returns 1 when the fd is ready for reading.
       
  2807 */
       
  2808 int isready(int fd)
       
  2809 {
       
  2810     int rc;
       
  2811     fd_set fds;
       
  2812     struct timeval tv;
       
  2813    
       
  2814     /*
       
  2815      * FD_ZERO() clears out the fd_set called fds, so that
       
  2816      * it doesn’t contain any file descriptors.
       
  2817      */
       
  2818     FD_ZERO(&fds);
       
  2819     /*
       
  2820      * FD_SET() adds the file descriptor "fd" to the fd_set,
       
  2821      * so that select() will return if fd is readable
       
  2822      */
       
  2823     FD_SET(fd,&fds);
       
  2824     tv.tv_sec = tv.tv_usec = 0;
       
  2825     /*
       
  2826      * The first argument to select is the highest file
       
  2827      * descriptor value plus 1.
       
  2828      */
       
  2829                         
       
  2830      /* The second argument to select() is the address of
       
  2831       * the fd_set that contains fd’s we’re waiting
       
  2832       * to be readable.
       
  2833       */
       
  2834                         
       
  2835      /* The third parameter is an fd_set that you want to
       
  2836       * know if you can write on -- this example doesn’t
       
  2837       * use it, so it passes 0, or NULL.
       
  2838       */
       
  2839      /* The fourth parameter is sockets you’re waiting for
       
  2840       * out-of-band data for.
       
  2841       */
       
  2842                 
       
  2843      /* The last parameter to select() is a time-out of how
       
  2844       * long select() should block.
       
  2845       */
       
  2846      rc = select(fd+1, &fds, NULL, NULL, &tv);
       
  2847      /* select() returns the number of fd’s that are ready       
       
  2848       * Once select() returns, the original fd_set has been
       
  2849       * modified so it now reflects the state of why select()
       
  2850       * woke up. i.e. If file descriptor 4 was originally in
       
  2851       * the fd_set, and then it became readable, the fd_set
       
  2852       * contains file descriptor 4 in it.
       
  2853       */
       
  2854      if (rc < 0)
       
  2855        return -1;
       
  2856      return FD_ISSET(fd,&fds) ? 1 : 0;
       
  2857 }
       
  2858 @endcode
       
  2859 @see accept()
       
  2860 @see connect()
       
  2861 @see getdtablesize()
       
  2862 @see gettimeofday()
       
  2863 @see read()
       
  2864 @see recv()
       
  2865 @see send()
       
  2866 @see write()
       
  2867 
       
  2868 
       
  2869 Notes:
       
  2870 
       
  2871  The default size of FD_SETSIZE is currently set to 1024.
       
  2872 In order to accommodate programs which might potentially
       
  2873 use a larger number of open files with select, it is possible
       
  2874 to increase this size by having the program define FD_SETSIZE before the inclusion of any header which includes 
       
  2875 
       
  2876 \#include \< sys/types.h \> 
       
  2877 
       
  2878 If maxfd is greater than the number of open files, select is not guaranteed to examine the unused file descriptors. For 
       
  2879   historical reasons, select will always examine the first 256 descriptors. 
       
  2880 
       
  2881 The select system call appeared in BSD 4.2.
       
  2882 
       
  2883 Bugs:
       
  2884 
       
  2885 <code> -susv2 </code> allows systems to modify the original tvptr in place.
       
  2886 Thus, it is unwise to assume that the tvptr value will be unmodified
       
  2887 by the select system call.
       
  2888  
       
  2889 
       
  2890  
       
  2891 
       
  2892 @publishedAll
       
  2893 @externallyDefinedApi
       
  2894 */
       
  2895 
       
  2896 /** @fn  setgroups(int, const gid_t *)
       
  2897 
       
  2898 Refer to  getgrent() for the documentation
       
  2899 
       
  2900 
       
  2901  
       
  2902 
       
  2903 @publishedAll
       
  2904 @externallyDefinedApi
       
  2905 */
       
  2906 
       
  2907 
       
  2908 /** @fn  alarm(unsigned int seconds)
       
  2909 @param seconds -
       
  2910 @return -
       
  2911 
       
  2912 For full documentation see: http://www.opengroup.org/onlinepubs/009695399/functions/alarm.html
       
  2913 
       
  2914 The Symbian implementation of this API fully supports POSIX functionality.
       
  2915 
       
  2916 @publishedAll
       
  2917 @externallyDefinedApi
       
  2918 */
       
  2919 
       
  2920 /** @def environ	
       
  2921 
       
  2922 Environment variable.
       
  2923   
       
  2924 @publishedAll
       
  2925 @released
       
  2926 */
       
  2927 
       
  2928 /** @def STDIN_FILENO
       
  2929 
       
  2930 standard input file descriptor 
       
  2931 
       
  2932 @publishedAll
       
  2933 @externallyDefinedApi
       
  2934 */
       
  2935 
       
  2936 /** @def STDOUT_FILENO
       
  2937 
       
  2938 standard output file descriptor
       
  2939 
       
  2940 @publishedAll
       
  2941 @externallyDefinedApi
       
  2942 */
       
  2943 
       
  2944 /** @def STDERR_FILENO
       
  2945 
       
  2946 standard error file descriptor
       
  2947 
       
  2948 @publishedAll
       
  2949 @externallyDefinedApi
       
  2950 */
       
  2951 
       
  2952 /** @def F_ULOCK
       
  2953 
       
  2954 unlock locked section
       
  2955 
       
  2956 @publishedAll
       
  2957 @externallyDefinedApi
       
  2958 */
       
  2959 
       
  2960 /** @def F_LOCK
       
  2961 
       
  2962 lock a section for exclusive use
       
  2963 
       
  2964 @publishedAll
       
  2965 @externallyDefinedApi
       
  2966 */
       
  2967 
       
  2968 /** @def F_TLOCK
       
  2969 
       
  2970 test and lock a section for exclusive use
       
  2971 
       
  2972 @publishedAll
       
  2973 @externallyDefinedApi
       
  2974 */
       
  2975 
       
  2976 /** @def F_TEST
       
  2977 
       
  2978 test a section for locks by other procs
       
  2979 
       
  2980 @publishedAll
       
  2981 @externallyDefinedApi
       
  2982 */
       
  2983 
       
  2984 /** @def _SC_ARG_MAX
       
  2985 
       
  2986 POSIX-style system configuration variable accessors (for the sysconf function).
       
  2987 
       
  2988 @publishedAll
       
  2989 @externallyDefinedApi
       
  2990 */
       
  2991 
       
  2992 /** @def _SC_CHILD_MAX		
       
  2993 
       
  2994 POSIX-style system configuration variable accessors (for the sysconf function).
       
  2995  
       
  2996 @publishedAll
       
  2997 @externallyDefinedApi
       
  2998 */
       
  2999 
       
  3000 /** @def _SC_CLK_TCK	
       
  3001 
       
  3002 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3003 	 
       
  3004 @publishedAll
       
  3005 @externallyDefinedApi
       
  3006 */
       
  3007 
       
  3008 /** @def _SC_NGROUPS_MAX
       
  3009 
       
  3010 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3011 		 
       
  3012 @publishedAll
       
  3013 @externallyDefinedApi
       
  3014 */
       
  3015 
       
  3016 /** @def _SC_OPEN_MAX	
       
  3017 
       
  3018 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3019 	 
       
  3020 @publishedAll
       
  3021 @externallyDefinedApi
       
  3022 */
       
  3023 
       
  3024 /** @def _SC_JOB_CONTROL
       
  3025 
       
  3026 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3027 		 
       
  3028 @publishedAll
       
  3029 @externallyDefinedApi
       
  3030 */
       
  3031 
       
  3032 /** @def _SC_SAVED_IDS	
       
  3033 
       
  3034 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3035 	 
       
  3036 @publishedAll
       
  3037 @externallyDefinedApi
       
  3038 */
       
  3039 
       
  3040 /** @def _SC_VERSION	
       
  3041 
       
  3042 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3043 	 
       
  3044 @publishedAll
       
  3045 @externallyDefinedApi
       
  3046 */
       
  3047 
       
  3048 /** @def _SC_BC_BASE_MAX	
       
  3049 
       
  3050 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3051 	 
       
  3052 @publishedAll
       
  3053 @externallyDefinedApi
       
  3054 */
       
  3055 
       
  3056 /** @def _SC_BC_DIM_MAX	
       
  3057 
       
  3058 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3059 	
       
  3060 @publishedAll
       
  3061 @externallyDefinedApi
       
  3062 */
       
  3063 
       
  3064 /** @def _SC_BC_SCALE_MAX
       
  3065 
       
  3066 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3067 	
       
  3068 @publishedAll
       
  3069 @externallyDefinedApi
       
  3070 */
       
  3071 
       
  3072 /** @def _SC_BC_STRING_MAX
       
  3073 
       
  3074 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3075 	
       
  3076 @publishedAll
       
  3077 @externallyDefinedApi
       
  3078 */
       
  3079 
       
  3080 /** @def _SC_COLL_WEIGHTS_MAX	
       
  3081 
       
  3082 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3083 
       
  3084 @publishedAll
       
  3085 @externallyDefinedApi
       
  3086 */
       
  3087 
       
  3088 /** @def _SC_EXPR_NEST_MAX	
       
  3089 
       
  3090 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3091 
       
  3092 @publishedAll
       
  3093 @externallyDefinedApi
       
  3094 */
       
  3095 
       
  3096 /** @def _SC_LINE_MAX		
       
  3097 
       
  3098 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3099 
       
  3100 @publishedAll
       
  3101 @externallyDefinedApi
       
  3102 */
       
  3103 
       
  3104 /** @def _SC_RE_DUP_MAX		
       
  3105 
       
  3106 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3107 
       
  3108 @publishedAll
       
  3109 @externallyDefinedApi
       
  3110 */
       
  3111 
       
  3112 /** @def _SC_2_VERSION	
       
  3113 
       
  3114 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3115 	
       
  3116 @publishedAll
       
  3117 @externallyDefinedApi
       
  3118 */
       
  3119 
       
  3120 /** @def _SC_2_C_BIND		
       
  3121 
       
  3122 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3123 
       
  3124 @publishedAll
       
  3125 @externallyDefinedApi
       
  3126 */
       
  3127 
       
  3128 /** @def _SC_2_C_DEV		
       
  3129 
       
  3130 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3131 
       
  3132 @publishedAll
       
  3133 @externallyDefinedApi
       
  3134 */
       
  3135 
       
  3136 /** @def _SC_2_CHAR_TERM	
       
  3137 
       
  3138 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3139 	
       
  3140 @publishedAll
       
  3141 @externallyDefinedApi
       
  3142 */
       
  3143 
       
  3144 /** @def _SC_2_FORT_DEV		
       
  3145 
       
  3146 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3147 
       
  3148 @publishedAll
       
  3149 @externallyDefinedApi
       
  3150 */
       
  3151 
       
  3152 /** @def _SC_2_FORT_RUN		
       
  3153 
       
  3154 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3155 
       
  3156 @publishedAll
       
  3157 @externallyDefinedApi
       
  3158 */
       
  3159 
       
  3160 /** @def _SC_2_LOCALEDEF	
       
  3161 
       
  3162 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3163 	
       
  3164 @publishedAll
       
  3165 @externallyDefinedApi
       
  3166 */
       
  3167 
       
  3168 /** @def _SC_2_SW_DEV		
       
  3169 
       
  3170 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3171 
       
  3172 @publishedAll
       
  3173 @externallyDefinedApi
       
  3174 */
       
  3175 
       
  3176 /** @def _SC_2_UPE		
       
  3177 
       
  3178 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3179 
       
  3180 @publishedAll
       
  3181 @externallyDefinedApi
       
  3182 */
       
  3183 
       
  3184 /** @def _SC_STREAM_MAX		
       
  3185 
       
  3186 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3187 
       
  3188 @publishedAll
       
  3189 @externallyDefinedApi
       
  3190 */
       
  3191 
       
  3192 /** @def _SC_TZNAME_MAX		
       
  3193 
       
  3194 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3195 
       
  3196 @publishedAll
       
  3197 @externallyDefinedApi
       
  3198 */
       
  3199 
       
  3200 /** @def _SC_ASYNCHRONOUS_IO	
       
  3201 
       
  3202 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3203 
       
  3204 @publishedAll
       
  3205 @externallyDefinedApi
       
  3206 */
       
  3207 
       
  3208 /** @def _SC_MAPPED_FILES	
       
  3209 
       
  3210 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3211 
       
  3212 @publishedAll
       
  3213 @externallyDefinedApi
       
  3214 */
       
  3215 
       
  3216 /** @def _SC_MEMLOCK		
       
  3217 
       
  3218 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3219 
       
  3220 @publishedAll
       
  3221 @externallyDefinedApi
       
  3222 */
       
  3223 
       
  3224 /** @def _SC_MEMLOCK_RANGE	
       
  3225 
       
  3226 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3227 
       
  3228 @publishedAll
       
  3229 @externallyDefinedApi
       
  3230 */
       
  3231 
       
  3232 /** @def _SC_MEMORY_PROTECTION	
       
  3233 
       
  3234 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3235 
       
  3236 @publishedAll
       
  3237 @externallyDefinedApi
       
  3238 */
       
  3239 
       
  3240 /** @def _SC_MESSAGE_PASSING	
       
  3241 
       
  3242 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3243 
       
  3244 @publishedAll
       
  3245 @externallyDefinedApi
       
  3246 */
       
  3247 
       
  3248 /** @def _SC_PRIORITIZED_IO	
       
  3249 
       
  3250 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3251 
       
  3252 @publishedAll
       
  3253 @externallyDefinedApi
       
  3254 */
       
  3255 
       
  3256 /** @def _SC_PRIORITY_SCHEDULING
       
  3257 
       
  3258 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3259 	
       
  3260 @publishedAll
       
  3261 @externallyDefinedApi
       
  3262 */
       
  3263 
       
  3264 /** @def _SC_REALTIME_SIGNALS	
       
  3265 
       
  3266 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3267 
       
  3268 @publishedAll
       
  3269 @externallyDefinedApi
       
  3270 */
       
  3271 
       
  3272 /** @def _SC_SEMAPHORES	
       
  3273 
       
  3274 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3275 	
       
  3276 @publishedAll
       
  3277 @externallyDefinedApi
       
  3278 */
       
  3279 
       
  3280 /** @def _SC_FSYNC	
       
  3281 
       
  3282 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3283 	
       
  3284 @publishedAll
       
  3285 @externallyDefinedApi
       
  3286 */
       
  3287 
       
  3288 /** @def _SC_SHARED_MEMORY_OBJECTS 
       
  3289 
       
  3290 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3291 
       
  3292 @publishedAll
       
  3293 @externallyDefinedApi
       
  3294 */
       
  3295 
       
  3296 /** @def _SC_SYNCHRONIZED_IO	
       
  3297 
       
  3298 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3299 
       
  3300 @publishedAll
       
  3301 @externallyDefinedApi
       
  3302 */
       
  3303 
       
  3304 /** @def _SC_TIMERS		
       
  3305 
       
  3306 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3307 
       
  3308 @publishedAll
       
  3309 @externallyDefinedApi
       
  3310 */
       
  3311 
       
  3312 /** @def _SC_AIO_LISTIO_MAX	
       
  3313 
       
  3314 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3315 
       
  3316 @publishedAll
       
  3317 @externallyDefinedApi
       
  3318 */
       
  3319 
       
  3320 /** @def _SC_AIO_MAX		
       
  3321 
       
  3322 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3323 
       
  3324 @publishedAll
       
  3325 @externallyDefinedApi
       
  3326 */
       
  3327 
       
  3328 /** @def _SC_AIO_PRIO_DELTA_MAX	
       
  3329 
       
  3330 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3331 
       
  3332 @publishedAll
       
  3333 @externallyDefinedApi
       
  3334 */
       
  3335 
       
  3336 /** @def _SC_DELAYTIMER_MAX
       
  3337 
       
  3338 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3339 	
       
  3340 @publishedAll
       
  3341 @externallyDefinedApi
       
  3342 */
       
  3343 
       
  3344 /** @def _SC_MQ_OPEN_MAX	
       
  3345 
       
  3346 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3347 	
       
  3348 @publishedAll
       
  3349 @externallyDefinedApi
       
  3350 */
       
  3351 
       
  3352 /** @def _SC_PAGESIZE		
       
  3353 
       
  3354 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3355 
       
  3356 @publishedAll
       
  3357 @externallyDefinedApi
       
  3358 */
       
  3359 
       
  3360 /** @def _SC_RTSIG_MAX		
       
  3361 
       
  3362 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3363 
       
  3364 @publishedAll
       
  3365 @externallyDefinedApi
       
  3366 */
       
  3367 
       
  3368 /** @def _SC_SEM_NSEMS_MAX	
       
  3369 
       
  3370 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3371 
       
  3372 @publishedAll
       
  3373 @externallyDefinedApi
       
  3374 */
       
  3375 
       
  3376 /** @def _SC_SEM_VALUE_MAX	
       
  3377 
       
  3378 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3379 
       
  3380 @publishedAll
       
  3381 @externallyDefinedApi
       
  3382 */
       
  3383 
       
  3384 /** @def _SC_SIGQUEUE_MAX	
       
  3385 
       
  3386 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3387 
       
  3388 @publishedAll
       
  3389 @externallyDefinedApi
       
  3390 */
       
  3391 
       
  3392 /** @def _SC_TIMER_MAX		
       
  3393 
       
  3394 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3395 
       
  3396 @publishedAll
       
  3397 @externallyDefinedApi
       
  3398 */
       
  3399 
       
  3400 /** @def _SC_2_PBS		
       
  3401 
       
  3402 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3403 
       
  3404 @publishedAll
       
  3405 @externallyDefinedApi
       
  3406 */
       
  3407 
       
  3408 /** @def _SC_2_PBS_ACCOUNTING	
       
  3409 
       
  3410 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3411 
       
  3412 @publishedAll
       
  3413 @externallyDefinedApi
       
  3414 */
       
  3415 
       
  3416 /** @def _SC_2_PBS_CHECKPOINT	
       
  3417 
       
  3418 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3419 
       
  3420 @publishedAll
       
  3421 @externallyDefinedApi
       
  3422 */
       
  3423 
       
  3424 /** @def _SC_2_PBS_LOCATE	
       
  3425 
       
  3426 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3427 
       
  3428 @publishedAll
       
  3429 @externallyDefinedApi
       
  3430 */ 
       
  3431 
       
  3432 /** @def _SC_2_PBS_MESSAGE	
       
  3433 
       
  3434 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3435 
       
  3436 @publishedAll
       
  3437 @externallyDefinedApi
       
  3438 */
       
  3439 
       
  3440 /** @def _SC_2_PBS_TRACK	
       
  3441 
       
  3442 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3443 	
       
  3444 @publishedAll
       
  3445 @externallyDefinedApi
       
  3446 */
       
  3447 
       
  3448 /** @def _SC_ADVISORY_INFO	
       
  3449 
       
  3450 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3451 
       
  3452 @publishedAll
       
  3453 @externallyDefinedApi
       
  3454 */
       
  3455 
       
  3456 /** @def _SC_BARRIERS		
       
  3457 
       
  3458 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3459 
       
  3460 @publishedAll
       
  3461 @externallyDefinedApi
       
  3462 */
       
  3463 
       
  3464 /** @def _SC_CLOCK_SELECTION	
       
  3465 
       
  3466 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3467 
       
  3468 @publishedAll
       
  3469 @externallyDefinedApi
       
  3470 */
       
  3471 
       
  3472 /** @def _SC_CPUTIME		
       
  3473 
       
  3474 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3475 
       
  3476 @publishedAll
       
  3477 @externallyDefinedApi
       
  3478 */
       
  3479 
       
  3480 /** @def _SC_FILE_LOCKING	
       
  3481 
       
  3482 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3483 
       
  3484 @publishedAll
       
  3485 @externallyDefinedApi
       
  3486 */
       
  3487 
       
  3488 /** @def _SC_GETGR_R_SIZE_MAX	
       
  3489 
       
  3490 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3491 
       
  3492 @publishedAll
       
  3493 @externallyDefinedApi
       
  3494 */
       
  3495 
       
  3496 /** @def _SC_GETPW_R_SIZE_MAX	
       
  3497 
       
  3498 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3499 
       
  3500 @publishedAll
       
  3501 @externallyDefinedApi
       
  3502 */
       
  3503 
       
  3504 /** @def _SC_HOST_NAME_MAX	
       
  3505 
       
  3506 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3507 
       
  3508 @publishedAll
       
  3509 @externallyDefinedApi
       
  3510 */
       
  3511 
       
  3512 /** @def _SC_LOGIN_NAME_MAX	
       
  3513 
       
  3514 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3515 
       
  3516 @publishedAll
       
  3517 @externallyDefinedApi
       
  3518 */
       
  3519 
       
  3520 /** @def _SC_MONOTONIC_CLOCK	
       
  3521 
       
  3522 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3523 
       
  3524 @publishedAll
       
  3525 @externallyDefinedApi
       
  3526 */
       
  3527 
       
  3528 /** @def _SC_MQ_PRIO_MAX	
       
  3529 
       
  3530 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3531 	
       
  3532 @publishedAll
       
  3533 @externallyDefinedApi
       
  3534 */
       
  3535 
       
  3536 /** @def _SC_READER_WRITER_LOCKS	
       
  3537 
       
  3538 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3539 
       
  3540 @publishedAll
       
  3541 @externallyDefinedApi
       
  3542 */
       
  3543 
       
  3544 /** @def _SC_REGEXP		
       
  3545 
       
  3546 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3547 
       
  3548 @publishedAll
       
  3549 @externallyDefinedApi
       
  3550 */
       
  3551 
       
  3552 /** @def _SC_SHELL		
       
  3553 
       
  3554 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3555 
       
  3556 @publishedAll
       
  3557 @externallyDefinedApi
       
  3558 */
       
  3559 
       
  3560 /** @def _SC_SPAWN		
       
  3561 
       
  3562 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3563 
       
  3564 @publishedAll
       
  3565 @externallyDefinedApi
       
  3566 */
       
  3567 
       
  3568 /** @def _SC_SPIN_LOCKS		
       
  3569 
       
  3570 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3571 
       
  3572 @publishedAll
       
  3573 @externallyDefinedApi
       
  3574 */
       
  3575 
       
  3576 /** @def _SC_SPORADIC_SERVER	
       
  3577 
       
  3578 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3579 
       
  3580 @publishedAll
       
  3581 @externallyDefinedApi
       
  3582 */
       
  3583 
       
  3584 /** @def _SC_THREAD_ATTR_STACKADDR 
       
  3585 
       
  3586 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3587 
       
  3588 @publishedAll
       
  3589 @externallyDefinedApi
       
  3590 */
       
  3591 
       
  3592 /** @def _SC_THREAD_ATTR_STACKSIZE 
       
  3593 
       
  3594 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3595 
       
  3596 @publishedAll
       
  3597 @externallyDefinedApi
       
  3598 */
       
  3599 
       
  3600 /** @def _SC_THREAD_CPUTIME	
       
  3601 
       
  3602 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3603 
       
  3604 @publishedAll
       
  3605 @externallyDefinedApi
       
  3606 */
       
  3607 
       
  3608 /** @def _SC_THREAD_DESTRUCTOR_ITERATIONS 
       
  3609 
       
  3610 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3611 
       
  3612 @publishedAll
       
  3613 @externallyDefinedApi
       
  3614 */
       
  3615 
       
  3616 /** @def _SC_THREAD_KEYS_MAX	
       
  3617 
       
  3618 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3619 
       
  3620 @publishedAll
       
  3621 @externallyDefinedApi
       
  3622 */
       
  3623 
       
  3624 /** @def _SC_THREAD_PRIO_INHERIT	
       
  3625 
       
  3626 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3627 
       
  3628 @publishedAll
       
  3629 @externallyDefinedApi
       
  3630 */
       
  3631 
       
  3632 /** @def _SC_THREAD_PRIO_PROTECT	
       
  3633 
       
  3634 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3635 
       
  3636 @publishedAll
       
  3637 @externallyDefinedApi
       
  3638 */
       
  3639 
       
  3640 /** @def _SC_THREAD_PRIORITY_SCHEDULING 
       
  3641 
       
  3642 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3643 
       
  3644 @publishedAll
       
  3645 @externallyDefinedApi
       
  3646 */
       
  3647 
       
  3648 /** @def _SC_THREAD_PROCESS_SHARED 
       
  3649 
       
  3650 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3651 
       
  3652 @publishedAll
       
  3653 @externallyDefinedApi
       
  3654 */
       
  3655 
       
  3656 /** @def _SC_THREAD_SAFE_FUNCTIONS 
       
  3657 
       
  3658 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3659 
       
  3660 @publishedAll
       
  3661 @externallyDefinedApi
       
  3662 */
       
  3663 
       
  3664 /** @def _SC_THREAD_SPORADIC_SERVER 
       
  3665 
       
  3666 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3667 
       
  3668 @publishedAll
       
  3669 @externallyDefinedApi
       
  3670 */
       
  3671 
       
  3672 /** @def _SC_THREAD_STACK_MIN	
       
  3673 
       
  3674 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3675 
       
  3676 @publishedAll
       
  3677 @externallyDefinedApi
       
  3678 */
       
  3679 
       
  3680 /** @def _SC_THREAD_THREADS_MAX	
       
  3681 
       
  3682 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3683 
       
  3684 @publishedAll
       
  3685 @externallyDefinedApi
       
  3686 */
       
  3687 
       
  3688 /** @def _SC_TIMEOUTS		
       
  3689 
       
  3690 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3691 
       
  3692 @publishedAll
       
  3693 @externallyDefinedApi
       
  3694 */
       
  3695 
       
  3696 /** @def _SC_THREADS	
       
  3697 
       
  3698 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3699 	
       
  3700 @publishedAll
       
  3701 @externallyDefinedApi
       
  3702 */
       
  3703 
       
  3704 /** @def _SC_TRACE	
       
  3705 
       
  3706 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3707 	
       
  3708 @publishedAll
       
  3709 @externallyDefinedApi
       
  3710 */
       
  3711 
       
  3712 /** @def _SC_TRACE_EVENT_FILTER	
       
  3713 
       
  3714 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3715 
       
  3716 @publishedAll
       
  3717 @externallyDefinedApi
       
  3718 */
       
  3719 
       
  3720 /** @def _SC_TRACE_INHERIT	
       
  3721 
       
  3722 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3723 
       
  3724 @publishedAll
       
  3725 @externallyDefinedApi
       
  3726 */
       
  3727 
       
  3728 /** @def _SC_TRACE_LOG		
       
  3729 
       
  3730 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3731 
       
  3732 @publishedAll
       
  3733 @externallyDefinedApi
       
  3734 */
       
  3735 
       
  3736 /** @def _SC_TTY_NAME_MAX	
       
  3737 
       
  3738 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3739 
       
  3740 @publishedAll
       
  3741 @externallyDefinedApi
       
  3742 */
       
  3743 
       
  3744 /** @def _SC_TYPED_MEMORY_OBJECTS 
       
  3745 
       
  3746 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3747 
       
  3748 @publishedAll
       
  3749 @externallyDefinedApi
       
  3750 */
       
  3751 
       
  3752 /** @def _SC_V6_ILP32_OFF32	
       
  3753 
       
  3754 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3755 
       
  3756 @publishedAll
       
  3757 @externallyDefinedApi
       
  3758 */
       
  3759 
       
  3760 /** @def _SC_V6_ILP32_OFFBIG	
       
  3761 
       
  3762 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3763 
       
  3764 @publishedAll
       
  3765 @externallyDefinedApi
       
  3766 */
       
  3767 
       
  3768 /** @def _SC_V6_LP64_OFF64	
       
  3769 
       
  3770 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3771 
       
  3772 @publishedAll
       
  3773 @externallyDefinedApi
       
  3774 */
       
  3775 
       
  3776 /** @def _SC_V6_LPBIG_OFFBIG	
       
  3777 
       
  3778 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3779 
       
  3780 @publishedAll
       
  3781 @externallyDefinedApi
       
  3782 */
       
  3783 
       
  3784 /** @def _SC_IPV6		
       
  3785 
       
  3786 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3787 
       
  3788 @publishedAll
       
  3789 @externallyDefinedApi
       
  3790 */
       
  3791 
       
  3792 /** @def _SC_RAW_SOCKETS	
       
  3793 
       
  3794 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3795 	
       
  3796 @publishedAll
       
  3797 @externallyDefinedApi
       
  3798 */
       
  3799 
       
  3800 /** @def _SC_SYMLOOP_MAX	
       
  3801 
       
  3802 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3803 	
       
  3804 @publishedAll
       
  3805 @externallyDefinedApi
       
  3806 */
       
  3807 
       
  3808 /** @def _SC_ATEXIT_MAX		
       
  3809 
       
  3810 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3811 
       
  3812 @publishedAll
       
  3813 @externallyDefinedApi
       
  3814 */
       
  3815 
       
  3816 /** @def _SC_IOV_MAX		
       
  3817 
       
  3818 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3819 
       
  3820 @publishedAll
       
  3821 @externallyDefinedApi
       
  3822 */
       
  3823 
       
  3824 /** @def _SC_PAGE_SIZE		
       
  3825 
       
  3826 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3827 
       
  3828 @publishedAll
       
  3829 @externallyDefinedApi
       
  3830 */
       
  3831 
       
  3832 /** @def _SC_XOPEN_CRYPT	
       
  3833 
       
  3834 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3835 	
       
  3836 @publishedAll
       
  3837 @externallyDefinedApi
       
  3838 */
       
  3839 
       
  3840 /** @def _SC_XOPEN_ENH_I18N	
       
  3841 
       
  3842 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3843 
       
  3844 @publishedAll
       
  3845 @externallyDefinedApi
       
  3846 */
       
  3847 
       
  3848 /** @def _SC_XOPEN_LEGACY	
       
  3849 
       
  3850 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3851 
       
  3852 @publishedAll
       
  3853 @externallyDefinedApi
       
  3854 */
       
  3855 
       
  3856 /** @def _SC_XOPEN_REALTIME	
       
  3857 
       
  3858 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3859 
       
  3860 @publishedAll
       
  3861 @externallyDefinedApi
       
  3862 */
       
  3863 
       
  3864 /** @def _SC_XOPEN_REALTIME_THREADS 
       
  3865 
       
  3866 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3867 
       
  3868 @publishedAll
       
  3869 @externallyDefinedApi
       
  3870 */
       
  3871 
       
  3872 /** @def _SC_XOPEN_SHM		
       
  3873 
       
  3874 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3875 
       
  3876 @publishedAll
       
  3877 @externallyDefinedApi
       
  3878 */
       
  3879 
       
  3880 /** @def _SC_XOPEN_STREAMS	
       
  3881 
       
  3882 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3883 
       
  3884 @publishedAll
       
  3885 @externallyDefinedApi
       
  3886 */
       
  3887 
       
  3888 /** @def _SC_XOPEN_UNIX		
       
  3889 
       
  3890 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3891 
       
  3892 @publishedAll
       
  3893 @externallyDefinedApi
       
  3894 */
       
  3895 
       
  3896 /** @def _SC_XOPEN_VERSION	
       
  3897 
       
  3898 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3899 
       
  3900 @publishedAll
       
  3901 @externallyDefinedApi
       
  3902 */
       
  3903 
       
  3904 /** @def _SC_XOPEN_XCU_VERSION	
       
  3905 
       
  3906 POSIX-style system configuration variable accessors (for the sysconf function).
       
  3907 
       
  3908 @publishedAll
       
  3909 @externallyDefinedApi
       
  3910 */
       
  3911 
       
  3912 /** @def _CS_PATH
       
  3913 
       
  3914 Keys for the confstr(3) function.
       
  3915 
       
  3916 @publishedAll
       
  3917 @externallyDefinedApi
       
  3918 */
       
  3919 
       
  3920 /** @def _CS_POSIX_V6_ILP32_OFF32_CFLAGS		
       
  3921 
       
  3922 Keys for the confstr(3) function.
       
  3923 
       
  3924 @publishedAll
       
  3925 @externallyDefinedApi
       
  3926 */
       
  3927 
       
  3928 /** @def _CS_POSIX_V6_ILP32_OFF32_LDFLAGS	
       
  3929 
       
  3930 Keys for the confstr(3) function.
       
  3931 
       
  3932 @publishedAll
       
  3933 @externallyDefinedApi
       
  3934 */
       
  3935 
       
  3936 /** @def _CS_POSIX_V6_ILP32_OFF32_LIBS		
       
  3937 
       
  3938 Keys for the confstr(3) function.
       
  3939 
       
  3940 @publishedAll
       
  3941 @externallyDefinedApi
       
  3942 */
       
  3943 
       
  3944 /** @def _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS	
       
  3945 
       
  3946 Keys for the confstr(3) function.
       
  3947 
       
  3948 @publishedAll
       
  3949 @externallyDefinedApi
       
  3950 */
       
  3951 
       
  3952 /** @def _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS	
       
  3953 
       
  3954 Keys for the confstr(3) function.
       
  3955 
       
  3956 @publishedAll
       
  3957 @externallyDefinedApi
       
  3958 */
       
  3959 
       
  3960 /** @def _CS_POSIX_V6_LP64_OFF64_CFLAGS		
       
  3961 
       
  3962 Keys for the confstr(3) function.
       
  3963 
       
  3964 @publishedAll
       
  3965 @externallyDefinedApi
       
  3966 */
       
  3967 
       
  3968 /** @def _CS_POSIX_V6_LP64_OFF64_CFLAGS		
       
  3969 
       
  3970 Keys for the confstr(3) function.
       
  3971 
       
  3972 @publishedAll
       
  3973 @externallyDefinedApi
       
  3974 */
       
  3975 
       
  3976 /** @def _CS_POSIX_V6_LP64_OFF64_LDFLAGS		
       
  3977 
       
  3978 Keys for the confstr(3) function.
       
  3979 
       
  3980 @publishedAll
       
  3981 @externallyDefinedApi
       
  3982 */
       
  3983 
       
  3984 /** @def _CS_POSIX_V6_LP64_OFF64_LIBS		
       
  3985 
       
  3986 Keys for the confstr(3) function.
       
  3987 
       
  3988 @publishedAll
       
  3989 @externallyDefinedApi
       
  3990 */
       
  3991 
       
  3992 /** @def _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS	
       
  3993 
       
  3994 Keys for the confstr(3) function.
       
  3995 
       
  3996 @publishedAll
       
  3997 @externallyDefinedApi
       
  3998 */
       
  3999 
       
  4000 /** @def optopt
       
  4001 
       
  4002 character checked for validity
       
  4003 
       
  4004 @publishedAll
       
  4005 @externallyDefinedApi
       
  4006 */
       
  4007 
       
  4008 /** @def opterr
       
  4009 
       
  4010 if error message should be printed
       
  4011 
       
  4012 @publishedAll
       
  4013 @externallyDefinedApi
       
  4014 */
       
  4015 
       
  4016 /** @def optind
       
  4017 
       
  4018 index into parent argv vector
       
  4019 
       
  4020 @publishedAll
       
  4021 @externallyDefinedApi
       
  4022 */
       
  4023 
       
  4024 /** @def optarg
       
  4025 
       
  4026 argument associated with option
       
  4027 
       
  4028 @publishedAll
       
  4029 @externallyDefinedApi
       
  4030 */
       
  4031 
       
  4032 /** @def optreset
       
  4033 
       
  4034 reset getopt
       
  4035 
       
  4036 @publishedAll
       
  4037 @externallyDefinedApi
       
  4038 */
       
  4039 
       
  4040 /** @typedef typedef __off_t off_t
       
  4041 
       
  4042 Used for file sizes.
       
  4043 
       
  4044 @publishedAll
       
  4045 @externallyDefinedApi
       
  4046 */
       
  4047 
       
  4048 /** @typedef typedef __gid_t gid_t
       
  4049 
       
  4050 Used for group IDs.
       
  4051 
       
  4052 @publishedAll
       
  4053 @externallyDefinedApi
       
  4054 */
       
  4055 
       
  4056 /** @typedef typedef __pid_t pid_t
       
  4057 
       
  4058 Used for process IDs and process group IDs.
       
  4059 
       
  4060 @publishedAll
       
  4061 @externallyDefinedApi
       
  4062 */
       
  4063 
       
  4064 /** @typedef typedef __size_t	size_t	
       
  4065 
       
  4066 Used for sizes of objects.
       
  4067 
       
  4068 @publishedAll
       
  4069 @externallyDefinedApi
       
  4070 */
       
  4071 
       
  4072 /** @typedef typedef __uid_t	 uid_t
       
  4073 
       
  4074 Used for user IDs.
       
  4075 
       
  4076 @publishedAll
       
  4077 @externallyDefinedApi
       
  4078 */
       
  4079 
       
  4080 /** @typedef typedef __useconds_t  useconds_t	
       
  4081 
       
  4082 Used for time in microseconds.
       
  4083 
       
  4084 @publishedAll
       
  4085 @externallyDefinedApi
       
  4086 */
       
  4087 
       
  4088 
       
  4089 
       
  4090 
       
  4091