summaryrefslogtreecommitdiff
path: root/include/time.h
diff options
context:
space:
mode:
authorAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-06-26 18:35:14 +0000
committerAnil Madhavapeddy <avsm@cvs.openbsd.org>2003-06-26 18:35:14 +0000
commit8266dbf611a37e02c83c4da428f21a7d8c5bf801 (patch)
treeceefafa5cbc273538b74376d0e081cd83be48b84 /include/time.h
parent4f22ff20604dd441c644e14195a64eade733296f (diff)
Mark various standard library functions with the __bounded__ attribute.
You must have an up-to-date gcc for this! deraadt@ ok
Diffstat (limited to 'include/time.h')
-rw-r--r--include/time.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/time.h b/include/time.h
index dbe0652e084..db530102cd4 100644
--- a/include/time.h
+++ b/include/time.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.h,v 1.13 2003/06/02 19:34:12 millert Exp $ */
+/* $OpenBSD: time.h,v 1.14 2003/06/26 18:35:13 avsm Exp $ */
/* $NetBSD: time.h,v 1.9 1994/10/26 00:56:35 cgd Exp $ */
/*
@@ -93,11 +93,14 @@ double difftime(time_t, time_t);
struct tm *gmtime(const time_t *);
struct tm *localtime(const time_t *);
time_t mktime(struct tm *);
-size_t strftime(char *, size_t, const char *, const struct tm *);
+size_t strftime(char *, size_t, const char *, const struct tm *)
+ __attribute__ ((__bounded__(__string__,1,2)));
char *strptime(const char *, const char *, struct tm *);
time_t time(time_t *);
-char *asctime_r(const struct tm *, char *);
-char *ctime_r(const time_t *, char *);
+char *asctime_r(const struct tm *, char *)
+ __attribute__ ((__bounded__(__minbytes__,2,26)));
+char *ctime_r(const time_t *, char *)
+ __attribute__ ((__bounded__(__minbytes__,2,26)));
struct tm *gmtime_r(const time_t *, struct tm *);
struct tm *localtime_r(const time_t *, struct tm *);
int nanosleep(const struct timespec *, struct timespec *);