diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-03-14 00:56:48 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-03-14 00:56:48 +0000 |
commit | 17164de4f8d7409c65bcc9c060df824f49dc4629 (patch) | |
tree | 4c1fd5011e287acfee4fd1f3326d29671b63f937 /libgfortran/intrinsics | |
parent | 10f499af34794b5b4c400c2f5d2cb05bd524b0ff (diff) | |
download | gcc-17164de4f8d7409c65bcc9c060df824f49dc4629.zip gcc-17164de4f8d7409c65bcc9c060df824f49dc4629.tar.gz gcc-17164de4f8d7409c65bcc9c060df824f49dc4629.tar.bz2 |
check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
* check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
* intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
(add_subroutines): Remove reference to gfc_resolve_kill_sub.
* intrinsic.texi: Update documentation.
* iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
* trans-decl.c (gfc_build_intrinsic_function_decls): Add
gfor_fndecl_kill and gfor_fndecl_kill_sub
* trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
functions.
(gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
(gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
* trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
* libgfortran/gfortran.map: Remove _gfortran_kill_i4,
_gfortran_kill_i4_sub, _gfortran_kill_i8, and _gfortran_kill_i8_sub.
Add _gfortran_kill and _gfortran_kill_sub.
* libgfortran/intrinsics/kill.c: Eliminate _gfortran_kill_i4,
_gfortran_kill_i4_sub, _gfortran_kill_i8, and _gfortran_kill_i8_sub.
Add _gfortran_kill and _gfortran_kill_sub.
From-SVN: r258511
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r-- | libgfortran/intrinsics/kill.c | 51 |
1 files changed, 12 insertions, 39 deletions
diff --git a/libgfortran/intrinsics/kill.c b/libgfortran/intrinsics/kill.c index 113eedb..3b062b3 100644 --- a/libgfortran/intrinsics/kill.c +++ b/libgfortran/intrinsics/kill.c @@ -32,61 +32,34 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see INTEGER, INTENT(IN) :: PID, SIGNAL INTEGER(KIND=1), INTENT(OUT), OPTIONAL :: STATUS - INTEGER(KIND=1) FUNCTION KILL(PID, SIGNAL) + INTEGER FUNCTION KILL(PID, SIGNAL) INTEGER, INTENT(IN) :: PID, SIGNAL */ #ifdef HAVE_KILL -extern void kill_i4_sub (GFC_INTEGER_4 *, GFC_INTEGER_4 *, GFC_INTEGER_4 *); -iexport_proto(kill_i4_sub); +extern void kill_sub (GFC_INTEGER_4, GFC_INTEGER_4, GFC_INTEGER_4 *); +iexport_proto(kill_sub); void -kill_i4_sub (GFC_INTEGER_4 *pid, GFC_INTEGER_4 *signal, - GFC_INTEGER_4 *status) +kill_sub (GFC_INTEGER_4 pid, GFC_INTEGER_4 signal, GFC_INTEGER_4 *status) { int val; - val = kill (*pid, *signal); + val = kill (pid, signal); if (status != NULL) *status = (val == 0) ? 0 : errno; } -iexport(kill_i4_sub); +iexport(kill_sub); -extern void kill_i8_sub (GFC_INTEGER_8 *, GFC_INTEGER_8 *, GFC_INTEGER_8 *); -iexport_proto(kill_i8_sub); - -void -kill_i8_sub (GFC_INTEGER_8 *pid, GFC_INTEGER_8 *signal, - GFC_INTEGER_8 *status) -{ - int val; - - val = kill (*pid, *signal); - - if (status != NULL) - *status = (val == 0) ? 0 : errno; -} -iexport(kill_i8_sub); - -extern GFC_INTEGER_4 kill_i4 (GFC_INTEGER_4 *, GFC_INTEGER_4 *); -export_proto(kill_i4); +extern GFC_INTEGER_4 kill (GFC_INTEGER_4, GFC_INTEGER_4); +export_proto(kill); GFC_INTEGER_4 -kill_i4 (GFC_INTEGER_4 *pid, GFC_INTEGER_4 *signal) +kill (GFC_INTEGER_4 pid, GFC_INTEGER_4 signal) { - GFC_INTEGER_4 val; - kill_i4_sub (pid, signal, &val); - return val; + int val; + val = (int)kill (pid, signal); + return ((val == 0) ? 0 : errno); } -extern GFC_INTEGER_8 kill_i8 (GFC_INTEGER_8 *, GFC_INTEGER_8 *); -export_proto(kill_i8); - -GFC_INTEGER_8 -kill_i8 (GFC_INTEGER_8 *pid, GFC_INTEGER_8 *signal) -{ - GFC_INTEGER_8 val; - kill_i8_sub (pid, signal, &val); - return val; -} #endif |