Replacing a bogus file with a semi-bogus one (sharing through devo).
[deliverable/binutils-gdb.git] / gdb / sol-thread.c
index 58b0814d7e7907a21cf02db9b77e25a5fe255816..ca20bdef8880eb801b759329e16bb8041ffc0c8d 100644 (file)
@@ -956,28 +956,34 @@ sol_thread_stop ()
 /* These routines implement the lower half of the thread_db interface.  Ie: the
    ps_* routines.  */
 
-/* Old versions of proc_service.h (1.3 94/10/27) have
-   prototypes that look like
-     (const struct ps_prochandle *, ...)
-   while newer versions use
-     (struct ps_prochandle *, ...)
-   and other such minor variations.
-
-   Someday, we might need to discover this in configure.in,
-   but the #ifdef below seems to be sufficient for now. */
-
-#ifdef PS_OBJ_EXEC
-typedef struct ps_prochandle* gdb_ps_prochandle_t;
-typedef void* gdb_ps_read_buf_t;
-typedef const void* gdb_ps_write_buf_t;
-typedef size_t gdb_ps_size_t;
-#else
-typedef const struct ps_prochandle* gdb_ps_prochandle_t;
-typedef char* gdb_ps_read_buf_t;
-typedef char* gdb_ps_write_buf_t;
+/* Various versions of <proc_service.h> have slightly
+   different function prototypes.  In particular, we have
+
+      NEWER                    OLDER
+      struct ps_prochandle *   const struct ps_prochandle *
+      void*                    char*
+      const void*              char*
+      int                      size_t
+
+   Which one you have depends on solaris version and what
+   patches you've applied.  On the theory that there are
+   only two major variants, we have configure check the
+   prototype of ps_pdwrite (), and use that info to make
+   appropriate typedefs here. */
+
+#ifdef PROC_SERVICE_IS_OLD
+typedef const struct ps_prochandle * gdb_ps_prochandle_t;
+typedef char * gdb_ps_read_buf_t;
+typedef char * gdb_ps_write_buf_t;
 typedef int gdb_ps_size_t;
+#else
+typedef struct ps_prochandle * gdb_ps_prochandle_t;
+typedef void * gdb_ps_read_buf_t;
+typedef const void * gdb_ps_write_buf_t;
+typedef size_t gdb_ps_size_t;
 #endif
 
+
 /* The next four routines are called by thread_db to tell us to stop and stop
    a particular process or lwp.  Since GDB ensures that these are all stopped
    by the time we call anything in thread_db, these routines need to do
This page took 0.024912 seconds and 4 git commands to generate.