Skip to content

Commit

Permalink
PP-382: Support for Postgres-9.3.12 on Windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
gajendrasharmagit committed Aug 2, 2016
1 parent 4b6a921 commit 0217561
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 75 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ src/lib/Libpbs/ecl_resc_def_all.c
src/lib/Libpbs/ecl_resv_attr_def.c
src/lib/Libpbs/ecl_sched_attr_def.c
src/lib/Libpbs/ecl_svr_attr_def.c
src/include/stamp-h1
src/lib/Libpython/pbs_ifl.i
src/lib/Libpython/pbs_ifl.py
src/lib/Libpython/pbs_ifl_wrap.c

#Generated source files - Windows
src/lib/Libecl/ecl_node_attr_def.c
Expand Down
3 changes: 2 additions & 1 deletion src/include/pbs_version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ extern "C" {
*/

#ifdef WIN32
#include "pbs_version_win.h"
#define PBS_BUILD "mach=WIN32:security=:configure_args="
#define PBS_VERSION "@PBS_WIN_VERSION@"
#else
#include <pbs_config.h>

Expand Down
5 changes: 0 additions & 5 deletions src/tools/printjob.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@

#define PBS_MOM 1 /* this is so we can use the task struct */

#ifdef PRINTJOBSVR
#ifdef WIN32
#undef pid_t
#endif
#endif
#include "cmds.h"
#include "pbs_version.h"
#include "portability.h"
Expand Down
57 changes: 0 additions & 57 deletions win_configure/include/pbs_version_win.h

This file was deleted.

23 changes: 11 additions & 12 deletions win_configure/projects.VS2008/gen_pbs_version.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@echo off
REM this genereates the pbs_version.h file.


REM exit if pbs_version.h exists
if exist "..\..\src\include\pbs_version.h" (
goto :eof
Expand All @@ -17,22 +16,22 @@ REM find pbs_version from pbspro.spec
set pbs_specfile= ..\..\pbspro.spec
for /F "tokens=3 USEBACKQ" %%F IN (`findstr /l /c:" pbs_version " %pbs_specfile%`) DO (
set var=%%F
set pbs_ver=PBSPro_%var%
set pbs_ver=%var%
)
REM replace PBS_VERSION placeholder value(PBSPro_10.0)
REM defined in pbs_version_win.h with pbs_ver
set oldfile="..\include\pbs_version_win.h"
set searchstr=PBSPro_10.0
set repstr=PBSPro_%var%
if exist "..\include\temp_pbs_version_win.h" (
del /f /q "..\include\temp_pbs_version_win.h"
REM replace PBS_VERSION placeholder value(@PBS_WIN_VERSION@)
REM defined in pbs_version.h with pbs_ver
set oldfile="..\..\src\include\pbs_version.h"
set searchstr=@PBS_WIN_VERSION@
set repstr=%var%
if exist "..\include\temp_pbs_version.h" (
del /f /q "..\include\temp_pbs_version.h"
)
for /f "tokens=1,* delims=]" %%A in ('"type %oldfile%|find /n /v """') do (
set "line=%%B"
if defined line (
call set "line=echo.%%line:%searchstr%=%repstr%%%"
for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X >> ..\include\temp_pbs_version_win.h"
for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X >> ..\include\temp_pbs_version.h"
) ELSE echo.
)
copy "..\include\temp_pbs_version_win.h" "..\include\pbs_version_win.h"
del /f /q "..\include\temp_pbs_version_win.h"
copy "..\include\temp_pbs_version.h" ="..\..\src\include\pbs_version.h"
del /f /q "..\include\temp_pbs_version.h"

0 comments on commit 0217561

Please sign in to comment.