summaryrefslogtreecommitdiff
path: root/editors/emacs22/files
diff options
context:
space:
mode:
authorAshish SHUKLA <ashish@FreeBSD.org>2013-05-13 05:14:24 +0000
committerAshish SHUKLA <ashish@FreeBSD.org>2013-05-13 05:14:24 +0000
commit383c41acbdc54056ec7d4e438e15c5645236ef0e (patch)
treeccfded74e1e37be1687ef3a6db680d249ec1eed3 /editors/emacs22/files
parent- Fix build with new glib (diff)
- Unbreak on FreeBSD 9.x and later
Notes
Notes: svn path=/head/; revision=317995
Diffstat (limited to 'editors/emacs22/files')
-rw-r--r--editors/emacs22/files/patch-src-filelock.c56
1 files changed, 54 insertions, 2 deletions
diff --git a/editors/emacs22/files/patch-src-filelock.c b/editors/emacs22/files/patch-src-filelock.c
index aa91b98f2aeb..7ed56f40a81e 100644
--- a/editors/emacs22/files/patch-src-filelock.c
+++ b/editors/emacs22/files/patch-src-filelock.c
@@ -1,5 +1,8 @@
---- src/filelock.c.org 2008-01-07 23:30:11.000000000 -0500
-+++ src/filelock.c 2010-02-12 17:50:08.000000000 -0500
+
+$FreeBSD$
+
+--- src/filelock.c.orig
++++ src/filelock.c
@@ -64,7 +64,12 @@
#ifdef CLASH_DETECTION
@@ -32,3 +35,52 @@
int desc;
if (filename)
+@@ -272,16 +281,28 @@
+
+ emacs_close (desc);
+
++#if __FreeBSD_version >= 900007
++ setutxdb (UTXDB_ACTIVE, filename);
++#else
+ utmpname (filename);
++#endif
+ }
+
++#if __FreeBSD_version >= 900007
++ setutxent ();
++#else
+ setutent ();
++#endif
+
+ while (1)
+ {
+ /* Find the next reboot record. */
+ ut.ut_type = BOOT_TIME;
++#if __FreeBSD_version >= 900007
++ utp = getutxid (&ut);
++#else
+ utp = getutid (&ut);
++#endif
+ if (! utp)
+ break;
+ /* Compare reboot times and use the newest one. */
+@@ -293,11 +314,19 @@
+ }
+ /* Advance on element in the file
+ so that getutid won't repeat the same one. */
++#if __FreeBSD_version >= 900007
++ utp = getutxent ();
++#else
+ utp = getutent ();
++#endif
+ if (! utp)
+ break;
+ }
++#if __FreeBSD_version >= 900007
++ endutxent();
++#else
+ endutent ();
++#endif
+ }
+ #endif /* BOOT_TIME */
+