Skip to content
This repository has been archived by the owner on Feb 20, 2021. It is now read-only.

Commit

Permalink
Remove pthread dependency, Add copyright.
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryRawas committed Apr 26, 2012
1 parent ce2b309 commit 2b28fa1
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 5 deletions.
10 changes: 5 additions & 5 deletions msvs/RedisServer.sln
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RedisServer", "RedisServer.vcxproj", "{07369961-4B20-6DE7-6FFC-973CAEBC7A28}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RedisServer", "RedisServer.vcxproj", "{0C9DC382-C99F-7BF1-C6EF-96ED4C7CA003}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hiredis", "hiredis\hiredis.vcxproj", "{13E85053-54B3-487B-8DDB-3430B1C1B3BF}"
EndProject
Expand All @@ -25,10 +25,10 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{07369961-4B20-6DE7-6FFC-973CAEBC7A28}.Debug|Win32.ActiveCfg = Debug|Win32
{07369961-4B20-6DE7-6FFC-973CAEBC7A28}.Debug|Win32.Build.0 = Debug|Win32
{07369961-4B20-6DE7-6FFC-973CAEBC7A28}.Release|Win32.ActiveCfg = Release|Win32
{07369961-4B20-6DE7-6FFC-973CAEBC7A28}.Release|Win32.Build.0 = Release|Win32
{0C9DC382-C99F-7BF1-C6EF-96ED4C7CA003}.Debug|Win32.ActiveCfg = Debug|Win32
{0C9DC382-C99F-7BF1-C6EF-96ED4C7CA003}.Debug|Win32.Build.0 = Debug|Win32
{0C9DC382-C99F-7BF1-C6EF-96ED4C7CA003}.Release|Win32.ActiveCfg = Release|Win32
{0C9DC382-C99F-7BF1-C6EF-96ED4C7CA003}.Release|Win32.Build.0 = Release|Win32
{13E85053-54B3-487B-8DDB-3430B1C1B3BF}.Debug|Win32.ActiveCfg = Debug|Win32
{13E85053-54B3-487B-8DDB-3430B1C1B3BF}.Debug|Win32.Build.0 = Debug|Win32
{13E85053-54B3-487B-8DDB-3430B1C1B3BF}.Release|Win32.ActiveCfg = Release|Win32
Expand Down
15 changes: 15 additions & 0 deletions src/win32_bksv.c
@@ -1,3 +1,18 @@
/*
* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0.
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE,
* FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
*
* See the Apache License, Version 2.0 for specific language governing
* permissions and limitations under the License.
*/

#include "redis.h"
#include "win32_wsiocp.h"
Expand Down
16 changes: 16 additions & 0 deletions src/win32_bksv.h
@@ -1,3 +1,19 @@
/*
* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0.
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE,
* FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
*
* See the Apache License, Version 2.0 for specific language governing
* permissions and limitations under the License.
*/

#ifndef __W32BKSAV_H__
#define __W32BKSAV_H__

Expand Down
16 changes: 16 additions & 0 deletions src/win32_cow.c
@@ -1,3 +1,19 @@
/*
* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0.
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE,
* FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
*
* See the Apache License, Version 2.0 for specific language governing
* permissions and limitations under the License.
*/

/************************************************************************
* This module implements copy on write to support
* saving on a background thread in Windows.
Expand Down
16 changes: 16 additions & 0 deletions src/win32_cow.h
@@ -1,3 +1,19 @@
/*
* Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0.
*
* THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
* WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE,
* FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
*
* See the Apache License, Version 2.0 for specific language governing
* permissions and limitations under the License.
*/

#ifdef _WIN32
/************************************************************************
* This module defines copy on write to support
Expand Down
19 changes: 19 additions & 0 deletions src/win32fixes.c
Expand Up @@ -44,6 +44,25 @@ int w32initWinSock(void) {
return 1;
}

/* Placeholder for terminating forked process. */
/* fork() is nonexistatn on windows, background cmds are todo */
int w32CeaseAndDesist(pid_t pid) {

HANDLE h = OpenProcess(PROCESS_TERMINATE, FALSE, pid);

/* invalid process; no access rights; etc */
if (h == NULL)
return errno = EINVAL;

if (!TerminateProcess(h, 127))
return errno = EINVAL;

errno = WaitForSingleObject(h, INFINITE);
CloseHandle(h);

return 0;
}

/* Behaves as posix, works without ifdefs, makes compiler happy */
int sigaction(int sig, struct sigaction *in, struct sigaction *out) {
REDIS_NOTUSED(out);
Expand Down
1 change: 1 addition & 0 deletions src/win32fixes.h
Expand Up @@ -270,6 +270,7 @@ int kill(pid_t pid, int sig);
int fsync (int fd);
pid_t wait3(int *stat_loc, int options, void *rusage);

int w32CeaseAndDesist(pid_t pid);
int w32initWinSock(void);
/* int inet_aton(const char *cp_arg, struct in_addr *addr) */

Expand Down

0 comments on commit 2b28fa1

Please sign in to comment.