into a directory typically found along a user's PATH, or in another
obvious and convenient place.
+It may seem obvious to say, but Perl is useful only when users can
+easily find it. When possible, it's good for both /usr/bin/perl and
+/usr/local/bin/perl to be symlinks to the actual binary. If that can't
+be done, system administrators are strongly encouraged to put
+(symlinks to) perl and its accompanying utilities, such as perldoc,
+into a directory typically found along a user's PATH, or in another
+obvious and convenient place.
+
By default, Configure will compile perl to use dynamic loading if
your system supports it. If you want to force perl to be compiled
statically, you can either choose this when Configure prompts you or
/* Solaris manpage says that it uses (like linux)
int semctl (int semid, int semnum, int cmd, union semun arg)
but the system include files do not define union semun !!!!
+ Note: Linux/glibc *does* declare union semun in <sys/sem_buf.h>
+ but, unlike the older Linux libc and Solaris, it has an extra
+ struct seminfo * on the end.
*/
union semun {
int val;
char *a;
I32 id, n, cmd, infosize, getinfo;
I32 ret = -1;
-#if defined(__linux__) || (defined(__sun) && defined(__svr4__))
-/* XXX Need metaconfig test */
- union semun unsemds;
+/* XXX REALLY need metaconfig test */
+/* linux and Solaris2 use:
+ int semctl (int semid, int semnum, int cmd, union semun arg)
+ instead of:
+ int semctl (int semid, int semnum, int cmd, struct semid_ds *arg);
+ Solaris and Linux (pre-glibc) use
+ union semun {
+ int val;
+ struct semid_ds *buf;
+ ushort *array;
+ };
+ but Solaris doesn't declare it in a header file (we declared it
+ explicitly earlier). Linux/glibc declares a *different* union semun
+ so we just refer to "union semun" here.
+
+*/
+#if defined(__linux__) || (defined(__sun__) && defined(__svr4__))
+# define SEMCTL_SEMUN
+ union semun unsemds, semun;
#endif
id = SvIVx(*++mark);
else if (cmd == GETALL || cmd == SETALL)
{
struct semid_ds semds;
-#if defined(__linux__) || (defined(__sun) && defined(__svr4__))
- /* XXX Need metaconfig test */
-/* linux and Solaris2 uses :
- int semctl (int semid, int semnum, int cmd, union semun arg)
- union semun {
- int val;
- struct semid_ds *buf;
- ushort *array;
- };
-*/
- union semun semun;
+#ifdef SEMCTL_SEMUN
semun.buf = &semds;
if (semctl(id, 0, IPC_STAT, semun) == -1)
#else
#endif
#ifdef HAS_SEM
case OP_SEMCTL:
-#if defined(__linux__) || (defined(__sun) && defined(__svr4__))
+#ifdef SEMCTL_SEMUN
/* XXX Need metaconfig test */
unsemds.buf = (struct semid_ds *)a;
ret = semctl(id, n, cmd, unsemds);