aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2024-03-07 21:50:07 +0100
committerCorinna Vinschen <corinna@vinschen.de>2024-03-07 21:50:07 +0100
commitf2010ed78479b1b6b4518ea79acb6cd36514344f (patch)
tree9d9b17f6b738b58ac4deaf228688162528801b30 /winsup
parentc2310061c66a100653fe10762859b8adb6a3d357 (diff)
downloadnewlib-f2010ed78479b1b6b4518ea79acb6cd36514344f.zip
newlib-f2010ed78479b1b6b4518ea79acb6cd36514344f.tar.gz
newlib-f2010ed78479b1b6b4518ea79acb6cd36514344f.tar.bz2
Cygwin: move EXPORT_ALIAS expressions to end of source
This isn't strictly required, but it avoids confusion in ctags. Ctags fails to record the next function or method following the EXPORT_ALIAS expression. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/exec.cc3
-rw-r--r--winsup/cygwin/random.cc4
-rw-r--r--winsup/cygwin/sched.cc2
-rw-r--r--winsup/cygwin/syscalls.cc24
-rw-r--r--winsup/cygwin/times.cc7
-rw-r--r--winsup/cygwin/tzcode/localtime_wrapper.c3
6 files changed, 19 insertions, 24 deletions
diff --git a/winsup/cygwin/exec.cc b/winsup/cygwin/exec.cc
index 2f40413..0e6e535 100644
--- a/winsup/cygwin/exec.cc
+++ b/winsup/cygwin/exec.cc
@@ -85,7 +85,6 @@ execve (const char *path, char *const argv[], char *const envp[])
{
return spawnve (_P_OVERLAY, path, argv, envp);
}
-EXPORT_ALIAS (execve, _execve) /* For newlib */
extern "C" int
execvp (const char *file, char * const *argv)
@@ -126,3 +125,5 @@ sexecve_is_bad ()
set_errno (ENOSYS);
return 0;
}
+
+EXPORT_ALIAS (execve, _execve) /* For newlib */
diff --git a/winsup/cygwin/random.cc b/winsup/cygwin/random.cc
index ddba6fb..d33cffa 100644
--- a/winsup/cygwin/random.cc
+++ b/winsup/cygwin/random.cc
@@ -293,8 +293,6 @@ srandom(unsigned x)
__random_unlock();
}
-EXPORT_ALIAS (srandom, srand)
-
/*
* initstate:
*
@@ -490,3 +488,5 @@ rand()
}
}
+
+EXPORT_ALIAS (srandom, srand)
diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc
index 845fcef..71a1e86 100644
--- a/winsup/cygwin/sched.cc
+++ b/winsup/cygwin/sched.cc
@@ -411,7 +411,6 @@ sched_yield ()
SwitchToThread ();
return 0;
}
-EXPORT_ALIAS (sched_yield, pthread_yield)
int
sched_getcpu ()
@@ -696,4 +695,5 @@ __cpuset_free (cpu_set_t *set)
free (set);
}
+EXPORT_ALIAS (sched_yield, pthread_yield)
} /* extern C */
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 2c5bf7c..df7d3a1 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1282,8 +1282,6 @@ read (int fd, void *ptr, size_t len)
return (ssize_t) res;
}
-EXPORT_ALIAS (read, _read)
-
extern "C" ssize_t
readv (int fd, const struct iovec *const iov, const int iovcnt)
{
@@ -1380,8 +1378,6 @@ write (int fd, const void *ptr, size_t len)
return res;
}
-EXPORT_ALIAS (write, _write)
-
extern "C" ssize_t
writev (const int fd, const struct iovec *const iov, const int iovcnt)
{
@@ -1594,8 +1590,6 @@ open (const char *unix_path, int flags, ...)
return res;
}
-EXPORT_ALIAS (open, _open )
-
static int
posix_getdents_lseek (cygheap_fdget &cfd, off_t pos, int dir)
{
@@ -1684,8 +1678,6 @@ lseek (int fd, off_t pos, int dir)
return res;
}
-EXPORT_ALIAS (lseek, _lseek)
-
extern "C" int
close (int fd)
{
@@ -1709,8 +1701,6 @@ close (int fd)
return res;
}
-EXPORT_ALIAS (close, _close)
-
extern "C" int
isatty (int fd)
{
@@ -1724,7 +1714,6 @@ isatty (int fd)
syscall_printf ("%R = isatty(%d)", res, fd);
return res;
}
-EXPORT_ALIAS (isatty, _isatty)
extern "C" int
link (const char *oldpath, const char *newpath)
@@ -1977,8 +1966,6 @@ fsync (int fd)
return cfd->fsync ();
}
-EXPORT_ALIAS (fsync, fdatasync)
-
static void
sync_worker (HANDLE dir, USHORT len, LPCWSTR vol)
{
@@ -4071,8 +4058,6 @@ utmpname (const char *file)
return -1;
}
-EXPORT_ALIAS (utmpname, utmpxname)
-
/* Note: do not make NO_COPY */
static struct utmp utmp_data_buf[16];
static unsigned utix = 0;
@@ -5128,3 +5113,12 @@ tmpfile (void)
set_errno (e);
return fp;
}
+
+EXPORT_ALIAS (close, _close)
+EXPORT_ALIAS (fsync, fdatasync)
+EXPORT_ALIAS (isatty, _isatty)
+EXPORT_ALIAS (lseek, _lseek)
+EXPORT_ALIAS (open, _open)
+EXPORT_ALIAS (read, _read)
+EXPORT_ALIAS (utmpname, utmpxname)
+EXPORT_ALIAS (write, _write)
diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc
index 71a7210..f6e2692 100644
--- a/winsup/cygwin/times.cc
+++ b/winsup/cygwin/times.cc
@@ -91,8 +91,6 @@ times (struct tms *buf)
return tc;
}
-EXPORT_ALIAS (times, _times)
-
/* settimeofday: BSD */
extern "C" int
settimeofday (const struct timeval *tv, const struct timezone *tz)
@@ -192,8 +190,6 @@ gettimeofday (struct timeval *__restrict tv, void *__restrict tzvp)
return 0;
}
-EXPORT_ALIAS (gettimeofday, _gettimeofday)
-
/* Cygwin internal */
void
timespec_to_filetime (const struct timespec *time_in, PLARGE_INTEGER out)
@@ -571,3 +567,6 @@ timespec_get (struct timespec *ts, int base)
clock_gettime (CLOCK_REALTIME, ts);
return base;
}
+
+EXPORT_ALIAS (gettimeofday, _gettimeofday)
+EXPORT_ALIAS (times, _times)
diff --git a/winsup/cygwin/tzcode/localtime_wrapper.c b/winsup/cygwin/tzcode/localtime_wrapper.c
index 4e78448..41a5bcb 100644
--- a/winsup/cygwin/tzcode/localtime_wrapper.c
+++ b/winsup/cygwin/tzcode/localtime_wrapper.c
@@ -124,7 +124,6 @@ tzgetwintzi (char *wildabbr, char *outbuf)
#include "localtime.patched.c"
// Don't forget these Cygwin-specific additions from this point to EOF
-EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked)
long
__cygwin_gettzoffset (const struct tm *tmp)
@@ -150,3 +149,5 @@ __cygwin_gettzname (const struct tm *tmp)
#endif
return _tzname[tmp->tm_isdst > 0];
}
+
+EXPORT_ALIAS (tzset_unlocked, _tzset_unlocked)