Re: [PATCH] Compile dnotify example w/o glibc 2.2 headers

2001-01-24 Thread Andreas Jaeger

Daniel Phillips <[EMAIL PROTECTED]> writes:

> dnotify is cool, check it out
> 
> If you want to compile the example in Documentation/dnotify.txt and
> you don't have glibc 2.2 headers installed you have 3 choices:
> 
>   1) Upgrade to glibc 2.2
>   2) Hunt for the missing symbols in the 2.4 source tree
>   3) Apply this patch
> 
> Option (1) is recommended of course, but if you're lazy (like me)
> then...
> 
> --- 2.4.0/Documentation/dnotify.txt~  Mon Jan 22 16:04:32 2001
> +++ 2.4.0/Documentation/dnotify.txt   Mon Jan 22 16:04:25 2001
> @@ -63,6 +63,17 @@
>   #include 
>   #include 
>   
> + #ifndef F_NOTIFY/* pre-glibc 2.2? */

If you're checking for glibc 2.2 or newer, better use:
#if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 2

Andreas
> + #define F_NOTIFY1026
> + #define DN_ACCESS   0x0001  /* File accessed */
> + #define DN_MODIFY   0x0002  /* File modified */
> + #define DN_CREATE   0x0004  /* File created */
> + #define DN_DELETE   0x0008  /* File removed */
> + #define DN_RENAME   0x0010  /* File renamed */
> + #define DN_ATTRIB   0x0020  /* File changed attibutes */
> + #define DN_MULTISHOT0x8000  /* Don't remove notifier */
> + #endif
> +
>   static volatile int event_fd;
>   
>   static void handler(int sig, siginfo_t *si, void *data)

-- 
 Andreas Jaeger
  SuSE Labs [EMAIL PROTECTED]
   private [EMAIL PROTECTED]
http://www.suse.de/~aj
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



[PATCH] Compile dnotify example w/o glibc 2.2 headers

2001-01-24 Thread Daniel Phillips

dnotify is cool, check it out

If you want to compile the example in Documentation/dnotify.txt and
you don't have glibc 2.2 headers installed you have 3 choices:

  1) Upgrade to glibc 2.2
  2) Hunt for the missing symbols in the 2.4 source tree
  3) Apply this patch

Option (1) is recommended of course, but if you're lazy (like me)
then...

--- 2.4.0/Documentation/dnotify.txt~Mon Jan 22 16:04:32 2001
+++ 2.4.0/Documentation/dnotify.txt Mon Jan 22 16:04:25 2001
@@ -63,6 +63,17 @@
#include 
#include 

+   #ifndef F_NOTIFY/* pre-glibc 2.2? */
+   #define F_NOTIFY1026
+   #define DN_ACCESS   0x0001  /* File accessed */
+   #define DN_MODIFY   0x0002  /* File modified */
+   #define DN_CREATE   0x0004  /* File created */
+   #define DN_DELETE   0x0008  /* File removed */
+   #define DN_RENAME   0x0010  /* File renamed */
+   #define DN_ATTRIB   0x0020  /* File changed attibutes */
+   #define DN_MULTISHOT0x8000  /* Don't remove notifier */
+   #endif
+
static volatile int event_fd;

static void handler(int sig, siginfo_t *si, void *data)

-- 
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/



Re: [PATCH] Compile dnotify example w/o glibc 2.2 headers

2001-01-24 Thread Andreas Jaeger

Daniel Phillips [EMAIL PROTECTED] writes:

 plugdnotify is cool, check it out/plug
 
 If you want to compile the example in Documentation/dnotify.txt and
 you don't have glibc 2.2 headers installed you have 3 choices:
 
   1) Upgrade to glibc 2.2
   2) Hunt for the missing symbols in the 2.4 source tree
   3) Apply this patch
 
 Option (1) is recommended of course, but if you're lazy (like me)
 then...
 
 --- 2.4.0/Documentation/dnotify.txt~  Mon Jan 22 16:04:32 2001
 +++ 2.4.0/Documentation/dnotify.txt   Mon Jan 22 16:04:25 2001
 @@ -63,6 +63,17 @@
   #include stdio.h
   #include unistd.h
   
 + #ifndef F_NOTIFY/* pre-glibc 2.2? */

If you're checking for glibc 2.2 or newer, better use:
#if __GLIBC__ == 2  __GLIBC_MINOR__ = 2

Andreas
 + #define F_NOTIFY1026
 + #define DN_ACCESS   0x0001  /* File accessed */
 + #define DN_MODIFY   0x0002  /* File modified */
 + #define DN_CREATE   0x0004  /* File created */
 + #define DN_DELETE   0x0008  /* File removed */
 + #define DN_RENAME   0x0010  /* File renamed */
 + #define DN_ATTRIB   0x0020  /* File changed attibutes */
 + #define DN_MULTISHOT0x8000  /* Don't remove notifier */
 + #endif
 +
   static volatile int event_fd;
   
   static void handler(int sig, siginfo_t *si, void *data)

-- 
 Andreas Jaeger
  SuSE Labs [EMAIL PROTECTED]
   private [EMAIL PROTECTED]
http://www.suse.de/~aj
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/