First  |  Prev |  Next  |  Last
Pages: 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
UDP broadcast
Hi There, I'm trying to send a UDP broadcast message to peers in my subnet using following code: struct sockaddr_in addr; int fd; string message = "Hello, World!"; if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { perror("socket"); return; } /* set up destination address */ memset(&ad... 2 Feb 2010 15:47
readlink (was: defining after execution)
Nobody wrote: The correct answer for Unix (readlink() isn't in ANSI C) is to use pathconf(path, _PC_PATH_MAX) or fpathconf(fd, _PC_PATH_MAX), where path or fd identify the filesystem (the values can vary between filesystems, so you might get a different result for /usr or /tmp than for the root filesys... 2 Feb 2010 15:47
defining after execution
Seebs wrote: [x-posted to c.u.p.] -s p.s.: Off-topic: There isn't a guaranteed predefined value for the maximum length of a thing linked to, so if you want to be paranoid, check to make sure that the value returned is less than the buffer size, and if it wasn't, use a bigger buffer. Determining the... 2 Feb 2010 15:47
How to set mtime etc
Hello folks, I'm looking for a C function that can change the mtime of a file. Of course I could just look up the source for "touch", but then we didn't need Usenet any more. Thanks, robert ... 3 Feb 2010 14:00
Code and Creation 02730
This is a free and informational site I created for application development and application development source on the net. Enjoy, and it's free, nothing to register oir sign up for just an informational site. http://codeandcreation.com U.C^vS,!ThdJ#LCewVNiN<A?G ... 2 Feb 2010 15:47
ftok
Hi, I understand that ftok shall return a key that can be used in IPC. But, what is the expansion for ftok ? Thx in advans, Karthik Balaguru ... 7 Feb 2010 04:19
Any way to write a hardware breakpoint callback routien
hi All, is it possible to write some API that will attach a callback as a harware breakpoint on a address at runtime int* a = malloc(20); now API(a, <func>); will call func everytime a is changed or accessed ( access mdoes could also be added during attaching the callback ) I asked in the C forum,... 2 Feb 2010 15:47
About daemon process
hi: I am confused by the behavior of stdout/stderr in daemon process. If a daemon doesn't close stdout/stderr and redirect them to /dev/null. (that is, it inherits the terminal(/dev/ptsX) from it's parent process) Then the I logout and the terminal is closed. What will happen if the daemon process k... 2 Feb 2010 15:46
QNU Make Question: Append value on the command line to a predefined ?macro in the make file
micropentium <anderswang(a)gmail.com> wrote: Hi, I have a c file foo.c: int main(void) { #ifdef FOO printf("FOO!\n"); #endif #ifdef BAR printf("BAR!\n"); #endif return 0; } and a Makefile may be like this: CPPFLAGS=-DFOO a.out:foo.o gcc -o $@ $^ %.o:%.c ... 2 Feb 2010 15:46
QNU Make Question: Append value on the command line to a predefined macro in the make file
micropentium <anderswang(a)gmail.com> writes: int main(void) { #ifdef FOO printf("FOO!\n"); #endif #ifdef BAR printf("BAR!\n"); #endif return 0; } and a Makefile may be like this: CPPFLAGS=-DFOO a.out:foo.o gcc -o $@ $^ %.o:%.c gcc -c $< ${CPPFLAGS} ... 2 Feb 2010 15:46
First  |  Prev |  Next  |  Last
Pages: 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45