Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
111022ea
Commit
111022ea
authored
Jan 10, 2014
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move username lookup functions from /port to /common
Per suggestion from Peter E and Alvaro
parent
423e1211
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
9 deletions
+26
-9
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+1
-0
src/backend/main/main.c
src/backend/main/main.c
+1
-0
src/bin/initdb/initdb.c
src/bin/initdb/initdb.c
+1
-0
src/bin/psql/help.c
src/bin/psql/help.c
+1
-0
src/bin/scripts/common.h
src/bin/scripts/common.h
+1
-0
src/common/Makefile
src/common/Makefile
+1
-1
src/common/username.c
src/common/username.c
+2
-1
src/include/common/username.h
src/include/common/username.h
+15
-0
src/include/port.h
src/include/port.h
+0
-4
src/port/Makefile
src/port/Makefile
+1
-1
src/tools/msvc/Mkvcbuild.pm
src/tools/msvc/Mkvcbuild.pm
+2
-2
No files found.
src/backend/libpq/auth.c
View file @
111022ea
...
...
@@ -21,6 +21,7 @@
#include <arpa/inet.h>
#include <unistd.h>
#include "common/username.h"
#include "libpq/auth.h"
#include "libpq/crypt.h"
#include "libpq/ip.h"
...
...
src/backend/main/main.c
View file @
111022ea
...
...
@@ -35,6 +35,7 @@
#endif
#include "bootstrap/bootstrap.h"
#include "common/username.h"
#include "postmaster/postmaster.h"
#include "tcop/tcopprot.h"
#include "utils/help_config.h"
...
...
src/bin/initdb/initdb.c
View file @
111022ea
...
...
@@ -60,6 +60,7 @@
#include "sys/mman.h"
#endif
#include "common/username.h"
#include "mb/pg_wchar.h"
#include "getaddrinfo.h"
#include "getopt_long.h"
...
...
src/bin/psql/help.c
View file @
111022ea
...
...
@@ -23,6 +23,7 @@
#endif
#include "common.h"
#include "common/username.h"
#include "help.h"
#include "input.h"
#include "settings.h"
...
...
src/bin/scripts/common.h
View file @
111022ea
...
...
@@ -9,6 +9,7 @@
#ifndef COMMON_H
#define COMMON_H
#include "common/username.h"
#include "libpq-fe.h"
#include "getopt_long.h"
/* pgrminclude ignore */
#include "pqexpbuffer.h"
/* pgrminclude ignore */
...
...
src/common/Makefile
View file @
111022ea
...
...
@@ -23,7 +23,7 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS
:
= -DFRONTEND $(CPPFLAGS)
LIBS
+=
$(PTHREAD_LIBS)
OBJS_COMMON
=
exec.o pgfnames.o psprintf.o relpath.o rmtree.o wait_error.o
OBJS_COMMON
=
exec.o pgfnames.o psprintf.o relpath.o rmtree.o
username.o
wait_error.o
OBJS_FRONTEND
=
$(OBJS_COMMON)
fe_memutils.o
...
...
src/
port
/username.c
→
src/
common
/username.c
View file @
111022ea
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* src/
port
/username.c
* src/
common
/username.c
*
*-------------------------------------------------------------------------
*/
...
...
@@ -23,6 +23,7 @@
#include <unistd.h>
#include <sys/types.h>
#include "common/username.h"
/*
* Returns the current user name in a static buffer, or NULL on error and
...
...
src/include/common/username.h
0 → 100644
View file @
111022ea
/*
* username.h
* lookup effective username
*
* Copyright (c) 2003-2014, PostgreSQL Global Development Group
*
* src/include/common/username.h
*/
#ifndef USERNAME_H
#define USERNAME_H
extern
const
char
*
get_user_name
(
char
**
errstr
);
extern
const
char
*
get_user_name_or_exit
(
const
char
*
progname
);
#endif
/* USERNAME_H */
src/include/port.h
View file @
111022ea
...
...
@@ -473,10 +473,6 @@ extern pqsigfunc pqsignal(int signo, pqsigfunc func);
/* port/quotes.c */
extern
char
*
escape_single_quotes_ascii
(
const
char
*
src
);
/* port/username.c */
extern
const
char
*
get_user_name
(
char
**
errstr
);
extern
const
char
*
get_user_name_or_exit
(
const
char
*
progname
);
/* port/wait_error.c */
extern
char
*
wait_result_to_str
(
int
exit_status
);
...
...
src/port/Makefile
View file @
111022ea
...
...
@@ -33,7 +33,7 @@ LIBS += $(PTHREAD_LIBS)
OBJS
=
$(LIBOBJS)
chklocale.o dirmod.o erand48.o fls.o inet_net_ntop.o
\
noblock.o path.o pgcheckdir.o pg_crc.o pgmkdirp.o pgsleep.o
\
pgstrcasecmp.o pqsignal.o
\
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o
username.o
qsort.o qsort_arg.o quotes.o sprompt.o tar.o thread.o
# foo_srv.o and foo.o are both built from foo.c, but only foo.o has -DFRONTEND
OBJS_SRV
=
$(OBJS:%.o=%_srv.o)
...
...
src/tools/msvc/Mkvcbuild.pm
View file @
111022ea
...
...
@@ -70,11 +70,11 @@ sub mkvcbuild
erand48.c snprintf.c strlcat.c strlcpy.c dirmod.c noblock.c path.c
pgcheckdir.c pg_crc.c pgmkdirp.c pgsleep.c pgstrcasecmp.c pqsignal.c
qsort.c qsort_arg.c quotes.c
sprompt.c tar.c thread.c getopt.c getopt_long.c dirent.c rint.c
username.c
sprompt.c tar.c thread.c getopt.c getopt_long.c dirent.c rint.c
win32env.c win32error.c win32setlocale.c)
;
our
@pgcommonallfiles
=
qw(
exec.c pgfnames.c psprintf.c relpath.c rmtree.c wait_error.c)
;
exec.c pgfnames.c psprintf.c relpath.c rmtree.c
username.c
wait_error.c)
;
our
@pgcommonfrontendfiles
=
(
@pgcommonallfiles
,
qw(fe_memutils.c)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment