aixv41Headers.h

Go to the documentation of this file.
00001 /*
00002  * See the dyninst/COPYRIGHT file for copyright information.
00003  * 
00004  * We provide the Paradyn Tools (below described as "Paradyn")
00005  * on an AS IS basis, and do not warrant its validity or performance.
00006  * We reserve the right to update, modify, or discontinue this
00007  * software at any time.  We shall have no obligation to supply such
00008  * updates or modifications or any other form of support to you.
00009  * 
00010  * By your use of Paradyn, you understand and agree that we (or any
00011  * other person or entity with proprietary rights in Paradyn) are
00012  * under no obligation to provide either maintenance services,
00013  * update services, notices of latent defects, or correction of
00014  * defects for Paradyn.
00015  * 
00016  * This library is free software; you can redistribute it and/or
00017  * modify it under the terms of the GNU Lesser General Public
00018  * License as published by the Free Software Foundation; either
00019  * version 2.1 of the License, or (at your option) any later version.
00020  * 
00021  * This library is distributed in the hope that it will be useful,
00022  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00023  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00024  * Lesser General Public License for more details.
00025  * 
00026  * You should have received a copy of the GNU Lesser General Public
00027  * License along with this library; if not, write to the Free Software
00028  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00029  */
00030 
00031 #if !defined(_aix_headers_h)
00032 #define _aix_headers_h
00033 
00034 typedef int crid_t;
00035 typedef unsigned int class_id_t;
00036 
00037 #if USE_PTHREADS
00038 #include <pthread.h>
00039 #endif
00040 
00041 #if defined(__cplusplus)
00042 extern "C" {
00043 #endif /* defined(__cplusplus) */
00044 #include <sys/types.h>
00045 
00046 #include <assert.h>
00047 #include <stdio.h>
00048 #include <string.h>
00049 #include <strings.h>
00050 #include <errno.h>
00051 #include <assert.h>
00052 #include <fcntl.h>
00053 #include <memory.h>
00054 #include <netinet/in.h>
00055 #include <netdb.h>
00056   //#include <sys/types.h>
00057 #include <sys/mman.h>
00058 #include <sys/time.h>
00059 #include <unistd.h>
00060 #include <sys/file.h>
00061 #include <sys/socket.h>
00062 #include <rpc/types.h>
00063 #include <rpc/xdr.h>
00064 #include <sys/errno.h>
00065 #include <sys/wait.h>
00066 #include <signal.h>
00067 #include <sys/reg.h>
00068 #include <sys/ptrace.h>
00069 #include <sys/ldr.h>
00070 #include <sys/resource.h>
00071 #include <stdarg.h>
00072 #include <stdlib.h>
00073 #include <sys/utsname.h>
00074 #include <sys/select.h>
00075 #include <procinfo.h>
00076 #include <sys/un.h>
00077 
00078 extern int fork();
00079 extern int vfork();
00080 
00081   typedef int (*P_xdrproc_t)(XDR*, ...);
00082 
00083 #if defined(__cplusplus)
00084 };
00085 #endif /* defined(__cplusplus) */
00086 
00087 #define PDSOCKET_ERROR (-1)
00088 typedef int PDSOCKET;
00089 extern char *sys_errlist[];
00090 
00091 /* POSIX */
00092 extern int P_getopt(int argc, char *argv[], const char *optstring);
00093 extern void P_abort (void);
00094 extern int P_close (int FILEDES);
00095 extern int P_dup2 (int OLD, int NEW);
00096 extern int P_execvp (const char *FILENAME, char *const ARGV[]);
00097 extern int P_execve (const char* FILENAME,
00098              char* const ARGV[], char* const ENVP[]);
00099 extern void P__exit (int STATUS);
00100 extern int P_fcntl (int FILEDES, int command, int arg2);
00101 extern FILE * P_fdopen (int FILEDES, const char *OPENTYPE);
00102 extern FILE * P_fopen (const char *FILENAME, const char *OPENTYPE);
00103 extern int P_fstat (int FILEDES, struct stat *BUF);
00104 extern pid_t P_getpid (void);
00105 extern int P_kill(pid_t PID, int SIGNUM);
00106 extern off_t P_lseek (int FILEDES, off_t OFFSET, int WHENCE);
00107 extern int P_pclose (FILE *STREAM);
00108 extern FILE * P_popen (const char *COMMAND, const char *MODE);
00109 extern int P_open(const char *FILENAME, int FLAGS, mode_t MODE);
00110 extern size_t P_read (int FILEDES, void *BUFFER, size_t SIZE);
00111 extern int P_uname(struct utsname *unm);
00112 extern pid_t P_wait(int *status_ptr);
00113 extern int P_waitpid(pid_t pid, int *statusp, int options);
00114 extern size_t P_write (int FILEDES, const void *BUFFER, size_t SIZE);
00115 inline int P_chdir(const char *path) {return (chdir(path)); }
00116 inline int P_putenv(char *str) {return (putenv(str)); }
00117 
00118 /* SYSTEM-V shared memory */
00119 #include <sys/ipc.h>
00120 #include <sys/shm.h> /* shmid_ds */
00121 extern int P_shmget(key_t, int, int);
00122 extern void *P_shmat(int, void *, int);
00123 extern int P_shmdt(void *);
00124 extern int P_shmctl(int, int, struct shmid_ds *);
00125 
00126 /* ANSI */
00127 extern void P_exit (int STATUS);
00128 extern int P_fflush(FILE *stream);
00129 extern char * P_fgets (char *S, int P_COUNT, FILE *STREAM);
00130 extern void * P_malloc (size_t SIZE);
00131 extern void * P_memcpy (void *A1, const void *A2, size_t SIZE);
00132 extern void * P_memset (void *BLOCK, int P_C, unsigned SIZE);
00133 extern void P_perror (const char *MESSAGE);
00134 typedef void (*P_sig_handler)(int);
00135 extern P_sig_handler P_signal(int SIGNUM, P_sig_handler ACTION);
00136 extern char * P_strcat (char *TO, const char *FROM);
00137 extern char * P_strchr (const char *P_STRING, int P_C);
00138 extern int P_strcmp (const char *S1, const char *S2);
00139 extern char * P_strcpy (char *TO, const char *FROM);
00140 extern char *P_strdup(const char *S);
00141 extern size_t P_strlen (const char *S);
00142 extern char * P_strncat (char *TO, const char *FROM, size_t SIZE);
00143 extern int P_strncmp (const char *S1, const char *S2, size_t SIZE);
00144 extern char * P_strncpy (char *TO, const char *FROM, size_t SIZE);
00145 extern char * P_strrchr (const char *P_STRING, int P_C);
00146 extern char * P_strstr (const char *HAYSTACK, const char *NEEDLE);
00147 extern double P_strtod (const char *P_STRING, char **TAILPTR);
00148 extern char * P_strtok (char *NEWP_STRING, const char *DELIMITERS);
00149 extern long int P_strtol (const char *P_STRING, char **TAILPTR, int BASE);
00150 extern unsigned long int P_strtoul(const char *P_STRING, char **TAILPTR, int BASE);
00151 
00152 /* BSD */
00153 extern int P_accept (int SOCK, struct sockaddr *ADDR, socklen_t *LENGTH_PTR);
00154 extern int P_bind(int socket, struct sockaddr *addr, socklen_t len);
00155 extern int P_connect(int socket, struct sockaddr *addr, socklen_t len);
00156 extern struct hostent * P_gethostbyname (const char *NAME);
00157 /* extern int P_gethostname(char *name, size_t size); */
00158 /* extern int P_getrusage(int, struct rusage*); */
00159 extern struct servent * P_getservbyname (const char *NAME, const char *PROTO);
00160 extern int P_getsockname (int SOCKET, struct sockaddr *ADDR, socklen_t *LENGTH_PTR);
00161 /* extern int P_gettimeofday (struct timeval *TP, struct timezone *TZP); */
00162 extern int P_listen (int socket, unsigned int n);
00163 caddr_t P_mmap(caddr_t addr, size_t len, int prot, int flags, int fd, off_t off);
00164 extern int P_munmap(caddr_t, int);
00165 extern int P_socket (int NAMESPACE, int STYLE, int PROTOCOL);
00166 extern int P_socketpair(int namesp, int style, int protocol, int filedes[2]);
00167 extern int P_pipe(int fd[2]);
00168 extern int P_strcasecmp(const char *s1, const char *s2);
00169 extern int P_strncasecmp (const char *S1, const char *S2, size_t N);
00170 extern void P_endservent(void);
00171 inline int P_getpagesize() { return getpagesize(); }
00172 
00173 inline int P_ptrace(int req, pid_t pid, Address addr, Address data, Address addr2)
00174 #if defined(rs6000_ibm_aix64)
00175   { return(ptrace64(req, pid, addr, data, reinterpret_cast<int *>(addr2)));}
00176 #else
00177   { return(ptrace(req, pid, (int *)addr, data, (int *)addr2));}
00178 #endif
00179 
00180 inline int P_mkdir(const char *pathname, mode_t mode) {
00181     return mkdir(pathname, mode);
00182 }
00183 
00184 inline int P_unlink(const char *pathname) {
00185     return unlink(pathname);
00186 }
00187 
00188 extern int P_rexec(char **ahost, u_short inport, char *user, char *passwd, char *cmd, int *fd2p);
00189 
00190 extern int P_select(int wid, fd_set *rd, fd_set *wr, fd_set *ex, struct timeval *tm);
00191 
00192 extern int P_recv(int s, void *buf, size_t len, int flags);
00193 
00194 extern char * P_cplus_demangle( const char * symbol, bool nativeCompiler, bool includeTypes = false );
00195 
00196 extern void   P_xdr_destroy(XDR*);
00197 extern bool_t P_xdr_u_char(XDR*, u_char*);
00198 extern bool_t P_xdr_int(XDR*, int*);
00199 extern bool_t P_xdr_double(XDR*, double*);
00200 extern bool_t P_xdr_u_int(XDR*, u_int*);
00201 extern bool_t P_xdr_float(XDR*, float*);
00202 extern bool_t P_xdr_char(XDR*, char*);
00203 extern bool_t P_xdr_string(XDR*, char **, const u_int maxsize);
00204 extern void P_xdrrec_create(XDR*, const u_int send_sz, const u_int rec_sz,
00205                 const caddr_t handle, 
00206                 xdr_rd_func read_r, xdr_wr_func write_f);
00207 extern bool_t P_xdrrec_endofrecord(XDR*, int now);
00208 extern bool_t P_xdrrec_skiprecord(XDR*);
00209 inline bool_t P_xdrrec_eof(XDR *x) { return (xdrrec_eof(x)); }
00210 
00211 
00212 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 12 Jul 2013 for SymtabAPI by  doxygen 1.6.1