From 8266dbf611a37e02c83c4da428f21a7d8c5bf801 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Thu, 26 Jun 2003 18:35:14 +0000 Subject: Mark various standard library functions with the __bounded__ attribute. You must have an up-to-date gcc for this! deraadt@ ok --- include/time.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'include/time.h') 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 *); -- cgit v1.2.3