summaryrefslogtreecommitdiff
path: root/src/lib9
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2012-02-01 18:25:40 -0500
committerRuss Cox <rsc@golang.org>2012-02-01 18:25:40 -0500
commit461d0b484d348ef33979e1b023d9d09f9c9d3506 (patch)
tree74f33fd541581710b8364ed1593f37c923338d31 /src/lib9
parent8e7988882d809a23fd25ed408d170637580a289d (diff)
downloadgo-461d0b484d348ef33979e1b023d9d09f9c9d3506.tar.gz
lib9: make safe for automatic builds
R=golang-dev, adg, bradfitz CC=golang-dev http://codereview.appspot.com/5615046
Diffstat (limited to 'src/lib9')
-rw-r--r--src/lib9/Makefile2
-rw-r--r--src/lib9/await.c2
-rw-r--r--src/lib9/fmt/errfmt.c30
-rw-r--r--src/lib9/fork.c46
-rw-r--r--src/lib9/getuser.c2
-rw-r--r--src/lib9/jmp.c2
-rw-r--r--src/lib9/notify.c2
-rw-r--r--src/lib9/rfork.c2
-rw-r--r--src/lib9/windows.c (renamed from src/lib9/win32.c)0
9 files changed, 11 insertions, 77 deletions
diff --git a/src/lib9/Makefile b/src/lib9/Makefile
index bf1bf41a1..8667c8f35 100644
--- a/src/lib9/Makefile
+++ b/src/lib9/Makefile
@@ -85,7 +85,7 @@ LIB9OFILES=\
ifeq ($(GOHOSTOS),windows)
LIB9OFILES+=\
- win32.$O\
+ windows.$O\
else
LIB9OFILES+=\
diff --git a/src/lib9/await.c b/src/lib9/await.c
index 90be598a1..0f00a94bd 100644
--- a/src/lib9/await.c
+++ b/src/lib9/await.c
@@ -1,3 +1,5 @@
+// +build !windows
+
/*
Plan 9 from User Space src/lib9/await.c
http://code.swtch.com/plan9port/src/tip/src/lib9/await.c
diff --git a/src/lib9/fmt/errfmt.c b/src/lib9/fmt/errfmt.c
deleted file mode 100644
index 66c9600f0..000000000
--- a/src/lib9/fmt/errfmt.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * The authors of this software are Rob Pike and Ken Thompson,
- * with contributions from Mike Burrows and Sean Dorward.
- *
- * Copyright (c) 2002-2006 by Lucent Technologies.
- * Portions Copyright (c) 2004 Google Inc.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose without fee is hereby granted, provided that this entire notice
- * is included in all copies of any software which is or includes a copy
- * or modification of this software and in all copies of the supporting
- * documentation for such software.
- * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
- * WARRANTY. IN PARTICULAR, NEITHER THE AUTHORS NOR LUCENT TECHNOLOGIES
- * NOR GOOGLE INC MAKE ANY REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING
- * THE MERCHANTABILITY OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
- */
-
-#include <u.h>
-#include <libc.h>
-#include "fmtdef.h"
-
-int
-__errfmt(Fmt *f)
-{
- char *s;
-
- s = strerror(errno);
- return fmtstrcpy(f, s);
-}
diff --git a/src/lib9/fork.c b/src/lib9/fork.c
deleted file mode 100644
index 0dd79dfb8..000000000
--- a/src/lib9/fork.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-Plan 9 from User Space src/lib9/fork.c
-http://code.swtch.com/plan9port/src/tip/src/lib9/fork.c
-
-Copyright 2001-2007 Russ Cox. All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-*/
-#include <u.h>
-#include <signal.h>
-#include <libc.h>
-#include "9proc.h"
-#undef fork
-
-int
-p9fork(void)
-{
- int pid;
- sigset_t all, old;
-
- sigfillset(&all);
- sigprocmask(SIG_SETMASK, &all, &old);
- pid = fork();
- if(pid == 0){
- _clearuproc();
- _p9uproc(0);
- }
- sigprocmask(SIG_SETMASK, &old, nil);
- return pid;
-}
diff --git a/src/lib9/getuser.c b/src/lib9/getuser.c
index f70b35c87..d611f4467 100644
--- a/src/lib9/getuser.c
+++ b/src/lib9/getuser.c
@@ -1,3 +1,5 @@
+// +build !windows
+
/*
Plan 9 from User Space src/lib9/getuser.c
http://code.swtch.com/plan9port/src/tip/src/lib9/getuser.c
diff --git a/src/lib9/jmp.c b/src/lib9/jmp.c
index a606fb07b..c44e040d2 100644
--- a/src/lib9/jmp.c
+++ b/src/lib9/jmp.c
@@ -1,3 +1,5 @@
+// +build !windows
+
/*
Plan 9 from User Space src/lib9/jmp.c
http://code.swtch.com/plan9port/src/tip/src/lib9/jmp.c
diff --git a/src/lib9/notify.c b/src/lib9/notify.c
index 84999b887..c424aed54 100644
--- a/src/lib9/notify.c
+++ b/src/lib9/notify.c
@@ -1,3 +1,5 @@
+// +build !windows
+
/*
Plan 9 from User Space src/lib9/notify.c
http://code.swtch.com/plan9port/src/tip/src/lib9/notify.c
diff --git a/src/lib9/rfork.c b/src/lib9/rfork.c
index c9d632189..5a6eaeb94 100644
--- a/src/lib9/rfork.c
+++ b/src/lib9/rfork.c
@@ -1,3 +1,5 @@
+// +build !windows
+
/*
Plan 9 from User Space src/lib9/rfork.c
http://code.swtch.com/plan9port/src/tip/src/lib9/rfork.c
diff --git a/src/lib9/win32.c b/src/lib9/windows.c
index 90753bb8d..90753bb8d 100644
--- a/src/lib9/win32.c
+++ b/src/lib9/windows.c