Fixes for the MSC build
This commit is contained in:
parent
44b2702258
commit
eef49ef417
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -209,6 +209,7 @@ built_sources = \
|
||||
gpgme.h \
|
||||
status-table.h
|
||||
|
||||
my_stdint = $(targetsrc)/libassuan/src/stdint.h
|
||||
|
||||
copy-static-source:
|
||||
@if [ ! -f ./gpgme.c ]; then \
|
||||
@ -218,6 +219,14 @@ copy-static-source:
|
||||
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 @@ all: $(sources) $(conf_sources) $(built_sources) $(objs)
|
||||
$(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 @@ install: all
|
||||
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
|
||||
|
||||
|
@ -1,3 +1,17 @@
|
||||
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.
|
||||
|
@ -128,14 +128,22 @@ ath_mutex_unlock (ath_mutex_t *lock)
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -43,6 +43,9 @@ gpgme_error_t
|
||||
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 @@ gpgme_data_new_from_filepart (gpgme_data_t *r_dh, const char *fname,
|
||||
(*r_dh)->data.mem.length = length;
|
||||
|
||||
return TRACE_SUC1 ("r_dh=%p", *r_dh);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -119,6 +123,9 @@ gpgme_data_new_from_filepart (gpgme_data_t *r_dh, const char *fname,
|
||||
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 @@ gpgme_data_new_from_file (gpgme_data_t *r_dh, const char *fname, int copy)
|
||||
|
||||
err = gpgme_data_new_from_filepart (r_dh, fname, NULL, 0, statbuf.st_size);
|
||||
return TRACE_ERR (err);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
14
src/w32-ce.h
14
src/w32-ce.h
@ -32,7 +32,6 @@ typedef int pid_t;
|
||||
#include <ws2tcpip.h> /* For getaddrinfo. */
|
||||
#include <windows.h>
|
||||
|
||||
|
||||
#define getenv _gpgme_wince_getenv
|
||||
char *getenv (const char *name);
|
||||
|
||||
@ -75,11 +74,16 @@ void *_gpgme_wince_bsearch (const void *key, const void *base,
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user