]> andersk Git - splint.git/commitdiff
Fixed localtime/gmtime null anntation.
authorevans1629 <evans1629>
Sun, 2 Nov 2003 21:06:39 +0000 (21:06 +0000)
committerevans1629 <evans1629>
Sun, 2 Nov 2003 21:06:39 +0000 (21:06 +0000)
lib/standard.h
src/cpplib.c
src/fileTable.c

index ee6185fc625a3fc018ba5e06659f26f01161ada7..7e2288b6102d69f5339a5f340c202e9f7e002c02 100644 (file)
@@ -1142,9 +1142,10 @@ time_t time (/*@null@*/ /*@out@*/ time_t *tp)
 /*@observer@*/ char *ctime (time_t *tp) /*@*/
      /*@ensures maxSet(result) == 25 /\  maxRead(result) == 25; @*/;
 
-/*@null@*/ /*@observer@*/ struct tm *gmtime (time_t *tp) /*@*/ ;
+/* 2003-11-01: remove null annotation: gmtima and localtime cannot return null */
+/*@observer@*/ struct tm *gmtime (time_t *tp) /*@*/ ;
 
-/*@null@*/ /*@observer@*/ struct tm *localtime (time_t *tp) 
+/*@observer@*/ struct tm *localtime (time_t *tp) 
   /*@modifies errno@*/ ;
 
 size_t strftime (/*@out@*/ char *s, size_t smax,
index fd8356f0f665ef586f20ada6f6d4d3bae7b745fd..5aff1e99c75028d74ffe01e561487b3d32750459 100644 (file)
@@ -70,7 +70,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 # include <fcntl.h>
 # if defined (WIN32) || defined (OS2) && defined (__IBMC__)
 # include <io.h>
+/* SMF */
+# ifndef BCC32
 # include <sys/utime.h>                /* for __DATE__ and __TIME__ */
+# endif
+
 # include <time.h>
 # else
 # ifndef VMS
@@ -356,6 +360,8 @@ static void cppReader_scanBuffer (cppReader *p_pfile);
 
 # if defined (WIN32) || defined (OS2) && defined (__IBMC__)
 
+/* SMF */
+# ifndef BCC32
 /*
 ** WIN32 (at least the VC++ include files) does not define mode_t.
 */
@@ -363,6 +369,7 @@ static void cppReader_scanBuffer (cppReader *p_pfile);
 /*@-incondefs@*/ /*@-czechtypes@*/
 typedef unsigned int mode_t;
 /*@=incondefs@*/ /*@=czechtypes@*/
+# endif
 
 # endif
 
index 01291f094d3f20860ca6da9f0aa047bed80ef9bb..0b23d1b7365f6d9534349539dfe61c951e87ceb3 100644 (file)
@@ -1014,7 +1014,7 @@ fileTable_addOpen (fileTable ft, /*@observer@*/ FILE *f, /*@only@*/ cstring fnam
 
 FILE *fileTable_createFile (fileTable ft, cstring fname)
 {
-# ifdef WIN32
+# if defined (WIN32) && !defined (BCC32)
   int fdesc = _open (cstring_toCharsSafe (fname), 
                     O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 
                     _S_IWRITE | S_IREAD);
@@ -1054,7 +1054,7 @@ FILE *fileTable_createFile (fileTable ft, cstring fname)
 
 FILE *fileTable_createMacrosFile (fileTable ft, cstring fname)
 {
-# ifdef WIN32
+# if defined (WIN32) && !defined (BCC32)
   int fdesc = _open (cstring_toCharsSafe (fname), 
                     O_RDWR | O_CREAT | O_TRUNC | O_EXCL,
                     _S_IREAD | _S_IWRITE);
This page took 0.107825 seconds and 5 git commands to generate.