+2010-11-15 Werner Koch <wk@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@g10code.com>
* conf-w32ce-msc/build.mk (copy-built-source): Revert last
gpgme.h \
status-table.h
+my_stdint = $(targetsrc)/libassuan/src/stdint.h
copy-static-source:
@if [ ! -f ./gpgme.c ]; then \
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 \
$(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
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
+
+2010-11-15 Werner Koch <wk@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@g10code.com>
* w32-ce.h [_MSC_VER && W32CE]: Undef leave.
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
}
/* 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>
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;
(*r_dh)->data.mem.length = length;
return TRACE_SUC1 ("r_dh=%p", *r_dh);
+#endif
}
\f
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,
err = gpgme_data_new_from_filepart (r_dh, fname, NULL, 0, statbuf.st_size);
return TRACE_ERR (err);
+#endif
}
\f
#include <ws2tcpip.h> /* For getaddrinfo. */
#include <windows.h>
-
#define getenv _gpgme_wince_getenv
char *getenv (const char *name);
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 */