Staging
v0.5.1
https://github.com/python/cpython
Revision ed0392ae06a52f768123aad0e478b5bcfac143e2 authored by Berker Peksag on 02 March 2015, 05:40:36 UTC, committed by Berker Peksag on 02 March 2015, 05:40:36 UTC
1 parent 659f631
Raw File
Tip revision: ed0392ae06a52f768123aad0e478b5bcfac143e2 authored by Berker Peksag on 02 March 2015, 05:40:36 UTC
Issue #23527: Update Gmail port number for STARTTLS to 587.
Tip revision: ed0392a
strdup.c
/* strdup() replacement (from stdwin, if you must know) */

#include "pgenheaders.h"

char *
strdup(const char *str)
{
	if (str != NULL) {
		char *copy = malloc(strlen(str) + 1);
		if (copy != NULL)
			return strcpy(copy, str);
	}
	return NULL;
}
back to top