July 27, 2004 GPL Compliance for Software Developers Example of work using GLIBC

Example of work using GLIBC

 
#include <stdio.h> #include <unistd.h> #include <sys/time.h> #include <time.h>
int main (int argc, char ** argv) {
struct timeval tv;
gettimeofday (&tv, NULL); printf ("At the tone, the time will be %lu seconds and " "%lu microseconds since the epoch\n", tv.tv_sec, tv.tv_usec); sleep (5); timerclear (&tv); /* Under ten lines: #define timerclear(tvp)\ ((tvp)->tv_sec = (tvp)->tv_usec = 0) */ gettimeofday (&tv, NULL); printf ("At the tone, the time will be %lu seconds and " "%lu microseconds since the epoch\n", tv.tv_sec, tv.tv_usec); }




Next: Works that use the Library, linked with the Library: Licensing and Marketing

A
mechanical hound, which is definately not the unofficial mascott of
the GPL Compliance Lab. Copyright © 2004, Free Software Foundation. Verbatim copying permitted provided this notice is preserved.