home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / v21 / 022 / text0000.txt < prev   
Encoding:
Text File  |  1990-12-05  |  1.0 KB  |  29 lines

  1. Submitted-From: mindcrf!karish@ucbvax.Berkeley.EDU
  2. From:  karish@mindcraft.com
  3.  
  4. In article <10980@cs.utexas.edu> guy@auspex.uucp (Guy Harris) writes:
  5. |Unfortunately, the application is non-functional (at least not
  6. |*correctly* functional) if it *doesn't* initialize the vendor-defined
  7. |fields of a structure that's handed to the system ...
  8.  
  9. |... a
  10. |portable application can, at best, only avoid setting the microseconds
  11. |values of a file's accessed or modified times to some random value by
  12. |"memset"ting the entire "utimbuf" structure to zero before filling it in
  13. |and using it (or otherwise ensuring that the structure is zero before
  14. |using it, e.g. using a static structure).
  15.  
  16. Keeping in mind, of course, that memset() may not be present on a POSIX
  17. system that provides common-usage C language-dependent support.
  18.  
  19. Another ugly way to initialize the storage would be to make liberal use
  20. of calloc() and free().
  21. -- 
  22.  
  23.     Chuck Karish        karish@mindcraft.com
  24.     Mindcraft, Inc.        (415) 323-9000        
  25.  
  26.  
  27. Volume-Number: Volume 21, Number 22
  28.  
  29.