Fri Jul 15 18:56:06 PDT 2005
- Previous message: [Slony1-commit] By darcyb: Add test case to allow FreBSD 5+ to use the prefered
- Next message: [Slony1-commit] By dpage: Fix configure to find the appropriate pthread library on
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Change ddl_fd tobe a FILE * instead of a int, fgets takes FILE * as it's 3rd arcg not an int. This error came to light during a compile on FreeBSD 5.x on amd64
Modified Files:
--------------
slony1-engine/src/slonik:
parser.y (r1.22 -> r1.23)
slonik.c (r1.44 -> r1.45)
slonik.h (r1.23 -> r1.24)
-------------- next part --------------
Index: slonik.h
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/slonik.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -Lsrc/slonik/slonik.h -Lsrc/slonik/slonik.h -u -w -r1.23 -r1.24
--- src/slonik/slonik.h
+++ src/slonik/slonik.h
@@ -402,7 +402,7 @@
char *ddl_fname;
int ev_origin;
int only_on_node;
- int ddl_fd;
+ FILE *ddl_fd;
};
Index: parser.y
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/parser.y,v
retrieving revision 1.22
retrieving revision 1.23
diff -Lsrc/slonik/parser.y -Lsrc/slonik/parser.y -u -w -r1.22 -r1.23
--- src/slonik/parser.y
+++ src/slonik/parser.y
@@ -1346,7 +1346,7 @@
new->ddl_fname = opt[1].str;
new->ev_origin = opt[2].ival;
new->only_on_node = opt[3].ival;
- new->ddl_fd = -1;
+ new->ddl_fd = NULL;
}
else
parser_errors++;
Index: slonik.c
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/slonik/slonik.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -Lsrc/slonik/slonik.c -Lsrc/slonik/slonik.c -u -w -r1.44 -r1.45
--- src/slonik/slonik.c
+++ src/slonik/slonik.c
@@ -1097,8 +1097,8 @@
if (script_check_adminfo(hdr, stmt->ev_origin) < 0)
errors++;
- stmt->ddl_fd = open(stmt->ddl_fname, O_RDONLY);
- if (stmt->ddl_fd < 0)
+ stmt->ddl_fd = fopen(stmt->ddl_fname, "r");
+ if (stmt->ddl_fd == NULL )
{
printf("%s:%d: Error: "
"%s - %s\n",
@@ -3808,7 +3808,7 @@
sprintf(rex2, "\"_%s\"", stmt->hdr.script->clustername);
- while (fgets(rex1,256, (FILE*)stmt->ddl_fd) != NULL)
+ while (fgets(rex1,256, stmt->ddl_fd) != NULL)
{
rc = strlen(rex1);
rex1[rc] = '\0';
- Previous message: [Slony1-commit] By darcyb: Add test case to allow FreBSD 5+ to use the prefered
- Next message: [Slony1-commit] By dpage: Fix configure to find the appropriate pthread library on
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list