[svn] gpgme - r1501 - in trunk: contrib contrib/conf-w32ce-msc src
svn author wk
cvs at cvs.gnupg.org
Mon Nov 15 09:40:32 CET 2010
Author: wk
Date: 2010-11-15 09:40:30 +0100 (Mon, 15 Nov 2010)
New Revision: 1501
Modified:
trunk/contrib/ChangeLog
trunk/contrib/conf-w32ce-msc/build.mk
trunk/src/ChangeLog
trunk/src/ath.c
trunk/src/ath.h
trunk/src/data-compat.c
trunk/src/w32-ce.h
Log:
Fixes for the MSC build
Modified: trunk/contrib/ChangeLog
===================================================================
--- trunk/contrib/ChangeLog 2010-11-04 08:16:57 UTC (rev 1500)
+++ trunk/contrib/ChangeLog 2010-11-15 08:40:30 UTC (rev 1501)
@@ -1,3 +1,9 @@
+2010-11-15 Werner Koch <wk at g10code.com>
+
+ * conf-w32ce-msc/build.mk (copy-static-source): Create stdint.h.
+ (all): Add ws2.lib
+ (clean): New.
+
2010-11-04 Werner Koch <wk at g10code.com>
* conf-w32ce-msc/build.mk (copy-built-source): Revert last
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2010-11-04 08:16:57 UTC (rev 1500)
+++ trunk/src/ChangeLog 2010-11-15 08:40:30 UTC (rev 1501)
@@ -1,3 +1,17 @@
+2010-11-15 Werner Koch <wk at g10code.com>
+
+ * data-compat.c (gpgme_data_new_from_filepart)
+ (gpgme_data_new_from_file) [W32CE && _MSC_VER]: Return not
+ GPG_ERR_NOT_IMPLEMENTED.
+
+ * w32-ce.h (HKEY_PERFORMANCE_DATA, HKEY_CURRENT_CONFIG, _IOLBF)
+ (abort) [_MSC_VER]: Provide these macros.
+
+ * ath.h [W32CE && _MSC_VER]: Include winsock2.h.
+
+ * ath.c (ath_read, ath_write) [W32CE && _MSC_VER]: Do not call
+ non-available functions.
+
2010-11-04 Werner Koch <wk at g10code.com>
* w32-ce.h [_MSC_VER && W32CE]: Undef leave.
Modified: trunk/contrib/conf-w32ce-msc/build.mk
===================================================================
--- trunk/contrib/conf-w32ce-msc/build.mk 2010-11-04 08:16:57 UTC (rev 1500)
+++ trunk/contrib/conf-w32ce-msc/build.mk 2010-11-15 08:40:30 UTC (rev 1501)
@@ -209,6 +209,7 @@
gpgme.h \
status-table.h
+my_stdint = $(targetsrc)/libassuan/src/stdint.h
copy-static-source:
@if [ ! -f ./gpgme.c ]; then \
@@ -218,6 +219,14 @@
cp -t $(targetsrc)/gpgme/src $(sources);
cd ../contrib/conf-w32ce-msc ; \
cp -t $(targetsrc)/gpgme/src $(conf_sources)
+ @echo typedef unsigned long long uint64_t; >$(my_stdint)
+ @echo typedef long long int64_t; >>$(my_stdint)
+ @echo typedef unsigned int uint32_t; >>$(my_stdint)
+ @echo typedef int int32_t; >>$(my_stdint)
+ @echo typedef unsigned short uint16_t; >>$(my_stdint)
+ @echo typedef short int16_t; >>$(my_stdint)
+ @echo typedef unsigned int uintptr_t; >>$(my_stdint)
+ @echo typedef int intptr_t; >>$(my_stdint)
copy-built-source:
@if [ ! -f ./gpgme.h ]; then \
@@ -242,7 +251,7 @@
$(libdir)/libgpg-error-0-msc.lib \
$(libdir)/libassuan-0-msc.lib \
coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib \
- commctrl.lib /subsystem:windowsce,5.02
+ commctrl.lib ws2.lib /subsystem:windowsce,5.02
# Note that we don't need to create the install directories because
# libgpg-error must have been build and installed prior to this
@@ -251,3 +260,8 @@
copy /y gpgme.h $(incdir:/=\)
copy /y libgpgme-11-msc.dll $(bindir:/=\)
copy /y libgpgme-11-msc.lib $(libdir:/=\)
+
+
+clean:
+ del *.obj libgpgme-11-msc.lib libgpgme-11-msc.dll libgpgme-11-msc.exp
+
Modified: trunk/src/ath.c
===================================================================
--- trunk/src/ath.c 2010-11-04 08:16:57 UTC (rev 1500)
+++ trunk/src/ath.c 2010-11-15 08:40:30 UTC (rev 1501)
@@ -128,14 +128,22 @@
ssize_t
ath_read (int fd, void *buf, size_t nbytes)
{
+#if defined(HAVE_W32CE_SYSTEM) && defined(_MSC_VER)
+ return -1; /* Not supported. */
+#else
return read (fd, buf, nbytes);
+#endif
}
ssize_t
ath_write (int fd, const void *buf, size_t nbytes)
{
+#if defined(HAVE_W32CE_SYSTEM) && defined(_MSC_VER)
+ return -1; /* Not supported. */
+#else
return write (fd, buf, nbytes);
+#endif
}
Modified: trunk/src/ath.h
===================================================================
--- trunk/src/ath.h 2010-11-04 08:16:57 UTC (rev 1500)
+++ trunk/src/ath.h 2010-11-15 08:40:30 UTC (rev 1501)
@@ -28,6 +28,9 @@
/* fixme: Check how we did it in libgcrypt. */
struct msghdr { int dummy; };
typedef int socklen_t;
+# if defined(HAVE_W32CE_SYSTEM) && defined(_MSC_VER)
+# include <winsock2.h>
+# endif
# include <windows.h>
# include <io.h>
Modified: trunk/src/data-compat.c
===================================================================
--- trunk/src/data-compat.c 2010-11-04 08:16:57 UTC (rev 1500)
+++ trunk/src/data-compat.c 2010-11-15 08:40:30 UTC (rev 1501)
@@ -43,6 +43,9 @@
gpgme_data_new_from_filepart (gpgme_data_t *r_dh, const char *fname,
FILE *stream, off_t offset, size_t length)
{
+#if defined (HAVE_W32CE_SYSTEM) && defined (_MSC_VER)
+ return gpgme_error (GPG_ERR_NOT_IMPLEMENTED);
+#else
gpgme_error_t err;
char *buf = NULL;
int res;
@@ -111,6 +114,7 @@
(*r_dh)->data.mem.length = length;
return TRACE_SUC1 ("r_dh=%p", *r_dh);
+#endif
}
@@ -119,6 +123,9 @@
gpgme_error_t
gpgme_data_new_from_file (gpgme_data_t *r_dh, const char *fname, int copy)
{
+#if defined (HAVE_W32CE_SYSTEM) && defined (_MSC_VER)
+ return gpgme_error (GPG_ERR_NOT_IMPLEMENTED);
+#else
gpgme_error_t err;
struct stat statbuf;
TRACE_BEG3 (DEBUG_DATA, "gpgme_data_new_from_filepart", r_dh,
@@ -132,6 +139,7 @@
err = gpgme_data_new_from_filepart (r_dh, fname, NULL, 0, statbuf.st_size);
return TRACE_ERR (err);
+#endif
}
Modified: trunk/src/w32-ce.h
===================================================================
--- trunk/src/w32-ce.h 2010-11-04 08:16:57 UTC (rev 1500)
+++ trunk/src/w32-ce.h 2010-11-15 08:40:30 UTC (rev 1501)
@@ -32,7 +32,6 @@
#include <ws2tcpip.h> /* For getaddrinfo. */
#include <windows.h>
-
#define getenv _gpgme_wince_getenv
char *getenv (const char *name);
@@ -75,11 +74,16 @@
int (*compar) (const void *, const void *));
#define bsearch(a,b,c,d,e) _gpgme_wince_bsearch ((a),(b),(c),(d),(e))
-/* Remove the redefined __leave keyword. It is defined by MSC for W32
- in excpt.h and not in sehmap.h as for the plain windows
- version. */
-#if defined(_MSC_VER) && defined(HAVE_W32CE_SYSTEM)
+#if defined(_MSC_VER)
+ /* Remove the redefined __leave keyword. It is defined by MSC for
+ W32 in excpt.h and not in sehmap.h as for the plain windows
+ version. */
# undef leave
+# define HKEY_PERFORMANCE_DATA ((HKEY)0x80000004)
+# define HKEY_CURRENT_CONFIG ((HKEY)0x80000005)
+ /* Replace the Mingw32CE provided abort function. */
+# define abort() do { TerminateProcess (GetCurrentProcess(), 8); } while (0)
+# define _IOLBF 0x40
#endif
#endif /* GPGME_W32_CE_H */
More information about the Gnupg-commits
mailing list