Bruce Momjian <pgman@candle.pha.pa.us> writes:
> -
> - typedef uint32 IpcMemoryKey;    /* shared memory key passed to shmget(2) */
IpcMemoryKey is a SysV-specific typedef and has *no* business being
moved out of the sysv-specific port file.  Once again I urge you to
consider making a Windows-specific shmem port file, instead of tromping
all over the Unix code in order to support an API that Windows doesn't
like in the first place :-(
> !     /* database name at the end because it might contain commas */
> !     sprintf(pbuf, "%d,%d,%s", port->sock, UsedShmemSegID, port->database_name);
snprintf please.  I don't think there's any guaranteed limit on the size
of port->database_name these days.
> +                     sscanf(optarg, "%d,%d,", &MyProcPort->sock, &UsedShmemSegID);
> +                     DBName = strdup(strrchr(optarg, ',') + 1);
What happens when the dbname contains a comma?
            regards, tom lane