This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdb 6.7.1 hppa64-hp-hpux11.11 "needs" _XOPEN_SOURCE_EXTENDED for various errors


Building gdb 6.7.1 for hppa64-hp-hpux11.11 (11iv1):
 

32bit already built and minimall works, good.
 

/src/gdb-6.7.1/gdb/ser-tcp.c: In function `net_open':
/src/gdb-6.7.1/gdb/ser-tcp.c:207: warning: passing arg 5 of `getsockopt' from in
compatible pointer type
gmake[2]: *** [ser-tcp.o] Error 1
 

-bash-3.2$ uname -a
HP-UX unknown B.11.11 U 9000/800 1595760578 unlimited-user license
 

CXX=g++64 CC=gcc64 /src/gdb-6.7.1/configure -disable-nls -prefix=/usr/local/64
 
 
-bash-3.2$ gcc64 -v (bootstrapped through bundled K&R cc and gcc 3.3.6..) 
Reading specs from /usr/local/64/lib/gcc/hppa64-hp-hpux11.11/3.4.6/specs
Configured with: /src/gcc-3.4.6/configure -disable-bootstrap -disable-nls -verbo
se -prefix=/usr/local/64 -with-as=/usr/local/64/bin/gas -with-gnu-as
Thread model: single
gcc version 3.4.6
 

-bash-3.2$ g++64 -v  (bootstrapped through bundled K&R cc and gcc 3.3.6..) 
Reading specs from /usr/local/64/lib/gcc/hppa64-hp-hpux11.11/3.4.6/specs
Configured with: /src/gcc-3.4.6/configure -disable-bootstrap -disable-nls -verbo
se -prefix=/usr/local/64 -with-as=/usr/local/64/bin/gas -with-gnu-as
Thread model: single
gcc version 3.4.6
-bash-3.2$
 

I'm still working on getting these to 4.3.3.
 
 
/usr/include/sys/socket.h ROUGHLY reads:
 

#if defined(_XOPEN_SOURCE_EXTENDED)
 
 
/* what you expect */
extern int getsockopt (... socklen_t*);
 
 
#else
 
 
/* not what you expect, but good enough for 32bit */
extern int getsockopt (... int *);
 
 
#endif
 

-bash-3.2$ gdiff -c4 /src/gdb-6.7.1/gdb/ser-tcp.c.orig /src/gdb-6.7.1/gdb/ser-tcp.c
*** /src/gdb-6.7.1/gdb/ser-tcp.c.orig   Sun Feb 22 21:13:35 2009
--- /src/gdb-6.7.1/gdb/ser-tcp.c        Sun Feb 22 21:14:00 2009
***************
*** 17,24 ****
--- 17,25 ----
     You should have received a copy of the GNU General Public License
     along with this program.  If not, see .  */
+ #define _XOPEN_SOURCE_EXTENDED
  #include "defs.h"
  #include "serial.h"
  #include "ser-base.h"
  #include "ser-tcp.h"

 
I realize you'd want something "configured".

 
/src/gdb-6.7.1/gdb/tui/tui-io.c: In function `tui_getc':
/src/gdb-6.7.1/gdb/tui/tui-io.c:681: warning: implicit declaration of function `
napms'
 

Similar problem.

 
/usr/include/curses.h only declares napms under an #ifdef.
I don't know why I didn't see this with 32bit.
 
 
-bash-3.2$ gdiff -u4 /src/gdb-6.7.1/gdb/tui/tui-io.c.orig /src/gdb-6.7.1/gdb/tui/tui-io.c
--- /src/gdb-6.7.1/gdb/tui/tui-io.c.orig        2009-02-22 21:19:11.000000000 -0800
+++ /src/gdb-6.7.1/gdb/tui/tui-io.c     2009-02-22 21:19:25.000000000 -0800
@@ -19,8 +19,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see .  */
+#define _XOPEN_SOURCE_EXTENDED
 #include "defs.h"
 #include "target.h"
 #include "event-loop.h"
 #include "event-top.h"
 
 
/src/gdb-6.7.1/gdb/tui/tui-regs.c: In function `tui_display_register':
/src/gdb-6.7.1/gdb/tui/tui-regs.c:553: warning: implicit declaration of function `waddstr'
gmake[2]: *** [tui-regs.o] Error 1
gmake[2]: Leaving directory `/home/jay/obj/gdb/64/gdb'
gmake[1]: *** [all-gdb] Error 2
gmake[1]: Leaving directory `/home/jay/obj/gdb/64'
gmake: *** [all] Error 2
 

_XOPEN_SOURCE_EXTENDED also fixes that.

 
again:
 

/src/gdb-6.7.1/gdb/tui/tui-stack.c: In function `tui_show_locator_content':
/src/gdb-6.7.1/gdb/tui/tui-stack.c:257: warning: implicit declaration of function `waddstr'
gmake[2]: *** [tui-stack.o] Error 1

 
at this point I stopped and put it in config.h, which is perhaps where it belongs.
 
 
Thanks,
 - Jay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]