Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Win64 #1

Merged
merged 2 commits into from
Aug 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions rfunc/rfunc.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rfunc", "rfunc.vcxproj", "{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Debug|x64.ActiveCfg = Debug|x64
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Debug|x64.Build.0 = Debug|x64
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Debug|x86.ActiveCfg = Debug|Win32
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Debug|x86.Build.0 = Debug|Win32
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Release|x64.ActiveCfg = Release|x64
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Release|x64.Build.0 = Release|x64
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Release|x86.ActiveCfg = Release|Win32
{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
190 changes: 190 additions & 0 deletions rfunc/rfunc.vcxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\source\myfunc.c" />
<ClCompile Include="..\source\rblob.c" />
<ClCompile Include="..\source\rcalc.c" />
<ClCompile Include="..\source\rdatetime.c" />
<ClCompile Include="..\source\rfile.c" />
<ClCompile Include="..\source\rfunc.c" />
<ClCompile Include="..\source\rmath.c" />
<ClCompile Include="..\source\rmd5c.c" />
<ClCompile Include="..\source\rmisc.c" />
<ClCompile Include="..\source\rsecurity.c" />
<ClCompile Include="..\source\rstring.c" />
<ClCompile Include="..\source\win1251.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\source\rblob.h" />
<ClInclude Include="..\source\rcalc.h" />
<ClInclude Include="..\source\rdatetime.h" />
<ClInclude Include="..\source\rfile.h" />
<ClInclude Include="..\source\rfunc.h" />
<ClInclude Include="..\source\rmath.h" />
<ClInclude Include="..\source\rmd5.h" />
<ClInclude Include="..\source\rmisc.h" />
<ClInclude Include="..\source\rsecurity.h" />
<ClInclude Include="..\source\rstring.h" />
<ClInclude Include="..\source\win1251.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\source\rfunc.def" />
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B837C0B1-DDA5-4CE1-B1FC-F60C351486EC}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>rfunc</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;RFUNC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>
</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>RUSE_DATETIME;IB_6X;_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;RFUNC_EXPORTS</PreprocessorDefinitions>
<AdditionalIncludeDirectories>J:\Program Files\Firebird\Firebird_2_5\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>ib_util_ms.lib;fbclient_ms.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>J:\Program Files\Firebird\Firebird_2_5\lib</AdditionalLibraryDirectories>
<ModuleDefinitionFile>$(ProjectDir)..\source\rfunc.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;RFUNC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>RUSE_DATETIME;IB_6X;_CRT_SECURE_NO_WARNINGS;NDEBUG;_WINDOWS;_USRDLL;RFUNC_EXPORTS</PreprocessorDefinitions>
<AdditionalIncludeDirectories>J:\Program Files\Firebird\Firebird_2_5\include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>J:\Program Files\Firebird\Firebird_2_5\lib</AdditionalLibraryDirectories>
<AdditionalDependencies>ib_util_ms.lib;fbclient_ms.lib;%(AdditionalDependencies)</AdditionalDependencies>
<ModuleDefinitionFile>$(ProjectDir)..\source\rfunc.def</ModuleDefinitionFile>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
95 changes: 95 additions & 0 deletions rfunc/rfunc.vcxproj.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\source\myfunc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rblob.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rcalc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rdatetime.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rfile.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rfunc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rmath.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rmd5c.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rmisc.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rsecurity.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\rstring.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\source\win1251.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\source\rblob.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rcalc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rdatetime.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rfile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rfunc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rmath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rmd5.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rmisc.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rsecurity.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\rstring.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\source\win1251.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\source\rfunc.def">
<Filter>Source Files</Filter>
</None>
</ItemGroup>
</Project>
4 changes: 4 additions & 0 deletions source/rfunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@

#include <ibase.h>

#if defined _MSC_VER && defined _WIN64
#define WIN32
#endif

#if defined __STDC__ || defined __BORLANDC__ || defined _MSC_VER
#define PROTO(args) args
#define ARG(type, arg) type arg
Expand Down
12 changes: 10 additions & 2 deletions source/rmath.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@
$Revision$ $Author$
$Date$
**************************************************************************/
#define _USE_MATH_DEFINES
#include <stdlib.h>
#include <math.h>
#include <stdio.h>

#include "rfunc.h"
#include "rmath.h"

#if defined _MSC_VER
#define random() rand()
#define srandom(i) srand(i)
#else
#define _FALLBACK_RANDOMIZE
#endif

double EXPORT fn_abs(ARG(double*, x))
ARGLIST(double *x)
{
Expand Down Expand Up @@ -128,7 +136,7 @@ ARGLIST(double *def)
long EXPORT fn_initRandom(ARG(long *, num))
ARGLIST(long* num)
{
#if defined WIN32
#if defined _FALLBACK_RANDOMIZE
#pragma warn -8057
randomize();
#else
Expand All @@ -140,7 +148,7 @@ ARGLIST(long* num)
long EXPORT fn_getRandom(ARG(long *, num))
ARGLIST(long* num)
{
#if defined WIN32
#if defined _FALLBACK_RANDOMIZE
return random(*num);
#else
div_t x;
Expand Down
6 changes: 3 additions & 3 deletions source/rmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ long EXPORT fn_msgbox(ARG(char*, lpText), ARG(char*, lpCaption), ARG(long*, Flag
ARGLIST(char *lpText)
ARGLIST(char *lpCaption)
ARGLIST(long *Flags)
{ return MessageBox(NULL, lpText, lpCaption, *Flags); }
{ return MessageBoxA(NULL, lpText, lpCaption, *Flags); }
#endif

short EXPORT fn_ean13cs(ARG(char*, s))
ARGLIST(char *s)
{
long i = strlen(s);
size_t i = strlen(s);
long c = 0, a;

if (i != 12 || atoi(s) == 0) return -1;
Expand All @@ -117,7 +117,7 @@ ARGLIST(char *s)
short EXPORT fn_bccheckdigit(ARG(char*, s))
ARGLIST(char *s)
{
long i = strlen(s);
size_t i = strlen(s);
long c = 0, a, j;

for (j = 0; j < i; j++ )
Expand Down
Loading