[PATCH 1/2] port: avoid breaking configure on cygwin

classic Classic list List threaded Threaded
4 messages Options
thb
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] port: avoid breaking configure on cygwin

thb
From: Thorsten Behrens <[hidden email]>

--

Signed-off-by: Thorsten Behrens <[hidden email]>
---
 configure.ac | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e824b39..eec8190 100644
--- a/configure.ac
+++ b/configure.ac
@@ -456,10 +456,12 @@ else
               [Defined if LOCAL_PEEREID is supported (NetBSD specific)])
   else
     # (Open)Solaris
-    AC_CHECK_FUNCS([getpeerucred], AC_CHECK_HEADERS([ucred.h]))
+    AC_CHECK_FUNCS([getpeerucred])
     if test $ac_cv_func_getpeerucred != yes; then
         # FreeBSD
         AC_CHECK_FUNCS([getpeereid])
+    else
+        AC_CHECK_HEADERS([ucred.h])
     fi
   fi
 fi
--
2.13.6


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
thb
Reply | Threaded
Open this post in threaded view
|

[PATCH 2/2] port: first cut at native W32 building

thb
From: Thorsten Behrens <[hidden email]>

Co-authored-by: Stephan Bergmann <[hidden email]>
Signed-off-by: Thorsten Behrens <[hidden email]>
---
 src/Makefile.am       | 8 ++++----
 src/assuan-handler.c  | 2 +-
 src/mkheader.c        | 2 +-
 src/versioninfo.rc.in | 1 -
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index f353e29..0792ec8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -83,7 +83,7 @@ endif
 
 if HAVE_W32_SYSTEM
 
-LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \
+LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RC) \
      `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \
      sed -e 's/-I/--include-dir /g;s/-D/--define /g'`
 
@@ -144,11 +144,11 @@ install-exec-hook:
               $(DESTDIR)$(bindir)/gpgcedev.dll
 endif
 
-mkheader: mkheader.c Makefile
+mkheader$(EXEEXT): mkheader.c Makefile
  $(CC_FOR_BUILD) -I. -I$(srcdir) -o $@ $(srcdir)/mkheader.c
 
-assuan.h: assuan.h.in mkheader $(parts_of_assuan_h)
- ./mkheader $(host_os) $(srcdir)/assuan.h.in \
+assuan.h: assuan.h.in mkheader$(EXEEXT) $(parts_of_assuan_h)
+ ./mkheader$(EXEEXT) $(host_os) $(srcdir)/assuan.h.in \
                    @VERSION@ @VERSION_NUMBER@ >$@
 
 
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index 2299fcd..5cc0fb0 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -396,7 +396,7 @@ static struct {
 
   { "INPUT",  std_handler_input, std_help_input, 0 },
   { "OUTPUT", std_handler_output, std_help_output, 0 },
-  { } };
+};
 
 
 /**
diff --git a/src/mkheader.c b/src/mkheader.c
index 0ee0944..e7a6f5c 100644
--- a/src/mkheader.c
+++ b/src/mkheader.c
@@ -100,7 +100,7 @@ write_special (const char *fname, int lnr, const char *tag)
                "# include <unistd.h>\n"
                "#endif\n", stdout);
       else
-        fputs ("#include <unistd.h>\n", stdout);
+        fputs ("#include <io.h>\n", stdout);
     }
   else if (!strcmp (tag, "include:types"))
     {
diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in
index f9e7cb4..0c235c3 100644
--- a/src/versioninfo.rc.in
+++ b/src/versioninfo.rc.in
@@ -15,7 +15,6 @@
 
 #line __LINE__ "versioninfo.rc.in"
 
-#include <afxres.h>
 
 
 VS_VERSION_INFO VERSIONINFO
--
2.13.6


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] port: avoid breaking configure on cygwin

NIIBE Yutaka
In reply to this post by thb
[hidden email] wrote:
> Signed-off-by: Thorsten Behrens <[hidden email]>
> ---
>  configure.ac | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

I think it's to libassuan, right?

I am currently (back) porting gnupg/agent/command-ssh.c thing to
libassuan, which touches same files.

> --- a/configure.ac
> +++ b/configure.ac
> @@ -456,10 +456,12 @@ else
>                [Defined if LOCAL_PEEREID is supported (NetBSD specific)])
>    else
>      # (Open)Solaris
> -    AC_CHECK_FUNCS([getpeerucred], AC_CHECK_HEADERS([ucred.h]))
> +    AC_CHECK_FUNCS([getpeerucred])
>      if test $ac_cv_func_getpeerucred != yes; then
>          # FreeBSD
>          AC_CHECK_FUNCS([getpeereid])
> +    else
> +        AC_CHECK_HEADERS([ucred.h])
>      fi
>    fi
>  fi
> --

Please describe your problem.  For me, it is just moving the check (I
compared the resulted configure scripts (with your change, original)).

I wonder the reason why original version breaked on Cygwin and how.

I'd just moving the check unconditional (like one in gnupg), since
we also need to check sys/ucred.h.
--

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
thb
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] port: avoid breaking configure on cygwin

thb
NIIBE Yutaka wrote:
> I think it's to libassuan, right?
>
Right - and sorry should've tagged the patch series accordingly.

> I wonder the reason why original version breaked on Cygwin and how.
>
IIRC the nested macro got m4 or autoconf's knickers in a twist -

> I'd just moving the check unconditional (like one in gnupg), since
> we also need to check sys/ucred.h.
>
Fine by me, cygwin/msvc gonna be a bit of a moving target anyway for a
while, I suspect.

Cheers,

-- Thorsten

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

signature.asc (968 bytes) Download Attachment