]> Cypherpunks repositories - gostls13.git/commitdiff
lib9: make safe for automatic builds
authorRuss Cox <rsc@golang.org>
Wed, 1 Feb 2012 23:25:40 +0000 (18:25 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 1 Feb 2012 23:25:40 +0000 (18:25 -0500)
R=golang-dev, adg, bradfitz
CC=golang-dev
https://golang.org/cl/5615046

src/lib9/Makefile
src/lib9/await.c
src/lib9/fmt/errfmt.c [deleted file]
src/lib9/fork.c [deleted file]
src/lib9/getuser.c
src/lib9/jmp.c
src/lib9/notify.c
src/lib9/rfork.c
src/lib9/windows.c [moved from src/lib9/win32.c with 100% similarity]

index bf1bf41a15ed436c30c45c00b3736769d75a2a13..8667c8f35939c295c135dd4c0c56b31886427f97 100644 (file)
@@ -85,7 +85,7 @@ LIB9OFILES=\
 
 ifeq ($(GOHOSTOS),windows)
 LIB9OFILES+=\
-       win32.$O\
+       windows.$O\
 
 else
 LIB9OFILES+=\
index 90be598a1f919a446057bc7e10d9a996f25bcc44..0f00a94bd185a629436e643b8aed795f70f723ea 100644 (file)
@@ -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 (file)
index 66c9600..0000000
+++ /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 (file)
index 0dd79df..0000000
+++ /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;
-}
index f70b35c87127e329468ad8d867b96e01d1423dbc..d611f4467192ba233339f89cdaf380eb78403a0d 100644 (file)
@@ -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
index a606fb07b61f7c2c54f828477b03ed91ba38c5ae..c44e040d21bd5b68bfcc90607e126e246cd87ff6 100644 (file)
@@ -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
index 84999b8870b4f2c47271b5ae1672ee854af71f3d..c424aed54a89bbc51c21529b55b92b2f3ac692fc 100644 (file)
@@ -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
index c9d632189df137df1a2de1c88142671b810c3e92..5a6eaeb94ce02ad07f113657e0d489fcc6a9026f 100644 (file)
@@ -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
similarity index 100%
rename from src/lib9/win32.c
rename to src/lib9/windows.c