@@ -26,14 +26,15 @@ static void check_for_reg_data_type_usage(migratorContext *ctx, Cluster whichClu
2626 * such as is suitable for arguments to builtin commands
2727 * like RMDIR and DEL.
2828 */
29- static char * fix_path_separator (char * path )
29+ static char *
30+ fix_path_separator (migratorContext * ctx ,char * path )
3031{
3132#ifdef WIN32
3233
3334char * result ;
3435char * c ;
3536
36- result = pg_strdup (path );
37+ result = pg_strdup (ctx , path );
3738
3839for (c = result ;* c != '\0' ;c ++ )
3940if (* c == '/' )
@@ -431,7 +432,7 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
431432#endif
432433
433434/* delete old cluster's default tablespace */
434- fprintf (script ,RMDIR_CMD " %s\n" ,fix_path_separator (ctx -> old .pgdata ));
435+ fprintf (script ,RMDIR_CMD " %s\n" ,fix_path_separator (ctx , ctx -> old .pgdata ));
435436
436437/* delete old cluster's alternate tablespaces */
437438for (tblnum = 0 ;tblnum < ctx -> num_tablespaces ;tblnum ++ )
@@ -449,15 +450,15 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
449450/* remove PG_VERSION? */
450451if (GET_MAJOR_VERSION (ctx -> old .major_version ) <=804 )
451452fprintf (script ,RM_CMD " %s%s%cPG_VERSION\n" ,
452- fix_path_separator (ctx -> tablespaces [tblnum ]),
453- fix_path_separator (ctx -> old .tablespace_suffix ),
453+ fix_path_separator (ctx , ctx -> tablespaces [tblnum ]),
454+ fix_path_separator (ctx , ctx -> old .tablespace_suffix ),
454455PATH_SEPARATOR );
455456
456457for (dbnum = 0 ;dbnum < ctx -> new .dbarr .ndbs ;dbnum ++ )
457458{
458459fprintf (script ,RMDIR_CMD " %s%s%c%d\n" ,
459- fix_path_separator (ctx -> tablespaces [tblnum ]),
460- fix_path_separator (ctx -> old .tablespace_suffix ),
460+ fix_path_separator (ctx , ctx -> tablespaces [tblnum ]),
461+ fix_path_separator (ctx , ctx -> old .tablespace_suffix ),
461462PATH_SEPARATOR ,ctx -> old .dbarr .dbs [dbnum ].db_oid );
462463}
463464}
@@ -468,8 +469,8 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
468469 * or a version-specific subdirectory.
469470 */
470471fprintf (script ,RMDIR_CMD " %s%s\n" ,
471- fix_path_separator (ctx -> tablespaces [tblnum ]),
472- fix_path_separator (ctx -> old .tablespace_suffix ));
472+ fix_path_separator (ctx , ctx -> tablespaces [tblnum ]),
473+ fix_path_separator (ctx , ctx -> old .tablespace_suffix ));
473474}
474475
475476fclose (script );