I was going to try to get you to code thru your problem, but there were several issues, not just the pointer problem. You HAVE to call pthread_wait in main() or the whole process will exit and the thread may or may not have ever executed Client(). So I just made a few changes and let it go with that.
I removed a bunch of intermediate variables, I left error checking up to you. Check return codes. Always.
Dear colleagues,
One of my friend have a problem with c code. While compiling a c program it displays a message like
"array type has incomplete element type". Any body can provide a solution for it.
Jaganadh.G (1 Reply)
Hello there,
Here is how it goes - I have written a small test driver as an exercise to "Linux Device Drivers" and as a preparation for writing a real, functional driver.
For the sake of seeing how far I got it working (I already implemented the open(0, read(), write() and ioctl() calls) I... (4 Replies)
I'm trying to compile a 2.4.26 kernel but I have to apply two patches to it.
The patches are:
linux-2.4.26-xbox.patch
openMosix-2.4.26-1
This is the reason that it doesn't compile. There is only one error but I'm not familiar with C or C++(Unfortunately only Java and some lower-level... (2 Replies)
If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it:
(1) one is to pass a pointer-to-pointer parameter, like:
int my_malloc(int size, char **pmem)
{
*pmem=(char *)malloc(size);
if(*pmem==NULL)... (11 Replies)
I'm getting the following Error:
prepare_pcap.c: In function `prepare_pkts':
prepare_pcap.c:127: error: dereferencing pointer to incomplete type
prepare_pcap.c:138: error: dereferencing pointer to incomplete type
====================================
This is the part of the relevant... (8 Replies)
Hi all, this warning is driving me nuts. I use -pedantic with -Wall and -Werror so this needs to be fixed.
BUILD: GNU-Linux-x86
Any ideas?
struct sockaddr_in server_addr;
int addr_len = sizeof (server_addr);
fd = accept(link->socket_fd,
(struct sockaddr_in *)... (2 Replies)
I have what should be a relatively simple program (fadec.c) that maps a struct from an included header file (fadec.h) to a shared memory region, but I’m struggling accessing members in the struct from the pointer returned by shmat. Ultimately, I want to access members in the shared memory structure... (2 Replies)
I am getting a dereferencing pointer to incomplete type error when i compile the following code on lines highlighted in red. Can anyone help me in identifying what is wrong in the code?
#include<stdio.h>
#include<stdlib.h>
typedef struct{
int info;
struct node* link ;
} node;
void... (3 Replies)
Hi all, I'm new programming in C, so I had the next message in my code:
Dual.c:88:20: warning: pointer type mismatch in conditional expression : &clientSa.sin6.sin6.sin6_addr,
Any help would be great
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include... (1 Reply)
Discussion started by: godna
1 Replies
LEARN ABOUT SUNOS
wchar
wchar.h(3HEAD) Headers wchar.h(3HEAD)NAME
wchar.h, wchar - wide-character handling
SYNOPSIS
#include <wchar.h>
DESCRIPTION
The <wchar.h> header defines the following types:
wchar_t As described in <stddef.h>.
wint_t An integer type capable of storing any valid value of wchar_t or WEOF.
wctype_t A scalar type of a data object that can hold values which represent locale-specific character classification.
mbstate_t An object type other than an array type that can hold the conversion state information necessary to convert between
sequences of (possibly multi-byte) characters and wide characters. If a codeset is being used such that an mbstate_t
needs to preserve more than two levels of reserved state, the results are unspecified.
FILE As described in <stdio.h>.
size_t As described in <stddef.h>.
va_list As described in <stdarg.h>.
The implementation supports one or more programming environments in which the width of wint_t is no greater than the width of type long.
The names of these programming environments can be obtained using the confstr(3C) function or the getconf(1) utility.
The <wchar.h> header defines the following macros:
WCHAR_MAX The maximum value representable by an object of type wchar_t.
WCHAR_MIN The minimum value representable by an object of type wchar_t.
WEOF Constant expression of type wint_t that is returned by several WP functions to indicate end-of-file.
NULL As described in <stddef.h>.
The tag tm is declared as naming an incomplete structure type, the contents of which are described in the header <time.h>.
Inclusion of the <wchar.h> header can make visible all symbols from the headers <ctype.h>, <string.h>, <stdarg.h>, <stddef.h>, <stdio.h>,
<stdlib.h>, and <time.h>.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO getconf(1), btowc(3C), confstr(3C), fgetwc(3C), getws(3C), fputwc(3C), fputws(3C), fwide(3C), fwprintf(3C), fwscanf(3C), getwc(3C),
getwchar(3C), iswalpha(3C), iswctype(3C), mbsinit(3C), mbrlen(3C), mbrtowc(3C), mbsrtowcs(3C), towlower(3C), towupper(3C), ungetwc(3C),
vfwprintf(3C), wcrtomb(3C), wcsrtombs(3C), wcstring(3C), wcsstr(3C), wcstod(3C), wcscoll(3C), wcsftime(3C), wcstol(3C), wcstoul(3C),
wcswidth(3C), wcsxfrm(3C), wctob(3C), wctype(3C), wcwidth(3C), wmemchr(3C), wmemcmp(3C), wmemcpy(3C), wmemmove(3C), wmemset(3C),
stdarg(3EXT), stddef.h(3HEAD), stdio.h(3HEAD), stdlib.h(3HEAD), string.h(3HEAD), time.h(3HEAD), wctype.h(3HEAD), attributes(5), stan-
dards(5)SunOS 5.10 10 Sep 2004 wchar.h(3HEAD)