From: Richard PALO <richard.palo-GANU6spQydw@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: PATCH: Sense if git should be used (for tarball) and if typeof needs to be __typeof__
Date: Thu, 19 Nov 2015 21:57:16 +0100 [thread overview]
Message-ID: <564E37AC.8080609@free.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
I'd like to submit the attached patch to configure.ac fixing two issues:
1. Packaging systems such as pkgsrc use source tarballs not git, so configure
could try to see if it's really in a git repository else use ChangeLog
to determine the driver date to use.
NB 'git log' should probably already be 'git log -1'
2. When using strict ISO C compilers, such as if using -std=c99 instead of
for example -std=gnu99, typeof is not a valid keyword and __typeof__ should
be used. Use AC_C_TYPEOF to automatically define a macro if necessary.
cheers
--
Richard PALO
[-- Attachment #2: 0001-Sense-if-git-should-be-used-for-tarball-and-if-typeo.patch --]
[-- Type: text/x-patch, Size: 1441 bytes --]
From e52880d8175fafac61bb45ff0274d47d39715f50 Mon Sep 17 00:00:00 2001
From: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
Date: Thu, 19 Nov 2015 19:17:38 +0100
Subject: [PATCH] Sense if git should be used (for tarball) and if typeof needs
to be __typeof__
Use `git log` only if not in a source tarball where ChangeLog is already
generated and git may not be present.
Check to see if __typeof__ needs to be used instead of typeof, which is
the case if strict ISO c is used (such as -std=c99)
Signed-off-by: Richard PALO <richard-qavaossjCcEdnm+yROfE0A@public.gmane.org>
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 9c77f94..71482ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,7 +36,7 @@ AC_DEFINE_UNQUOTED([NV_PATCHLEVEL],
[$(echo $PACKAGE_VERSION | sed -e 's/^[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)/\1/')],
[Patch version])
AC_DEFINE_UNQUOTED([NV_DRIVER_DATE],
- [$(echo -n \";git log |head -3|tail -1|tr -d '\n';echo -n \")],
+ [$(printf \"; if test -d .git; then git log; else cat ChangeLog; fi |head -3|tail -1|tr -d '\n'; printf \")],
[Driver date])
AC_CONFIG_SRCDIR([Makefile.am])
@@ -105,6 +105,7 @@ AC_SUBST([LIBUDEV_LIBS])
# Checks for header files.
AC_HEADER_STDC
+AC_C_TYPEOF
# Use -Wall all the time
CFLAGS="$CFLAGS -Wall"
--
2.6.3
[-- Attachment #3: Type: text/plain, Size: 153 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next reply other threads:[~2015-11-19 20:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-19 20:57 Richard PALO [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-11-19 20:58 PATCH: Sense if git should be used (for tarball) and if typeof needs to be __typeof__ Richard PALO
2015-11-19 18:38 PATCH: Sense if git should be used (for tarball) and if typeof needs, " Richard PALO
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564E37AC.8080609@free.fr \
--to=richard.palo-ganu6spqydw@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.