1
0
mirror of https://github.com/GOSTSec/ccminer synced 2025-01-22 04:24:29 +00:00

some changes to prepare 1.8 and VS2015 support

also move vstudio specific cpuminer-config.h in compat/
This commit is contained in:
Tanguy Pruvot 2016-05-26 06:00:48 +02:00
parent 1b124720fe
commit a7905e6802
14 changed files with 50 additions and 36 deletions

4
.gitignore vendored
View File

@ -15,7 +15,7 @@ depcomp
missing
install-sh
stamp-h1
cpuminer-config.h*
ccminer-config.h*
compile
config.log
config.status
@ -41,6 +41,8 @@ x64/Release/
*.opensdf
*.sdf
*.pdb
*.VC.opendb
*.VC.db
.settings/
.project

View File

@ -9,7 +9,7 @@ endif
EXTRA_DIST = autogen.sh README.md README.txt LICENSE.txt \
ccminer.sln ccminer.vcxproj ccminer.vcxproj.filters \
compat/gettimeofday.c compat/getopt/getopt_long.c cpuminer-config.h.in
compat/gettimeofday.c compat/getopt/getopt_long.c
SUBDIRS = compat

View File

@ -9,7 +9,7 @@
* any later version. See COPYING for more details.
*/
#include "cpuminer-config.h"
#include <ccminer-config.h>
#include <stdio.h>
#include <stdlib.h>
@ -3244,7 +3244,7 @@ int main(int argc, char *argv[])
printf("*** ccminer " PACKAGE_VERSION " for nVidia GPUs by tpruvot@github ***\n");
#ifdef _MSC_VER
printf(" Built with VC++ 2013 and nVidia CUDA SDK %d.%d\n\n",
printf(" Built with VC++ %d and nVidia CUDA SDK %d.%d\n\n", msver(),
#else
printf(" Built with the nVidia CUDA Toolkit %d.%d\n\n",
#endif

View File

@ -23,22 +23,19 @@
<RootNamespace>ccminer</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<PropertyGroup Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
<CLRSupport>false</CLRSupport>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" Condition="'$(Platform)'=='Win32'">
@ -227,6 +224,7 @@
<ClCompile Include="compat\jansson\strconv.c" />
<ClCompile Include="compat\jansson\utf.c" />
<ClCompile Include="compat\jansson\value.c" />
<ClInclude Include="compat\pthreads\pthread.h" />
<ClCompile Include="compat\winansi.c" />
<ClCompile Include="ccminer.cpp">
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
@ -310,7 +308,7 @@
<ClInclude Include="compat\sys\time.h" />
<ClInclude Include="compat\unistd.h" />
<ClInclude Include="compat\winansi.h" />
<ClInclude Include="cpuminer-config.h" />
<ClInclude Include="compat\ccminer-config.h" />
<ClInclude Include="cuda_groestlcoin.h" />
<ClInclude Include="cuda_helper.h" />
<ClInclude Include="cuda_vector_uint2x4.h" />

View File

@ -219,6 +219,9 @@
<ClCompile Include="compat\jansson\error.c">
<Filter>Source Files\jansson</Filter>
</ClCompile>
<ClInclude Include="compat\pthreads\pthread.h">
<Filter>Header Files\compat</Filter>
</ClInclude>
<ClCompile Include="lyra2\Lyra2.c">
<Filter>Source Files\sph</Filter>
</ClCompile>
@ -267,7 +270,7 @@
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="compat.h">
<Filter>Header Files</Filter>
<Filter>Header Files\compat</Filter>
</ClInclude>
<ClInclude Include="elist.h">
<Filter>Header Files</Filter>
@ -290,8 +293,8 @@
<ClInclude Include="compat\stdbool.h">
<Filter>Header Files\compat</Filter>
</ClInclude>
<ClInclude Include="cpuminer-config.h">
<Filter>Header Files</Filter>
<ClInclude Include="compat\ccminer-config.h">
<Filter>Header Files\compat</Filter>
</ClInclude>
<ClInclude Include="uint256.h">
<Filter>Header Files</Filter>

View File

@ -51,6 +51,17 @@ static __inline int setpriority(int which, int who, int prio)
#define strcasecmp(x,y) _stricmp(x,y)
typedef int ssize_t;
__inline int msver(void) {
switch (_MSC_VER) {
case 1500: return 2008;
case 1600: return 2010;
case 1700: return 2012;
case 1800: return 2013;
case 1900: return 2015;
default: return (_MSC_VER/100);
}
}
#include <stdlib.h>
static __inline char * dirname(char *file) {
char buffer[_MAX_PATH] = { 0 };

View File

@ -1,5 +1,4 @@
/* cpuminer-config.h. Generated from cpuminer-config.h.in by configure. */
/* cpuminer-config.h.in. Generated from configure.ac by autoheader. */
/* CONFIG ONLY FOR MS VC++ BUILD */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
@ -161,17 +160,11 @@
/* Define to the full name of this package. */
#define PACKAGE_NAME "ccminer"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "ccminer 1.7.6"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "ccminer"
/* Define to the home page for this package. */
#define PACKAGE_URL "http://github.com/tpruvot/ccminer"
/* Define to the version of this package. */
#define PACKAGE_VERSION "1.7.6"
#define PACKAGE_VERSION "1.8-dev"
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
@ -184,11 +177,12 @@
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Version number of package */
#define VERSION "1.7.6"
/* Define curl_free() as free() if our version of curl lacks curl_free. */
/* #undef curl_free */
/* Define to `unsigned int' if <sys/types.h> does not define. */
//#define size_t unsigned int
#if !defined(HAVE_STRUCT_TIMESPEC) && _MSC_VER >= 1900
#define HAVE_STRUCT_TIMESPEC
#endif

View File

@ -23,6 +23,9 @@
#ifdef _MSC_VER
#define inline __inline
#if !defined(HAVE_STRUCT_TIMESPEC) && _MSC_VER >= 1900
#define HAVE_STRUCT_TIMESPEC
#endif
#endif
#ifdef __cplusplus

View File

@ -37,6 +37,10 @@
#if !defined( PTHREAD_H )
#define PTHREAD_H
#if !defined(HAVE_STRUCT_TIMESPEC) && _MSC_VER >= 1900
#define HAVE_STRUCT_TIMESPEC
#endif
/*
* See the README file for an explanation of the pthreads-win32 version
* numbering scheme and how the DLL is named etc.

View File

@ -1,10 +1,10 @@
AC_INIT([ccminer], [1.7.6], [], [ccminer], [http://github.com/tpruvot/ccminer])
AC_INIT([ccminer], [1.8-dev], [], [ccminer], [http://github.com/tpruvot/ccminer])
AC_PREREQ([2.59c])
AC_CANONICAL_SYSTEM
AC_CONFIG_SRCDIR([ccminer.cpp])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_HEADERS([cpuminer-config.h])
AC_CONFIG_HEADERS([ccminer-config.h])
dnl Make sure anyone changing configure.ac/Makefile.am has a clue
AM_MAINTAINER_MODE

View File

@ -5,7 +5,7 @@
extern "C" {
#endif
#include "cpuminer-config.h"
#include <ccminer-config.h>
#include <stdbool.h>
#include <inttypes.h>

View File

@ -60,8 +60,8 @@ IDI_ICON1 ICON "ccminer.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,7,6,0
PRODUCTVERSION 1,7,6,0
FILEVERSION 1,8,0,0
PRODUCTVERSION 1,8,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x21L
@ -76,10 +76,10 @@ BEGIN
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "FileVersion", "1.7.6"
VALUE "FileVersion", "1.8.rc"
VALUE "LegalCopyright", "Copyright (C) 2016"
VALUE "ProductName", "ccminer"
VALUE "ProductVersion", "1.7.6"
VALUE "ProductVersion", "1.8.rc"
END
END
BLOCK "VarFileInfo"

View File

@ -8,7 +8,6 @@
* any later version. See COPYING for more details.
*/
#include "cpuminer-config.h"
#include "miner.h"
#include <string.h>

View File

@ -10,7 +10,7 @@
*/
//#define _GNU_SOURCE
#include "cpuminer-config.h"
#include <ccminer-config.h>
#include <stdio.h>
#include <stdlib.h>