473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 3176
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_COMMON'", 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_COMMON (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_COMMON_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_COMMON'", 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_COMMON (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_COMMON_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.remcomp.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_COMMON'", 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_COMMON (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_COMMON_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_COMMON'", 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_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_COMMON'", 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.remcomp.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.linux.development.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_COMMON'", 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
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...
13
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...
10
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...
4
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...
3
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
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...
8
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...
7
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...
20
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 -----------------------------------...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.