Browse Source

Updated for MSVC build

Added some conditionals, fixed vcprojects to include added source files,

updated build_headers.bat to hopefully make it less fragile,
changed a few declarations from middle of function to beginning (c
standard)
dvh-chacham15-master
Cuisinart 9 years ago
parent
commit
e3e1211e39
11 changed files with 159 additions and 11 deletions
  1. +2
    -1
      build-windows/build_headers.bat
  2. +9
    -0
      build-windows/libetpan-config.h
  3. +3
    -0
      build-windows/libetpan.sln
  4. +128
    -4
      build-windows/libetpan/libetpan.vcproj
  5. +1
    -0
      build-windows/readmsg/readmsg.vcproj
  6. +1
    -0
      build-windows/smtpsend/smtpsend.vcproj
  7. +1
    -0
      build-windows/stdbool.h
  8. +2
    -0
      src/data-types/mailstream_cfstream.c
  9. +1
    -1
      src/low-level/imap/mailimap_id.h
  10. +6
    -4
      src/low-level/imap/mailimap_sort.c
  11. +5
    -1
      tests/option-parser.c

+ 2
- 1
build-windows/build_headers.bat View File

@ -1,4 +1,5 @@
@mkdir include
@mkdir include\libetpan
@for /F "eol=" %%i in (build_headers.list) do @copy "%%i" include\libetpan
@for /R ..\src\ %%x in (*.h) do @copy "%%x" include\libetpan
@for %%x in (*.h) do @copy "%%x" include\libetpan
@echo "done" >_headers_depends

+ 9
- 0
build-windows/libetpan-config.h View File

@ -35,6 +35,9 @@
# endif
/* use Windows Types */
# if !defined(uint8_t)
typedef UINT8 uint8_t;
# endif
# if !defined(ssize_t)
typedef SSIZE_T ssize_t;
# endif
@ -50,6 +53,12 @@
# if !defined(int32_t)
typedef INT32 int32_t;
# endif
# if !defined(uint64_t)
typedef UINT64 uint64_t;
# endif
# if !defined(int64_t)
typedef INT64 int64_t;
# endif
# if !defined(pid_t)
typedef DWORD pid_t;
# endif


+ 3
- 0
build-windows/libetpan.sln View File

@ -8,6 +8,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "readmsg", "readmsg\readmsg.
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smtpsend", "smtpsend\smtpsend.vcproj", "{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}"
ProjectSection(ProjectDependencies) = postProject
{BA4DED3C-E56F-4484-BFC3-9C13E461A1BE} = {BA4DED3C-E56F-4484-BFC3-9C13E461A1BE}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution


+ 128
- 4
build-windows/libetpan/libetpan.vcproj View File

@ -678,6 +678,10 @@
RelativePath="..\..\src\data-types\mailstream_cfstream.c"
>
</File>
<File
RelativePath="..\..\src\data-types\mailstream_compress.c"
>
</File>
<File
RelativePath="..\..\src\data-types\mailstream_helper.c"
>
@ -782,25 +786,29 @@
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace.c"
RelativePath="..\..\src\low-level\imap\condstore.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace_parser.c"
RelativePath="..\..\src\low-level\imap\condstore_types.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace_sender.c"
RelativePath="..\..\src\low-level\imap\enable.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace_types.c"
RelativePath="..\..\src\low-level\imap\idle.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_compress.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_extension.c"
>
@ -809,6 +817,22 @@
RelativePath="..\..\src\low-level\imap\mailimap_helper.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_id.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_id_parser.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_id_sender.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_id_types.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_keywords.c"
>
@ -829,6 +853,14 @@
RelativePath="..\..\src\low-level\imap\mailimap_socket.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_sort.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_sort_types.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\mailimap_ssl.c"
>
@ -841,6 +873,30 @@
RelativePath="..\..\src\low-level\imap\mailimap_types_helper.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace_parser.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace_sender.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\namespace_types.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\qresync.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\qresync_types.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\quota.c"
>
@ -877,6 +933,14 @@
RelativePath="..\..\src\low-level\imap\xgmlabels.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\xgmmsgid.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\xgmthrid.c"
>
</File>
<File
RelativePath="..\..\src\low-level\imap\xlist.c"
>
@ -1110,6 +1174,50 @@
>
</File>
</Filter>
<Filter
Name="feed"
>
<File
RelativePath="..\..\src\low-level\feed\date.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\newsfeed.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\newsfeed_item.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\newsfeed_item_enclosure.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\newsfeed_private.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\parser.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\parser_atom03.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\parser_atom10.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\parser_rdf.c"
>
</File>
<File
RelativePath="..\..\src\low-level\feed\parser_rss20.c"
>
</File>
</Filter>
</Filter>
<Filter
Name="driver"
@ -1465,6 +1573,22 @@
>
</File>
</Filter>
<Filter
Name="feed"
>
<File
RelativePath="..\..\src\driver\implementation\feed\feeddriver.c"
>
</File>
<File
RelativePath="..\..\src\driver\implementation\feed\feeddriver_message.c"
>
</File>
<File
RelativePath="..\..\src\driver\implementation\feed\feedstorage.c"
>
</File>
</Filter>
</Filter>
<Filter
Name="tools"


+ 1
- 0
build-windows/readmsg/readmsg.vcproj View File

@ -4,6 +4,7 @@
Version="9.00"
Name="readmsg"
ProjectGUID="{5FEA913A-5CE4-4DEB-B6BE-B8EA1BF6F653}"
RootNamespace="readmsg"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>


+ 1
- 0
build-windows/smtpsend/smtpsend.vcproj View File

@ -4,6 +4,7 @@
Version="9.00"
Name="smtpsend"
ProjectGUID="{FF9F45C9-74A0-4B4E-99E9-6ADE0EB6D8AC}"
RootNamespace="smtpsend"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>


+ 1
- 0
build-windows/stdbool.h View File

@ -0,0 +1 @@
#define false 0

+ 2
- 0
src/data-types/mailstream_cfstream.c View File

@ -41,7 +41,9 @@
#endif
#endif
#ifndef WIN32
#include <pthread.h>
#endif
#if LIBETPAN_IOS_DISABLE_SSL && HAVE_CFNETWORK
#define CFSTREAM_ENABLED_DEFAULT 1


+ 1
- 1
src/low-level/imap/mailimap_id.h View File

@ -41,7 +41,7 @@ extern "C" {
#include <libetpan/mailimap_extension.h>
#include <libetpan/mailimap_id_types.h>
extern struct mailimap_extension_api mailimap_extension_id;
LIBETPAN_EXPORT struct mailimap_extension_api mailimap_extension_id;
LIBETPAN_EXPORT
int mailimap_has_id(mailimap * session);


+ 6
- 4
src/low-level/imap/mailimap_sort.c View File

@ -61,6 +61,8 @@ mailimap_sort(mailimap * session, const char * charset,
struct mailimap_response * response;
int r;
int error_code;
clist * sort_result = NULL;
clistiter * cur = NULL;
if (session->imap_state != MAILIMAP_STATE_SELECTED)
return MAILIMAP_ERROR_BAD_STATE;
@ -87,8 +89,7 @@ mailimap_sort(mailimap * session, const char * charset,
if (r != MAILIMAP_NO_ERROR)
return r;
clist * sort_result = NULL;
clistiter * cur = NULL;
for (cur = clist_begin(session->imap_response_info->rsp_extension_list);
cur != NULL; cur = clist_next(cur)) {
struct mailimap_extension_data * ext_data;
@ -138,6 +139,8 @@ mailimap_uid_sort(mailimap * session, const char * charset,
struct mailimap_response * response;
int r;
int error_code;
clistiter * cur = NULL;
clist * sort_result = NULL;
if (session->imap_state != MAILIMAP_STATE_SELECTED)
return MAILIMAP_ERROR_BAD_STATE;
@ -164,8 +167,7 @@ mailimap_uid_sort(mailimap * session, const char * charset,
if (r != MAILIMAP_NO_ERROR)
return r;
clistiter * cur = NULL;
clist * sort_result = NULL;
for (cur = clist_begin(session->imap_response_info->rsp_extension_list);
cur != NULL; cur = clist_next(cur)) {
struct mailimap_extension_data * ext_data;


+ 5
- 1
tests/option-parser.c View File

@ -1,5 +1,9 @@
#define _GNU_SOURCE
#include "../config.h.in"
#ifdef HAVE_CONFIG_H
#include "../config.h.in" //this should be conditional for win builds.
#endif
#ifdef _MSC_VER
# include "../src/bsd/getopt.h"
#else


Loading…
Cancel
Save