syscall: Don't build wait status functions on RTEMS.

From-SVN: r182313
This commit is contained in:
Ian Lance Taylor 2011-12-13 22:07:25 +00:00
parent 4ad9a9de2d
commit de05aad683
3 changed files with 33 additions and 7 deletions

View File

@ -1450,11 +1450,22 @@ syscall_exec_file = go/syscall/exec_unix.go
endif
# Define Wait4.
if LIBGO_IS_RTEMS
syscall_wait_file =
else
if HAVE_WAIT4
syscall_wait_file = go/syscall/libcall_wait4.go
else
syscall_wait_file = go/syscall/libcall_waitpid.go
endif
endif
# Support for pulling apart wait status.
if LIBGO_IS_RTEMS
syscall_wait_c_file =
else
syscall_wait_c_file = go/syscall/wait.c
endif
# Define Sleep.
if LIBGO_IS_RTEMS
@ -1564,7 +1575,7 @@ go_syscall_files = \
syscall_arch.go
go_syscall_c_files = \
go/syscall/errno.c \
go/syscall/wait.c
$(syscall_wait_c_file)
libcalls.go: s-libcalls; @true
s-libcalls: Makefile go/syscall/mksyscall.awk $(go_base_syscall_files)

View File

@ -1837,10 +1837,15 @@ go_unicode_utf8_files = \
# Define ForkExec and Exec.
@LIBGO_IS_RTEMS_TRUE@syscall_exec_file = go/syscall/exec_stubs.go
@HAVE_WAIT4_FALSE@syscall_wait_file = go/syscall/libcall_waitpid.go
@HAVE_WAIT4_FALSE@@LIBGO_IS_RTEMS_FALSE@syscall_wait_file = go/syscall/libcall_waitpid.go
@HAVE_WAIT4_TRUE@@LIBGO_IS_RTEMS_FALSE@syscall_wait_file = go/syscall/libcall_wait4.go
# Define Wait4.
@HAVE_WAIT4_TRUE@syscall_wait_file = go/syscall/libcall_wait4.go
@LIBGO_IS_RTEMS_TRUE@syscall_wait_file =
@LIBGO_IS_RTEMS_FALSE@syscall_wait_c_file = go/syscall/wait.c
# Support for pulling apart wait status.
@LIBGO_IS_RTEMS_TRUE@syscall_wait_c_file =
@LIBGO_IS_RTEMS_FALSE@syscall_sleep_file = go/syscall/sleep_select.go
# Define Sleep.
@ -1908,7 +1913,7 @@ go_syscall_files = \
go_syscall_c_files = \
go/syscall/errno.c \
go/syscall/wait.c
$(syscall_wait_c_file)
@LIBGO_IS_LINUX_FALSE@os_lib_inotify_lo =

View File

@ -7,17 +7,27 @@
package syscall
func ForkExec(argv0 string, argv []string, envv []string, dir string, fd []int) (pid int, err int) {
return -1, ENOSYS;
return -1, ENOSYS
}
func Exec(argv0 string, argv []string, envv []string) (err int) {
return ENOSYS;
return ENOSYS
}
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
return -1, ENOSYS;
return -1, ENOSYS
}
func (w WaitStatus) Exited() bool { return false }
func (w WaitStatus) Signaled() bool { return false }
func (w WaitStatus) Stopped() bool { return false }
func (w WaitStatus) Continued() bool { return false }
func (w WaitStatus) CoreDump() bool { return false }
func (w WaitStatus) ExitStatus() int { return 0 }
func (w WaitStatus) Signal() int { return 0 }
func (w WaitStatus) StopSignal() int { return 0 }
func (w WaitStatus) TrapCause() int { return 0 }
func raw_ptrace(request int, pid int, addr *byte, data *byte) Errno {
return ENOSYS
}