Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 May 2016 18:32:57 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301066 - in head: include lib/libc/db/hash lib/libc/db/man
Message-ID:  <201605311832.u4VIWvLp042336@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Tue May 31 18:32:57 2016
New Revision: 301066
URL: https://svnweb.freebsd.org/changeset/base/301066

Log:
  Fix prototype of dbm_open().
  
  The last argument of dbm_open() should be a mode_t according to POSIX;
  not an int.
  
  Reviewed by:	pfg, kib
  Differential Revision:	https://reviews.freebsd.org/D6650

Modified:
  head/include/ndbm.h
  head/lib/libc/db/hash/ndbm.c
  head/lib/libc/db/man/dbm.3

Modified: head/include/ndbm.h
==============================================================================
--- head/include/ndbm.h	Tue May 31 18:31:17 2016	(r301065)
+++ head/include/ndbm.h	Tue May 31 18:32:57 2016	(r301066)
@@ -70,7 +70,7 @@ datum	 dbm_firstkey(DBM *);
 long	 dbm_forder(DBM *, datum);
 #endif
 datum	 dbm_nextkey(DBM *);
-DBM	*dbm_open(const char *, int, int);
+DBM	*dbm_open(const char *, int, mode_t);
 int	 dbm_store(DBM *, datum, datum, int);
 #if __BSD_VISIBLE
 int	 dbm_dirfno(DBM *);

Modified: head/lib/libc/db/hash/ndbm.c
==============================================================================
--- head/lib/libc/db/hash/ndbm.c	Tue May 31 18:31:17 2016	(r301065)
+++ head/lib/libc/db/hash/ndbm.c	Tue May 31 18:32:57 2016	(r301066)
@@ -56,7 +56,7 @@ __FBSDID("$FreeBSD$");
  *	 NULL on failure
  */
 extern DBM *
-dbm_open(const char *file, int flags, int mode)
+dbm_open(const char *file, int flags, mode_t mode)
 {
 	HASHINFO info;
 	char path[MAXPATHLEN];

Modified: head/lib/libc/db/man/dbm.3
==============================================================================
--- head/lib/libc/db/man/dbm.3	Tue May 31 18:31:17 2016	(r301065)
+++ head/lib/libc/db/man/dbm.3	Tue May 31 18:32:57 2016	(r301066)
@@ -34,7 +34,7 @@
 .In fcntl.h
 .In ndbm.h
 .Ft DBM *
-.Fn dbm_open "const char *base" "int flags" "int mode"
+.Fn dbm_open "const char *base" "int flags" "mode_t mode"
 .Ft void
 .Fn dbm_close "DBM *db"
 .Ft int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605311832.u4VIWvLp042336>