Permalink
Browse files

Remove pthread dependency, Add copyright.

  • Loading branch information...
1 parent ce2b309 commit 2b28fa1207565715cf64eb18844466ec1d208f78 @HenryRawas HenryRawas committed Apr 24, 2012
Showing with 88 additions and 5 deletions.
  1. +5 −5 msvs/RedisServer.sln
  2. +15 −0 src/win32_bksv.c
  3. +16 −0 src/win32_bksv.h
  4. +16 −0 src/win32_cow.c
  5. +16 −0 src/win32_cow.h
  6. +19 −0 src/win32fixes.c
  7. +1 −0 src/win32fixes.h
View
@@ -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
@@ -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
View
@@ -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"
View
@@ -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__
View
@@ -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.
View
@@ -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
View
@@ -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);
View
@@ -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) */

0 comments on commit 2b28fa1

Please sign in to comment.