[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#159636: DN_* and F_NOTIFY definitions are missing in (bits/fcntl.h) for hppa



> > 
> > > glibc-2.2.5/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h is missing the
> > > following bits:
> > 
> > > I have a patch, but I'm running it through a build and test.  Will
> > > post when everything passes.
> > 
> > Since you're already talking with upstream about updating the hppa
> > port, will you please include this patch?
> 
> Hmm, I'm fixing this issue on all archs and all defines, then I
> will send to upstream, related with Bug#157142. 
> 
> Regards,
> -- gotom


Tested with glibc-2-2-final tag, applies, builds, and installed in
chroot. Subsequently built dnotify, which compiles and passes a set
of trivial tests (file rename, directory access etc.)

This is a fix for hppa.

c.


#! /bin/sh -e

# DP: PA-RISC Add definitions for DN_* and F_NOTIFY to glibc. (Not sent upstream) 

if [ $# -ne 2 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch -d "$2" -f --no-backup-if-mismatch -p0 < $0;;
    -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p0 < $0;;
    *)
	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
	exit 1
esac
exit 0

# append the patch here and adjust the -p? flag in the patch calls.
diff -urN ./glibc-2.2.5/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h ./glibc-2.2.5/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
--- ./glibc-2.2.5/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h	2001-07-09 20:57:12.000000000 -0400
+++ ./glibc-2.2.5/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h	2002-09-04 13:24:20.000000000 -0400
@@ -81,6 +81,12 @@
 # define F_GETSIG	14	/* Get number of signal to be sent.  */
 #endif
 
+#ifdef __USE_GNU
+# define F_SETLEASE     1024    /* Set a lease.  */
+# define F_GETLEASE     1025    /* Enquire what lease is active.  */
+# define F_NOTIFY       1026    /* Request notfications on a directory.  */
+#endif
+
 /* for F_[GET|SET]FL */
 #define FD_CLOEXEC	1	/* actually anything with low bit set goes */
 
@@ -102,6 +108,17 @@
 # define LOCK_UN	8	/* remove lock */
 #endif
 
+#ifdef __USE_GNU
+/* Types of directory notifications that may be requested with F_NOTIFY.  */
+# define DN_ACCESS      0x00000001      /* File accessed.  */
+# define DN_MODIFY      0x00000002      /* File modified.  */
+# define DN_CREATE      0x00000004      /* File created.  */
+# define DN_DELETE      0x00000008      /* File removed.  */
+# define DN_RENAME      0x00000010      /* File renamed.  */
+# define DN_ATTRIB      0x00000020      /* File changed attibutes.  */
+# define DN_MULTISHOT   0x80000000      /* Don't remove notifier.  */
+#endif
+
 struct flock
   {
     short int l_type;	/* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */

Reply to: