Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0e7004

Browse files
author
Bryan Henderson
committed
Make strdup work for Ultrix. Thanks Erik Bertelsen
1 parent0667fd9 commitf0e7004

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

‎src/bin/pg_dump/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.10 1996/11/26 07:38:16 bryanh Exp $
10+
# $Header: /cvsroot/pgsql/src/bin/pg_dump/Makefile,v 1.11 1996/11/28 03:31:27 bryanh Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -27,7 +27,7 @@ pg_dump: $(OBJS) $(LIBPQDIR)/libpq.a
2727
$(CC)$(LDFLAGS) -o pg_dump -L$(LIBPQDIR)$(OBJS) -lpq$(LD_ADD)
2828

2929
../../utils/strdup.o:
30-
$(MAKE) -C ../../utils/strdup.o
30+
$(MAKE) -C ../../utilsstrdup.o
3131

3232
.PHONY: submake
3333
submake:

‎src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.21 1996/11/26 07:38:55 bryanh Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.22 1996/11/28 03:32:12 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -34,20 +34,6 @@
3434
#include"strdup.h"
3535
#endif
3636

37-
#if defined(ultrix4)|| defined(next)
38-
/* ultrix is lame and doesn't have strdup in libc for some reason */
39-
/* [TRH] So doesn't NEXTSTEP. But whaddaya expect for a non-ANSI
40-
standard function? (My, my. Touchy today, are we?) */
41-
char*
42-
strdup(constchar*string)
43-
{
44-
char*nstr;
45-
46-
if ((nstr=malloc(strlen(string)+1))!=NULL)
47-
strcpy(nstr,string);
48-
returnnstr;
49-
}
50-
#endif
5137

5238
/* use a local version instead of the one found in pqpacket.c */
5339
staticConnStatusTypeconnectDB(PGconn*conn);

‎src/utils/strdup.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,19 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.1 1996/11/27 01:46:52 bryanh Exp $
10+
* $Header: /cvsroot/pgsql/src/utils/Attic/strdup.c,v 1.2 1996/11/28 03:32:18 bryanh Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414
#include<string.h>
15+
#include<stdlib.h>
1516
#include"strdup.h"
1617

1718
char*
18-
strdup(char*string)
19+
strdup(charconst*string)
1920
{
2021
char*nstr;
2122

22-
nstr=strcpy((char*)palloc(strlen(string)+1),string);
23+
nstr=strcpy((char*)malloc(strlen(string)+1),string);
2324
returnnstr;
2425
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp