source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mdocml: sync to OpenBSD
@ 2014-12-11  9:05 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-12-11  9:05 UTC (permalink / raw)
  To: source

Log Message:
-----------
sync to OpenBSD

Modified Files:
--------------
    mdocml:
        compat_fts.c
        compat_reallocarray.c
        compat_strsep.c

Revision Data
-------------
Index: compat_reallocarray.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/compat_reallocarray.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lcompat_reallocarray.c -Lcompat_reallocarray.c -u -p -r1.3 -r1.4
--- compat_reallocarray.c
+++ compat_reallocarray.c
@@ -6,7 +6,8 @@ int dummy;
 
 #else
 
-/*	$OpenBSD: malloc.c,v 1.158 2014/04/23 15:07:27 tedu Exp $	*/
+/*	$Id$	*/
+/*	$OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $	*/
 /*
  * Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
  *
@@ -22,12 +23,17 @@ int dummy;
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
+
 #include <sys/types.h>
 #include <errno.h>
 #include <stdint.h>
 #include <stdlib.h>
 
-#define MUL_NO_OVERFLOW (1UL << (sizeof(size_t) * 4))
+/*
+ * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX
+ * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW
+ */
+#define MUL_NO_OVERFLOW	((size_t)1 << (sizeof(size_t) * 4))
 
 void *
 reallocarray(void *optr, size_t nmemb, size_t size)
Index: compat_strsep.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/compat_strsep.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lcompat_strsep.c -Lcompat_strsep.c -u -p -r1.3 -r1.4
--- compat_strsep.c
+++ compat_strsep.c
@@ -6,7 +6,8 @@ int dummy;
 
 #else
 
-/*	($)OpenBSD: strsep.c,v 1.6 2005/08/08 08:05:37 espie Exp $	*/
+/*	$Id$	*/
+/*	$OpenBSD: strsep.c,v 1.7 2014/02/05 20:42:32 stsp Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
Index: compat_fts.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/compat_fts.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -Lcompat_fts.c -Lcompat_fts.c -u -p -r1.4 -r1.5
--- compat_fts.c
+++ compat_fts.c
@@ -7,7 +7,7 @@ int dummy;
 #else
 
 /*	$Id$	*/
-/*	$OpenBSD: fts.c,v 1.46 2014/05/25 17:47:04 tedu Exp $	*/
+/*	$OpenBSD: fts.c,v 1.49 2014/11/23 00:14:22 guenther Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993, 1994
@@ -146,7 +146,8 @@ fts_open(char * const *argv, int options
 	 * and ".." are all fairly nasty problems.  Note, if we can't get the
 	 * descriptor we run anyway, just more slowly.
 	 */
-	if (!ISSET(FTS_NOCHDIR) && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0)
+	if (!ISSET(FTS_NOCHDIR) &&
+	    (sp->fts_rfd = open(".", O_RDONLY | O_CLOEXEC)) < 0)
 		SET(FTS_NOCHDIR);
 
 	if (nitems == 0)
@@ -803,7 +804,7 @@ fts_safe_changedir(FTS *sp, FTSENT *p, i
 	newfd = fd;
 	if (ISSET(FTS_NOCHDIR))
 		return (0);
-	if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0)
+	if (fd < 0 && (newfd = open(path, O_RDONLY|O_DIRECTORY|O_CLOEXEC)) < 0)
 		return (-1);
 	if (fstat(newfd, &sb)) {
 		ret = -1;
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-12-11  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-11  9:05 mdocml: sync to OpenBSD schwarze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).