メインページ   クラス階層   構成   ファイル一覧   構成メンバ   ファイルメンバ  

syswait.h

解説を見る。
00001 /*
00002 
00003 Copyright (C) 1996, 1997 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 2, or (at your option) any
00010 later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, write to the Free
00019 Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 
00021 */
00022 
00023 #if !defined (octave_syswait_h)
00024 #define octave_syswait_h 1
00025 
00026 // This mess suggested by the autoconf manual.
00027 
00028 #ifdef HAVE_SYS_TYPES_H
00029 #include <sys/types.h>
00030 #endif
00031 
00032 #if defined (NeXT) && ! defined (_POSIX_SOURCE)
00033 #define HAVE_SYS_WAIT_H
00034 #endif
00035 
00036 #if defined HAVE_SYS_WAIT_H
00037 #include <sys/wait.h>
00038 #endif
00039 
00040 #if defined (NeXT)
00041 #define HAVE_WAITPID 1
00042 #define waitpid(a, b, c) \
00043   wait4 ((a) == -1 ? 0 : (a), (union wait *)(b), c, 0)
00044 
00045 // Use the defaults below
00046 #undef WIFEXITED
00047 #undef WEXITSTATUS
00048 #undef WIFSIGNALLED
00049 #endif
00050 
00051 // NeXT has sys/wait.h, but it is not compatible with POSIX.1, so we
00052 // try to define waitpid in terms of wait4.
00053 
00054 #if defined (NeXT)
00055 #include <sys/wait.h>
00056 #define waitpid(a, b, c) \
00057   wait4 ((a) == -1 ? 0 : (a), (union wait *)(b), c, 0)
00058 #endif
00059 
00060 #ifndef WIFEXITED
00061 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
00062 #endif
00063 
00064 #ifndef WEXITSTATUS
00065 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
00066 #endif
00067 
00068 #ifndef WIFSIGNALLED
00069 #define WIFSIGNALLED(stat_val) \
00070   (((stat_val) & 0177) != 0177 && ((stat_val) & 0177) != 0)
00071 #endif
00072 
00073 #endif
00074 
00075 /*
00076 ;;; Local Variables: ***
00077 ;;; mode: C++ ***
00078 ;;; End: ***
00079 */

Wed Dec 29 11:52:20 2004に生成されました。 doxygen1.2.18
SEO [PR] 爆速!無料ブログ 無料ホームページ開設 無料ライブ放送