Sponsored Content
Full Discussion: GCC: General Macro for BSD
Top Forums Programming GCC: General Macro for BSD Post 302914403 by Corona688 on Monday 25th of August 2014 03:33:54 PM
Old 08-25-2014
You can do it like #if defined(__SOMETHING__) || defined(__SOMETHINGELSE__) || defined(__THIRDTHING__)
 

3 More Discussions You Might Find Interesting

1. BSD

for linux and BSD users interested in Unix system V/bsd

for all you unix/linux interested heres an online book for free that covers the basics of BSD SysV Unix commands and applications . giving the average linux user a perspective on the differences in context of the two operating systems and for BSD users covers material as a refernce guide. ... (0 Replies)
Discussion started by: moxxx68
0 Replies

2. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

3. Programming

Make-question - redefine a macro, using another macro..?

I think there is no problem to use any macro in a new macro definishion, but I have a problem with that. I can not understand why? I have a *.mak file that inludes file with many definitions and rules. ############################################## include dstndflt.mak ... One of the... (2 Replies)
Discussion started by: alex_5161
2 Replies
MAKEDEV(3)						   BSD Library Functions Manual 						MAKEDEV(3)

NAME
makedev, major, minor -- device number conversion SYNOPSIS
#include <sys/types.h> dev_t makedev(int major, int minor); int major(dev_t dev); int minor(dev_t dev); DESCRIPTION
The makedev() macro allows a unique device number to be generated based on its major and minor number. The major() and minor() macros can be used to obtain the original numbers from the device number dev. In previous implementations of FreeBSD all block and character devices were uniquely identified by a pair of major and minor numbers. The major number referred to a certain device class (e.g. disks, TTYs) while the minor number identified an instance within the device class. Later versions of FreeBSD automatically generate a unique device number for each character device visible in /dev/. These numbers are not divided in device classes. On FreeBSD these macros are only used by utilities that need to exchange numbers with other operating systems that may use different encod- ings for dev_t, but also applications that present these numbers to the user in a more conventional way. RETURN VALUES
The major() macro returns a device major number that has a value between 0 and 255. The minor() macro returns a device minor number whose value can span the complete range of an int. SEE ALSO
mknod(2), devname(3), devfs(5) BSD
September 28, 2008 BSD
All times are GMT -4. The time now is 02:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy