473,721 Members | 2,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

strange behavior: sockaddr_in makes gdb fail

FBM
Hi there,

I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:

Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_in does not allow me to question argc again.. after line X*
has been executed.

However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..

If at line X* I ask gdb about content of argc, the answer is 0x0.. :
(gdb) p argc
Cannot access memory at address 0x0

Any idea what may be wrong? thanks a lot.
----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>

void error(char *msg)
{
perror(msg);
exit(1);
}

int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
struct sockaddr_in serv_addr;

if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}
X* portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");

return 0;
}
---

Jul 30 '07 #1
8 3216
FBM wrote:
Hi there,

I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:

Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_in does not allow me to question argc again.. after line X*
has been executed.

However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..

If at line X* I ask gdb about content of argc, the answer is 0x0.. :
(gdb) p argc
Cannot access memory at address 0x0

Any idea what may be wrong? thanks a lot.
----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>

void error(char *msg)
{
perror(msg);
exit(1);
}

int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
struct sockaddr_in serv_addr;

if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}
X* portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");

return 0;
}
---
The headers <sys/socket.hand <netinet/in.hare not standard headers, and
different systems, or even different versions of the same system, provide
different definitions in those headers. How is struct sockaddr_in defined?
If you get rid of those two headers, and define struct sockaddr_in in your
own program, the behaviour shouldn't change. Could you do this, and then
post a standard C code sample with the same problem? If you can do that, it
will be possible to tell whether the bug is in your code or in your
environment.

For what it's worth, it's possible I haven't looked closely enough, of
course, but I don't see any obvious problems in the code you have posted.
Jul 30 '07 #2
FBM
On Jul 30, 2:43 pm, Harald van D k <true...@gmail. comwrote:
FBM wrote:
Hi there,
I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:
Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_in does not allow me to question argc again.. after line X*
has been executed.
However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..
If at line X* I ask gdb about content of argc, the answer is 0x0.. :
(gdb) p argc
Cannot access memory at address 0x0
Any idea what may be wrong? thanks a lot.
----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
void error(char *msg)
{
perror(msg);
exit(1);
}
int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
struct sockaddr_in serv_addr;
if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}
X* portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");
return 0;
}
---

The headers <sys/socket.hand <netinet/in.hare not standard headers, and
different systems, or even different versions of the same system, provide
different definitions in those headers. How is struct sockaddr_in defined?
If you get rid of those two headers, and define struct sockaddr_in in your
own program, the behaviour shouldn't change. Could you do this, and then
post a standard C code sample with the same problem? If you can do that, it
will be possible to tell whether the bug is in your code or in your
environment.

For what it's worth, it's possible I haven't looked closely enough, of
course, but I don't see any obvious problems in the code you have posted.
thanks for your answer. I have tried your advice.. However, I cannot
simply paste the sockaddr_in as it is defined. It gives me the error:
"expected specifier-qualifier-list before '__SOCKADDR_COM MON'", and I
don't know how to continue from there.. :-(

Below I posted the code w/o the two headers in question..

----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*#include <sys/socket.h>
#include <netinet/in.h>*/

void error(char *msg)
{
perror(msg);
exit(1);
}

int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
/* Structure describing an Internet socket address. */
struct sockaddr_in
{
__SOCKADDR_COMM ON (sin_);
in_port_t sin_port; /* Port number. */
struct in_addr sin_addr; /* Internet address. */

/* Pad to size of `struct sockaddr'. */
unsigned char sin_zero[sizeof (struct sockaddr) -
__SOCKADDR_COMM ON_SIZE -
sizeof (in_port_t) -
sizeof (struct in_addr)];
};

struct sockaddr_in serv_addr;

if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}

portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");

return 0;
}

---

Jul 30 '07 #3
FBM wrote:
On Jul 30, 2:43 pm, Harald van D k <true...@gmail. comwrote:
>FBM wrote:
>>Hi there,
I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:
Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_in does not allow me to question argc again.. after line X*
has been executed.
However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..
If at line X* I ask gdb about content of argc, the answer is 0x0.. :
(gdb) p argc
Cannot access memory at address 0x0
Any idea what may be wrong? thanks a lot.
----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
void error(char *msg)
{
perror(msg);
exit(1);
}
int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
struct sockaddr_in serv_addr;
if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}
X* portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");
return 0;
}
---
The headers <sys/socket.hand <netinet/in.hare not standard headers, and
different systems, or even different versions of the same system, provide
different definitions in those headers. How is struct sockaddr_in defined?
If you get rid of those two headers, and define struct sockaddr_in in your
own program, the behaviour shouldn't change. Could you do this, and then
post a standard C code sample with the same problem? If you can do that, it
will be possible to tell whether the bug is in your code or in your
environment.

For what it's worth, it's possible I haven't looked closely enough, of
course, but I don't see any obvious problems in the code you have posted.

thanks for your answer. I have tried your advice.. However, I cannot
simply paste the sockaddr_in as it is defined. It gives me the error:
"expected specifier-qualifier-list before '__SOCKADDR_COM MON'", and I
don't know how to continue from there.. :-(

Below I posted the code w/o the two headers in question..

----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*#include <sys/socket.h>
#include <netinet/in.h>*/

void error(char *msg)
{
perror(msg);
exit(1);
}

int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
/* Structure describing an Internet socket address. */
struct sockaddr_in
{
__SOCKADDR_COMM ON (sin_);
in_port_t sin_port; /* Port number. */
struct in_addr sin_addr; /* Internet address. */

/* Pad to size of `struct sockaddr'. */
unsigned char sin_zero[sizeof (struct sockaddr) -
__SOCKADDR_COMM ON_SIZE -
sizeof (in_port_t) -
sizeof (struct in_addr)];
};

struct sockaddr_in serv_addr;

if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}

portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");

return 0;
}

---
Which system are you using?

This is a gdb bug. A debugger should never crash.
Probably there is a problem with the debug information/executable
format/whatever.
Jul 30 '07 #4
FBM
On Jul 30, 2:57 pm, jacob navia <ja...@jacob.re mcomp.frwrote:
FBM wrote:
On Jul 30, 2:43 pm, Harald van D k <true...@gmail. comwrote:
FBM wrote:
Hi there,
I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:
Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_in does not allow me to question argc again.. after line X*
has been executed.
However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..
If at line X* I ask gdb about content of argc, the answer is 0x0.. :
(gdb) p argc
Cannot access memory at address 0x0
Any idea what may be wrong? thanks a lot.
----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
void error(char *msg)
{
perror(msg);
exit(1);
}
int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
struct sockaddr_in serv_addr;
if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}
X* portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");
return 0;
}
---
The headers <sys/socket.hand <netinet/in.hare not standard headers, and
different systems, or even different versions of the same system, provide
different definitions in those headers. How is struct sockaddr_in defined?
If you get rid of those two headers, and define struct sockaddr_in in your
own program, the behaviour shouldn't change. Could you do this, and then
post a standard C code sample with the same problem? If you can do that, it
will be possible to tell whether the bug is in your code or in your
environment.
For what it's worth, it's possible I haven't looked closely enough, of
course, but I don't see any obvious problems in the code you have posted.
thanks for your answer. I have tried your advice.. However, I cannot
simply paste the sockaddr_in as it is defined. It gives me the error:
"expected specifier-qualifier-list before '__SOCKADDR_COM MON'", and I
don't know how to continue from there.. :-(
Below I posted the code w/o the two headers in question..
----
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*#include <sys/socket.h>
#include <netinet/in.h>*/
void error(char *msg)
{
perror(msg);
exit(1);
}
int main(int argc, char *argv[]) {
long portno;
char * end_of_argv = NULL;
/* Structure describing an Internet socket address. */
struct sockaddr_in
{
__SOCKADDR_COMM ON (sin_);
in_port_t sin_port; /* Port number. */
struct in_addr sin_addr; /* Internet address. */
/* Pad to size of `struct sockaddr'. */
unsigned char sin_zero[sizeof (struct sockaddr) -
__SOCKADDR_COMM ON_SIZE -
sizeof (in_port_t) -
sizeof (struct in_addr)];
};
struct sockaddr_in serv_addr;
if (argc < 2) {
fprintf(stderr, "ERROR, no port provided\n");
exit(1);
}
portno = strtol(argv[1], &end_of_argv , 10);
printf("Hello World!\n");
return 0;
}
---

Which system are you using?

This is a gdb bug. A debugger should never crash.
Probably there is a problem with the debug information/executable
format/whatever.
I am using Ubuntu v. 7.04

fbm_laptop:~/workspace/server_app/Debug$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: (...)
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)

tnx.

Jul 30 '07 #5
FBM wrote:
On Jul 30, 2:43 pm, Harald van D k <true...@gmail. comwrote:
>FBM wrote:
Hi there,
I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:
Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_in does not allow me to question argc again.. after line X*
has been executed.
However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..

The headers <sys/socket.hand <netinet/in.hare not standard headers,
and different systems, or even different versions of the same system,
provide different definitions in those headers. How is struct sockaddr_in
defined? If you get rid of those two headers, and define struct
sockaddr_in in your own program, the behaviour shouldn't change. Could
you do this, and then post a standard C code sample with the same
problem? If you can do that, it will be possible to tell whether the bug
is in your code or in your environment.

For what it's worth, it's possible I haven't looked closely enough, of
course, but I don't see any obvious problems in the code you have posted.

thanks for your answer. I have tried your advice.. However, I cannot
simply paste the sockaddr_in as it is defined. It gives me the error:
"expected specifier-qualifier-list before '__SOCKADDR_COM MON'", and I
don't know how to continue from there.. :-(

Below I posted the code w/o the two headers in question..
You haven't included the macros and typedefs referenced by struct
sockaddr_in. Your definition of the structure looks identical to mine, so I
took the liberty of plugging in my system's, leaving me (after
reformatting, because it had got botched up) with this program:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>

typedef unsigned short int sa_family_t;

struct sockaddr
{
sa_family_t sa_family;
char sa_data[14];
};

typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;

struct in_addr
{
in_addr_t s_addr;
};

struct sockaddr_in
{
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;

unsigned char sin_zero[sizeof (struct sockaddr) -
sizeof (unsigned short int) -
sizeof (in_port_t) -
sizeof (struct in_addr)];
};

void
error (char *msg)
{
perror (msg);
exit (1);
}

int
main (int argc, char *argv[])
{
long portno;
char *end_of_argv = NULL;
struct sockaddr_in serv_addr;

if (argc < 2)
{
fprintf (stderr, "ERROR, no port provided\n");
exit (1);
}
portno = strtol (argv[1], &end_of_argv , 10);
printf ("Hello World!\n");

return 0;
}

Aside from the assumption that the size of sin_zero is positive, and that
uint16_t and uint32_t are available, I don't see anything non-portable in
this program. Does this program show the same behaviour on your system? If
it does, I believe it is a bug in your compiler or debugger, and I
recommend you check if an updated version is available.
Jul 30 '07 #6
Harald van Dijk wrote:
FBM wrote:
>On Jul 30, 2:43 pm, Harald van D k <true...@gmail. comwrote:
>>FBM wrote:
Hi there,
I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:
Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_i n does not allow me to question argc again.. after line X*
has been executed.
However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..
The headers <sys/socket.hand <netinet/in.hare not standard headers,
and different systems, or even different versions of the same system,
provide different definitions in those headers. How is struct sockaddr_in
defined? If you get rid of those two headers, and define struct
sockaddr_in in your own program, the behaviour shouldn't change. Could
you do this, and then post a standard C code sample with the same
problem? If you can do that, it will be possible to tell whether the bug
is in your code or in your environment.

For what it's worth, it's possible I haven't looked closely enough, of
course, but I don't see any obvious problems in the code you have posted.
thanks for your answer. I have tried your advice.. However, I cannot
simply paste the sockaddr_in as it is defined. It gives me the error:
"expected specifier-qualifier-list before '__SOCKADDR_COM MON'", and I
don't know how to continue from there.. :-(

Below I posted the code w/o the two headers in question..

You haven't included the macros and typedefs referenced by struct
sockaddr_in. Your definition of the structure looks identical to mine, so I
took the liberty of plugging in my system's, leaving me (after
reformatting, because it had got botched up) with this program:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>

typedef unsigned short int sa_family_t;

struct sockaddr
{
sa_family_t sa_family;
char sa_data[14];
};

typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;

struct in_addr
{
in_addr_t s_addr;
};

struct sockaddr_in
{
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;

unsigned char sin_zero[sizeof (struct sockaddr) -
sizeof (unsigned short int) -
sizeof (in_port_t) -
sizeof (struct in_addr)];
};

void
error (char *msg)
{
perror (msg);
exit (1);
}

int
main (int argc, char *argv[])
{
long portno;
char *end_of_argv = NULL;
struct sockaddr_in serv_addr;

if (argc < 2)
{
fprintf (stderr, "ERROR, no port provided\n");
exit (1);
}
portno = strtol (argv[1], &end_of_argv , 10);
printf ("Hello World!\n");

return 0;
}

Aside from the assumption that the size of sin_zero is positive, and that
uint16_t and uint32_t are available, I don't see anything non-portable in
this program. Does this program show the same behaviour on your system? If
it does, I believe it is a bug in your compiler or debugger, and I
recommend you check if an updated version is available.
Same here. I compiled in an old Redhat 5 and it works without
any problems. GDB displays the correct values.

jacob
Jul 30 '07 #7
FBM wrote:
On Jul 30, 2:57 pm, jacob navia <ja...@jacob.re mcomp.frwrote:
>FBM wrote:
On Jul 30, 2:43 pm, Harald van D k <true...@gmail. comwrote:
FBM wrote:
Hi there,
I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:
Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv
parameters (see code below). It is very strange.. by only being
there, sockaddr_in does not allow me to question argc again.. after
line X* has been executed.
However, when I take the sockaddr_in out from the main() and put it
as global variable, the problem disappears..
If at line X* I ask gdb about content of argc, the answer is 0x0.. :
(gdb) p argc
Cannot access memory at address 0x0
Any idea what may be wrong? thanks a lot.
<snip>
I am using Ubuntu v. 7.04

fbm_laptop:~/workspace/server_app/Debug$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: (...)
Thread model: posix
gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)
Since there's nothing obviously wrong with the code you've presented, you
might want to post to a more system specific group like
<news:comp.os.l inux.developmen t.appsand a gnu/gdb group or mailing list.

Jul 30 '07 #8
FBM
On Jul 30, 3:17 pm, Harald van D k <true...@gmail. comwrote:
FBM wrote:
On Jul 30, 2:43 pm, Harald van D k <true...@gmail. comwrote:
FBM wrote:
Hi there,
I am puzzled with the behavior of my code.. I am working on a
networking stuff, and debugging with eclipse (GNU gdb 6.6-debian)..
The problem I am experiencing is the following:
Whenever I declare the sockaddr_in structure inside the main, the
debugger crashes at line X*, not being able to access argv parameters
(see code below). It is very strange.. by only being there,
sockaddr_in does not allow me to question argc again.. after line X*
has been executed.
However, when I take the sockaddr_in out from the main() and put it as
global variable, the problem disappears..
The headers <sys/socket.hand <netinet/in.hare not standard headers,
and different systems, or even different versions of the same system,
provide different definitions in those headers. How is struct sockaddr_in
defined? If you get rid of those two headers, and define struct
sockaddr_in in your own program, the behaviour shouldn't change. Could
you do this, and then post a standard C code sample with the same
problem? If you can do that, it will be possible to tell whether the bug
is in your code or in your environment.
For what it's worth, it's possible I haven't looked closely enough, of
course, but I don't see any obvious problems in the code you have posted.
thanks for your answer. I have tried your advice.. However, I cannot
simply paste the sockaddr_in as it is defined. It gives me the error:
"expected specifier-qualifier-list before '__SOCKADDR_COM MON'", and I
don't know how to continue from there.. :-(
Below I posted the code w/o the two headers in question..

You haven't included the macros and typedefs referenced by struct
sockaddr_in. Your definition of the structure looks identical to mine, so I
took the liberty of plugging in my system's, leaving me (after
reformatting, because it had got botched up) with this program:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>

typedef unsigned short int sa_family_t;

struct sockaddr
{
sa_family_t sa_family;
char sa_data[14];

};

typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;

struct in_addr
{
in_addr_t s_addr;

};

struct sockaddr_in
{
sa_family_t sin_family;
in_port_t sin_port;
struct in_addr sin_addr;

unsigned char sin_zero[sizeof (struct sockaddr) -
sizeof (unsigned short int) -
sizeof (in_port_t) -
sizeof (struct in_addr)];

};

void
error (char *msg)
{
perror (msg);
exit (1);

}

int
main (int argc, char *argv[])
{
long portno;
char *end_of_argv = NULL;
struct sockaddr_in serv_addr;

if (argc < 2)
{
fprintf (stderr, "ERROR, no port provided\n");
exit (1);
}
portno = strtol (argv[1], &end_of_argv , 10);
printf ("Hello World!\n");

return 0;

}

Aside from the assumption that the size of sin_zero is positive, and that
uint16_t and uint32_t are available, I don't see anything non-portable in
this program. Does this program show the same behaviour on your system? If
it does, I believe it is a bug in your compiler or debugger, and I
recommend you check if an updated version is available.
thanks again for your help. Unfortunately, it does show the same
behavior. There seems to be a more recent version of gcc (mine is
4.1.2 and 4.2.1 is now available). I could try to update the gcc ...
and see what happens. My gdb is up to date since latest version is
6.6.

tnx.

Jul 30 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
3450
by: Dmitriy Iassenev | last post by:
hi, I found an interesting thing in operator behaviour in C++ : int i=1; printf("%d",i++ + i++); I think the value of the expression "i++ + i++" _must_ be 3, but all the compilers I tested print 2.
13
1652
by: Generic Usenet Account | last post by:
Compile the following snippet of code and run it. If the program spits out bat:bat instead of bat:zat, what would you say? Would you say that the compiler has a problem, or would you lay the blame on "undefined execution of function parameters" in the C/C++ standard and "sequence points"? /////// Code snippet begins /////// #include <iostream> char foo="cat";
10
4627
by: Florian G. Pflug | last post by:
Hi I installed a postgres-application (which was developed on debian woody) on red hat 9 today, using the postgres 7.3 rpms from redhad. One of my the triggers uses the pg_settings table (more precisely, it updates that table to change the search_path temporarily). With the postgres 7.3 (and 7.4 too) installed on my debian development system, this worked fine. On redhat 9, however, I get an "pg_settings: permission denied" error when my...
4
12051
by: James Harris | last post by:
Having updated my Debian system it now complains that I am using an incompatible pointer type in warnings such as "passing arg 2 of 'bind' from incompatible pointer type" from code, struct sockaddr_in sockad1; .... retval = bind (sock1, &sockad1, sockad1len); I can coerce the pointer with
3
1379
by: Mr. X | last post by:
Hello all, Please advise... Consider the following... void init_sockaddr (struct sockaddr_in *name, const char *hostname,int port) { struct hostent *hostinfo; name->sin_family = AF_INET;
6
2271
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to the same method (aka delegate?). I use the Tag property within this method to determine what user action is taking place. Very simple: When adding toolbar button: tbButton.Click += new...
8
2587
by: fabio | last post by:
hi everybody i have a weird problem with my project, look at this: **************************************************** Debian:/progetto/PROGETTO$ ls -al server -rwsr-xr-x 1 root faz 372731 2006-09-27 15:49 server debian:/progetto/PROGETTO$ gdb ./server GNU gdb 6.3-debian Copyright 2004 Free Software Foundation, Inc.
7
1758
by: =?Utf-8?B?QnJpYW4gS3Vueg==?= | last post by:
Hello, I'm new to the boards, and I've been struggling with a problem porting my company's code from Visual C++ 6.0 to Visual C++ 2005. We've found some crashes that I've traced to the 'c_str()' member of the standard string class. I've debugged into the deepest layers of the system code and cannot explain this. What we have is a class with a private 'string' member:
20
2230
by: Pilcrow | last post by:
This behavior seems very strange to me, but I imagine that someone will be able to 'explain' it in terms of the famous C standard. -------------------- code ----------------------------------- #include <stdio.h> int main (void) { char xx="abcd"; char * p1 = xx;
0
8860
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8738
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9376
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9086
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8028
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6678
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2599
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.